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

Dataform import json config

Hi
I'm having trouble importing configurations into my sqlx.
 
I created the dataform_cofig.json file
 
{
"database": "Proj-svil-001-prj",
"schema": "TRY_IMM"
}
 
I would like to bring them into my try.sqlx file
config {
type: "table",
description: "Create table ."
}
 
CREATE OR REPLACE TABLE
${database}"."${schema}.TABLE_TRY
 
but I can't import them what am I doing wrong?
I'm just starting to use the tool
Solved Solved
0 1 129
1 ACCEPTED SOLUTION

Hi CILONO,

Welcome to the Google Cloud Community!

Currently, the JSON config file cannot be directly imported into Dataform’s SQLX files. Please be aware of this limitation in Dataform. To work around this, ensure that the .json config file is properly accessible within your Dataform project and consider manually loading the configuration into your SQLX files. It’s recommended to store the .json file in BigQuery and load it using a SQL query within your Dataform project.

With this, I suggest filing this as a feature request. Please note that I can't provide any details or timelines at this moment. However, you may keep an eye on the release notes for any latest updates or new features related to Dataform.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

View solution in original post

1 REPLY 1

Hi CILONO,

Welcome to the Google Cloud Community!

Currently, the JSON config file cannot be directly imported into Dataform’s SQLX files. Please be aware of this limitation in Dataform. To work around this, ensure that the .json config file is properly accessible within your Dataform project and consider manually loading the configuration into your SQLX files. It’s recommended to store the .json file in BigQuery and load it using a SQL query within your Dataform project.

With this, I suggest filing this as a feature request. Please note that I can't provide any details or timelines at this moment. However, you may keep an eye on the release notes for any latest updates or new features related to Dataform.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.