dsbulk icon indicating copy to clipboard operation
dsbulk copied to clipboard

Allow file input for dsbulk unload

Open bhisey opened this issue 1 year ago • 0 comments

We have different scenarios where we needed to use file as source to put it in where clause but its not allowed.

[solr2:0] automaton@ip-172-31-19-246:~$ cat test/output-000001.csv
str_num,day_no,transaction_uid,trans_typ,sequence_no
006,7,14d6f78c-c468-4b71-84ce-0a8009bf3dc1,SALE,seq3
006,7,14d6f78c-c468-4b71-84ce-0a8009bf3dc1,SALE,seq4

Error The provided statement (schema.query) contains unrecognized WHERE restrictions; the WHERE clause is only allowed to contain one token range restriction of the form: WHERE token(...) > ? AND

[solr2:0] automaton@ip-172-31-19-246:~$ cat test/output-000001.csv  | dsbulk-1.11.0/bin/dsbulk unload -query "SELECT str_num, day_no, transaction_uid, trans_typ, sequence_no from test.live_mom_transaction WHERE str_num=:str_num and day_no=:day_num and transaction_uid=:transaction_uid and trans_typ=:trans_typ and  sequence_no=:sequence_no"
Operation directory: /home/automaton/logs/UNLOAD_20240312-213555-414352
Operation UNLOAD_20240312-213555-414352 failed: The provided statement (schema.query) contains unrecognized WHERE restrictions; the WHERE clause is only allowed to contain one token range restriction of the form: WHERE token(...) > ? AND token(...) <= ?.

bhisey avatar Mar 12 '24 21:03 bhisey