Open teraearlywine opened 1 year ago
not sure how to do this in vscode , but via the cli you can do the following assuming you have jq (this is how I get the compiled sql)
cd location/where/your/dataform.json/file/is
npx dataform run --dry-run --json --actions $name-of-action | jq -r '.actions[0].tasks[0].statement'
if you have bat you can get pretty output as well
npx dataform run --dry-run --json --actions $name-of-action | jq -r '.actions[0].tasks[0].statement' | bat --language=sql
Am developing in vscode using the CLI, and one of the best features of the web app is being able to copy the compiled SQL -> edit/prototype using bq console or the draft-queries part.
Would like to be able to see what the compiled SQL of the table I'm working on in vscode too. So far haven't been able to figure out how to do this yet if it's already available