I am trying to make a reusable workflow where I can run a merge script for any number of tables. The idea is I tell the workflow the table name and/or path to it and it can reference that in the file path field. The simplified idea is below:
resources:
jobs:
test_workflow:
name: test_workflow
description: some workflow
tasks:
- task_key: run_sql_file
sql_task:
file:
path: ${workspace.file_path}/{{job.parameters.sql_directory}}/{{job.parameters.table_name}}.sql
source: WORKSPACE
warehouse_id: ${var.serverless_sql_warehouse_ID}
queue:
enabled: true
parameters:
- name: sql_directory
default: "path/to/sql"
- name: table_name
default: "" # this one I change when running the task or when calling this workflow from another workflow
However this doesn't work. ${workspace.file_path} is able to be formatted as expected but {{job.parameters.sql_directory}} and {{job.parameters.table_name}} are not able to be formatted, they don't dynamically update and they stay written exactly as is with the curly braces.
I'm wondering if there is anyway around this or to make this happen?