You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: custom SQL query for export, i.e. export subset of table or just a few tables #1
You are passing the sql as parameter in command line. Since you said env variable .. So I guess I can store my sql in file and pass the file name in cli
You need to pass the SQL statement as a value to sql2json, but you can populate the content of the ENV variable-to-be-set from a file using shell tricks, sure.
Activity
joonas-fi commentedon Feb 4, 2017
Custom SQL query is now supported via the ENV variable "SQL":
If you have ran sql2json before (you have older image without this feature), make sure to do Docker pull to get the latest image:
iamhasibrahman commentedon Feb 4, 2017
You are passing the sql as parameter in command line. Since you said env variable .. So I guess I can store my sql in file and pass the file name in cli
joonas-fi commentedon Feb 4, 2017
You need to pass the SQL statement as a value to sql2json, but you can populate the content of the ENV variable-to-be-set from a file using shell tricks, sure.
iamhasibrahman commentedon Feb 5, 2017
Yes. I am thinking of trying it in production and at times my sql query is much long so it can't be passed in cli. Need to put it in script
joonas-fi commentedon Feb 9, 2017
@iamhasibrahman: just curious, how's this feature working out for you?
joonas-fi commentedon Apr 16, 2017
Closing because inactivity. @iamhasibrahman, feel free to reply and we'll re-open if necessary.