I am learning cloud Workflow ,and after going to documentation and given example , I tried to run a sql query using Workflow.
The YAML file is correct and its generating the DAG also.
But, when I am going to deploy it, it throws below error.
Could not deploy workflow: main.yaml:12:36: parse error: in workflow 'main', step 'runQuery1': mismatched input 'Y' expecting EXPRESSION_END
query: '${ "INSERT INTO `output_dataset.employee_changes`
^
Below is my YAML code:
main:
steps:
- runQuery1:
call: googleapis.bigquery.v2.jobs.query
args:
projectId: ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")}
body:
useLegacySql: false
useQueryCache: false
timeoutMs: 30000
query: '${ "INSERT INTO `output_dataset.employee_changes`
select *,current_date as start_date,Null as end_data,CAST("Y" AS STRING) as
is_active from `raw_dataset.v_employee_raw` a where a.id not in
(select id from `output_dataset.employee_changes`)" }'
Hi have tried to put “‘”(single quotes) around the $ symbol, although, in example its not mentioned, but, in error , it was asking me to, to have quotes around the $ symbol.
I also tried validating the YAML, and YAML is correct.