After loading data from Oracle DB to Cassandra via Sqoop, I was able to view my data through both Cassandra and Hive. I was told that while doing so, 2 files would be generated for each, creating space issues. To resolve this, I dropped the table in Hive and created an external table and mapped it to my column family in Cassandra. But I am not able to view any data in the Hive table.
In an effort to consolidate free help offered for our products we have decided to move these forums to a more widely used forum. Please use one of the following queries (or any combination):
- Cassandra: tag search or plain text search
- DataStax Enterprise: tag search or plain text search
- DataStax OpsCenter: tag search or plain text search
Not able to view data through Hive mapping to Cassandra(7 posts) (4 voices)
Which version of DSE do you use? Can you view the data for the column family in cassandra-cli? Can you attach the column family definition and the script to create hive table?
I am using Datastax Enterprise 3.0.1. Using Sqoop, I migrated the table 'test' from Oracle DB to a Cassandra column family of the same name in the keyspace 'test_keyspace'.
I am able to view the data through cassandra-cli using the command :
Describing the column family in cqlsh gives me the following result:
CREATE TABLE test (
rowkey text PRIMARY KEY,
compaction_strategy_class='SizeTieredCompactionStrategy' AND compression_parameters:stable_compression='SnappyCompressor';
The command i am using to create the Hive table is:
CREATE external TABLE test (
STORED BY 'org.apache.hadoop.hive.cassandra.CassandraStorageHandler'
TBLPROPERTIES ( "cassandra.ks.name" = "test_keyspace" );
The table is listed when i type 'show tables' in Hive.
But 'select * from test' shows all the values in the table as NULL, except the row key.
CQL3 type table is not supported by DSE yet. It will be supported in the coming DSE. You need create the CF from casandra-cliPosted 8 months ago #
Actually, I had created the table in Cassandra using CQL 2.
But I also tried creating a new column family in CLI. That too shows the same result. I am able to view the data in Cassandra after loading through Sqoop, but not in Hive.Posted 8 months ago #
i am faced with the same issue, i have loaded the data cassandra via copy command and now after creating the external tables in hive, i am not able to view this data in hive, if i insert the data using insert into command with values i see that data in hive.
any suggestions?Posted 5 months ago #
We are about to turn this forum off... to continue the conversation would you mind posting your question on stackexchange/serverfault? We are trying to broaden the audience for these questions/answers by using that forum forward going.
SvenPosted 5 months ago #