Dataform tools - a vscode extension⚠️ This is not an officially supported Google product. VS Code extension for Dataform with following features
Requirements
FeaturesDependency graphInline diagnostics errors on
|
Commands |
---|
Dataform: Run current file |
Dataform: Run current file with dependencies |
Dataform: Run current file with dependents |
Dataform: Run current tag |
Dataform: Run current tag with dependencies |
Dataform: Run current tag with dependents |
Dataform: Format current file |
Frequently asked questions
Unable to execute command e.g. error
command vscode-dataform-tools.xxx not found
- It is likely that the vscode workspace folder is not opened at the root of your dataform project. For example, if your dataform project is located at
~/Documents/repos/my_dataform_project
ensure that workspace is opened at~/Documents/repos/my_dataform_project
NOT~/Documents/repos/my_dataform_project
- The above design is to facilitate the exection of
dataform compile --json
command without infering the dataform root at run time
- It is likely that the vscode workspace folder is not opened at the root of your dataform project. For example, if your dataform project is located at
Error compiling Dataform, process existed with exit code 1
- Check if correct dataform cli version is installed by running
dataform --version
in your terminal - Ensure that dataform cli version matches the version required by the project
- Try compiling the project by running
dataform compile
on your terminal from the root of your dataform project - In case you need to install a specific dataform cli version by running
npm i -g @dataform/cli@2.9.0
. Make sure you verify the version by running thedataform --version
- In case the error is not due to all the above reasons it is likely that you have a compilation error in your pipeline
- Check if correct dataform cli version is installed by running
-
- Run
dataform init-creds
from the from the root of your dataform project in your terminal - You will be promted to pick the location and type of authentication
json/adc
. Choosing adc will be use your default gcp credentials that you had setup usinggcloud
- Run
I do not want to see compiled query each time I save it
- Open vscode settings and search for Dataform and uncheck the following setting
-
- Open vscode settings and search for Dataform and select the prefered autocompletion format
Known Issues
- [ ] Features such as go to definition / dependancy graph might not work with consistantly with
${ref("dataset", "table")}
- [ ] sync feature flickers when user tries to scroll a non-active editor. Fixes when user selects the active editor by clicking on it
TODO
- [ ] Preview query results in a table
- [ ] Bundle javascript files in the extension using esbuild or webpack
- [ ] Handle case where user is not connected to internet or on vpn where network request for dry run cannot be made
- [ ] Add proper logging, winston-transport-vscode