question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CLI fail to compile when config has key `columns`

See original GitHub issue

CLI fail to compile the example below, which config has key columns

config { type: "table",
         description: "This table is an example",
         columns:{
             user_name: "Name of the user",
             user_id: "ID of the user"
         } 
}

select
  1 as user_name,
  1 as user_id

But the following example will compile successfully

config { type: "table",
         description: "This table is an example",
}
select
  1 as user_name,
  1 as user_id

dataform version: 1.19.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
vvalcristinacommented, Jun 29, 2021

Hello @BenBirt in Dataform Web compiled to sucess:

Captura de tela de 2021-06-28 12-05-49

However in Dataform CLI it presents the following error: Compilation errors: definitions/reports/brasil_sales_report.sqlx: TypeError: Object.keys(…).map(…).flat is not a function at Function.mapToColumnProtoArray (/home/valeria.silva/DNA/Dataform-CLI/node_modules/@dataform/core/bundle.js:21740:14) at Table.columns (/home/valeria.silva/DNA/Dataform-CLI/node_modules/@dataform/core/bundle.js:22187:65) at Table.config (/home/valeria.silva/DNA/Dataform-CLI/node_modules/@dataform/core/bundle.js:22076:18) at Session.sqlxAction (/home/valeria.silva/DNA/Dataform-CLI/node_modules/@dataform/core/bundle.js:23400:22) at /home/valeria.silva/DNA/Dataform-CLI/definitions/reports/brasil_sales_report.sqlx:1:86 at Object.EXTENSIONS.(anonymous function) [as .sqlx] (/usr/local/lib/node_modules/@dataform/cli/node_modules/vm2/lib/sandbox.js:91:5) at _require (/usr/local/lib/node_modules/@dataform/cli/node_modules/vm2/lib/sandbox.js:406:24) at Object.<anonymous> (/home/valeria.silva/DNA/Dataform-CLI/index.js:41:13) at NodeVM.run (/usr/local/lib/node_modules/@dataform/cli/node_modules/vm2/lib/main.js:1167:29) at compile$1 (/usr/local/lib/node_modules/@dataform/cli/worker_bundle.js:20977:23)

Captura de tela de 2021-06-28 12-05-26

It code I’m using is in the following repository(https://github.com/vvalcristina/Dataform-Jenkins-CLI/blob/feat/column/definitions/reports/brasil_sales_report.sqlx) on the branch feat/column

0reactions
BenBirtcommented, Oct 20, 2021

Aha, good to hear. Thanks, we’ll be sure to remind users to upgrade to the latest stable Node version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rover CLI error codes - Apollo GraphQL Docs
This error occurs when an API key isn't recognized by the graph registry. Your key may have been disabled, changed, or saved improperly....
Read more >
Git Error - key does not contain a section - Stack Overflow
The values in Git config file are grouped in sections. The name of each section is placed between square brackets on a separate...
Read more >
Troubleshooting AWS CLI errors - AWS Command Line Interface
Various errors can occur if your config and credentials files or your IAM user or roles are not configured correctly. For more information...
Read more >
Debugging errors - dbt Developer Hub
To fix this: Open the offending file (e.g. schema.yml ); Check the line in the error message (e.g. line 5 ); Find the...
Read more >
cbt CLI reference | Cloud Bigtable Documentation
Because the first column is reserved for row keys, leave it empty in the header rows. In the column family header, provide each...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found