We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigqueryQuery task only support embedded query parameter. But sometimes we want to write long query which include parameters and load it from file.
BigqueryQuery
query
So we extend BigqueryQuery task can accept query_file parameter. query_file is ERB template file and can access attribute of task like:
query_file
SELECT id FROM table WHERE DATE(time) == <%= @today %>
task task1, type: bigquery_query do param :today, auto_bind: true, required: true param_set :query_file, 'path/to/query.sql' end
The text was updated successfully, but these errors were encountered:
umm, I rethink specification, just use lambda is enough? So I move this issue's milestone to v0.3.0, and it is really needed or not.
Current BigqueryQuery support template query using string interpolation + hear document like this:
task task1, type: bigquery_query do param :today, auto_bind: true, required: true param_set :query, -> { >>-SQL SELECT id FROM table WHERE DATE(time) == '#{today}' SQL } end
If you are using ruby 2.3+, you can use >>~ to remove leading indent.
>>~
Sorry, something went wrong.
No branches or pull requests
BigqueryQuery
task only support embeddedquery
parameter. But sometimes we want to write long query which include parameters and load it from file.So we extend
BigqueryQuery
task can acceptquery_file
parameter.query_file
is ERB template file and can access attribute of task like:The text was updated successfully, but these errors were encountered: