Closed workanandr closed 8 years ago
Hi there are basically two ways you can pass arguments to SQL commands
Using the sql-command
- type: sql-command
script_arguments:
- '#{format(minusDays(@scheduledStartTime,1),"YYYY-MM-dd")}'
command: |
DELETE FROM prod.page_views WHERE page_view_dt = ?;
and then otherwise if you're using create-update-sql
step then
- step_type: create-update-sql
script_arguments:
- '#{format(minusDays(@scheduledStartTime,1),"YYYY-MM-dd")}'
command: |
DELETE FROM prod.page_views WHERE page_view_dt = %s;
table_definition: tables/prod.page_views.sql
I have tried with both the following code, but they are not working. Any help is appreciated. Thanks.