Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Issue with Dataform Variable 'undefined' During Single SQLX Execution

Hi everyone,

I'm back here seeking some help!

I've created my Dataform in BigQuery, which is supposed to be called by a DAG. Inside it, I have a WHERE condition: WHERE codice = '${dataform.projectConfig.vars.Codice}'.

From what I understand, this variable can be changed by the DAG when it calls the Dataform.

Now, here's my question: I've set up my dataform.json file with the following content:

JSON
 
{
  "vars": {
    "codice": "active"
  }
}

However, when I perform a start execution by launching the single SQLX, the value I get is 'undefined':

SQL
 
WHERE codice = 'undefined'

Why is this happening? What am I doing wrong?

Thanks in advance for any help!

Solved Solved
0 1 28
1 ACCEPTED SOLUTION

Great! I solved it out myself this time 🙂

The dataform.json file needs to be outside the include folder.

Thanks!

View solution in original post

1 REPLY 1

Great! I solved it out myself this time 🙂

The dataform.json file needs to be outside the include folder.

Thanks!