Migrating data to a Cassandra table

Using Hive to load the imported data into a Cassandra CQL table.

After importing data into text files in the CassandraFS, you can use Hive to load the imported data into a Cassandra CQL table. In Hive, create two external tables, one to map the CassandraFS data into Hive and the other to map and store the data into Cassandra. Download sample commands for accomplishing this task. Adapt the sample commands to your environment. For example, in the npa_from_cfs table, change the path in the AS TEXTFILE LOCATION clause to match the path to the data in the CassandraFS.

Using the Sqoop import command with Cassandra options, you can import data into a legacy Cassandra table and access the table using Thrift. In the previous release, you could access the legacy Cassandra table using cqlsh. In DataStax Enterprise 4.0 and later, cqlsh support for legacy tables has been removed.