I’m currently working on a DAG in Google Cloud Composer that involves creating a workflow invocation using Dataform.
I’m following this documentation https://cloud.google.com/dataform/docs/schedule-executions-composer#add_workflow_invocation_configuration_parameters
Here’s the code snippet for my DAG:
with models.DAG(
DAG_ID,
schedule_interval=None, # Override to match your needs
start_date=datetime(2022, 1, 1),
catchup=False, # Override to match your needs
tags=['dataform'],
) as dag:
create_compilation_result = DataformCreateCompilationResultOperator(
task_id="create_compilation_result",
project_id=PROJECT_ID,
region=REGION,
repository_id=REPOSITORY_ID,
compilation_result={
"git_commitish": GIT_COMMITISH,
},
)
create_workflow_invocation = DataformCreateWorkflowInvocationOperator(
task_id='create_workflow_invocation',
project_id=PROJECT_ID,
region=REGION,
repository_id=REPOSITORY_ID,
workflow_invocation={
"compilation_result": "{{ task_instance.xcom_pull('create_compilation_result')['name'] }}",
"invocation_config": { "included_tags": ["files"], "transitive_dependencies_included": True }
},
)
create_compilation_result >> create_workflow_invocation
However, when I run this DAG, I encounter the following error:
Failed to execute job 65 for task create_workflow_invocation (400 At least one action must be selected for execution.; 10747)
It seems like there is an issue with the configuration of the create_workflow_invocation task.
Any help would be greatly appreciated. Thanks in advance.