Hi,
I'm trying to use sqoop to import some data from a MySQL database into a Cassandra column family. I've been able to do this successfully when I used the --table option (like shown in the sqoop demo in the docs), but using --query option doesn't seem to work.
If I run a command like this:
dse sqoop import --connect jdbc:mysql://db.server.address/schema_name --username user -P --query "select x, y, z from table where cond1 and cond2 and \$CONDITIONS" --split-by x --cassandra-keyspace cks1 --cassandra-column-family ccf1 --cassandra-row-key x --cassandra-thrift-host 127.0.0.1
it fails and tells me that --target-dir option must be specified.
If I then add the --target-dir option like this:
dse sqoop import --connect jdbc:mysql://db.server.address/schema_name --username user -P --query "select x, y, z from table where cond1 and cond2 and \$CONDITIONS" --split-by x --target-dir /some/dir --cassandra-keyspace cks1 --cassandra-column-family ccf1 --cassandra-row-key x --cassandra-thrift-host 127.0.0.1
the job runs, but does not import any records.
Running this import without the cassandra options works and dumps the data into CFS.
Am I doing something wrong or is it just not possible to import directly into a Cassandra column family using the --query option?
I am using DSE 2.2.
