brianmhess / cassandra-loader

Delimited file loader for Cassandra
Apache License 2.0
197 stars 93 forks source link

Specify a query predicate for unloader #39

Closed jeromatron closed 8 years ago

jeromatron commented 8 years ago

It would be nice to specify a query predicate for the unloader, for periodic dumps of specific ranges of data.

brianmhess commented 8 years ago

Would you want to just specify a WHERE clause, sort of like: -where "X = 100" or -where "Y = 100 ALLOW FILTERING"

jeromatron commented 8 years ago

Yes - something of a predicate. Someone mentioned exporting the change from the last 24 hours which is presumably in the data itself. So perhaps "where registered_date > '2016-05-09".

sshcherbakov commented 8 years ago

+1

ndeokate-navico commented 8 years ago

Is this feature added to unloader??

ndeokate-navico commented 8 years ago

any updates? It seems this forum is in-active :-1:

brianmhess commented 8 years ago

I have not added this feature yet. I've been focused on some other areas on the loading side. I may be able to do something like this in the (near?) future.

jeromatron commented 8 years ago

It should be relatively simple to add a way to specify a clause and use that in the query underneath. PRs are welcome :) I don't know when I'll be able to get to it either right now.

ndeokate-navico commented 8 years ago

Will wait for this feature

brianmhess commented 8 years ago

This has been added to v0.0.19.

ndeokate-navico commented 8 years ago

how to use this ? e.g cassandra-unloader -f zz -host my_machine -numThreads 1 -schema "keyspacedirectory.tbl_emp(empid, name, surname)

brianmhess commented 8 years ago

What are you trying to accomplish? The new argument is -where: cassandra-unloader -f zz -host my_machine -numThreads 1 -schema "keyspacedirectory.tbl_emp(empid, name, surname)" -where "empid = 12345"

ndeokate-navico commented 8 years ago

thanks. I was looking for syntax.