RBENREJEB@RBR-OS:/USR/SHARE/DOC/DATAFORM-INTELLIJ-PLUGIN/PROJECT-SETUP$ CAT README
DOCUMENTATION
Project setup
Google Cloud Dataform Plugin for IntelliJ · Documentation
Set up Node.js and the Dataform CLI first, as described in Configuration. Creating and opening a project both need them.
Create a project
- Choose File ▸ New ▸ Project and select Dataform.
-
Fill in the project settings:
Field Description GCP Project ID The default Google Cloud project, written as defaultProject.Default schema The default BigQuery dataset, written as defaultDataset.Default location The default BigQuery location, written as defaultLocation.Dataform core version The @dataform/coreversion of the project. The latest published version is proposed.FIG.01 // The Dataform page of the New Project wizard - Click Next, enter the Project name and Project location, then click Create.
The wizard creates:
workflow_settings.yaml defaultProject, defaultLocation and defaultDataset
package.json the @dataform/core dependency
definitions/
example_table.sqlx an example table
includes/
.gitignore node_modules/, .dataform/ and logs
.gcloudignore files not to push to the Dataform workspace
README.md
Once the project is open, the plugin runs dataform install to install its packages, then compiles it.
Build ▸ Build Project compiles the project, refreshes the table schemas, and reports in the Build tool window the compilation errors and the failing BigQuery dry-runs, grouped per file. The build is shown as failed while a query fails, even when the compilation succeeds.
Open an existing project
Open a folder with workflow_settings.yaml or dataform.json at its root. The plugin detects it and
enables its features.
The Dataform panel only appears in such a project. To start from a repository in Google Cloud, see Open a Dataform repository.
If workflow_settings.yaml pins the @dataform/core version, the plugin offers to Move to
package.json, so the version is managed with npm like the other packages.
Open a Dataform repository
To start from a repository that already exists in Google Cloud, use the IDE’s clone dialog. It needs the Git plugin, which is bundled with the IDE.
- Choose File ▸ New ▸ Project from Version Control, or Clone Repository on the Welcome screen, then the Dataform tab. In the New Project wizard, Get it from Google Cloud opens the same tab.
- Sign in to Google Cloud if the tab asks for it.
- Enter the GCP project and Location to list their repositories, then select one.
-
Under Get files from, choose where the files come from:
Source Result Git remote Clones the repository with your local Git credentials, with its history and branches. The default when the repository has a Git remote. Workspace Copies the files of the workspace you pick, with no local Git history. The only choice when the repository has no Git remote. - Set the Directory, then click Clone or Download.
The new project opens with the repository active in the Dataform panel, and its packages are installed. The source also decides how you commit: see Commit and push to Git.
Add a SQLX file
Right-click a folder in the Project view and choose New ▸ SQLX File, or use File ▸ New ▸ SQLX File. Enter a name and pick a template in the New SQLX File dialog:
| Template | Creates |
|---|---|
| Table | A table action with a sample SELECT. |
| View | A view action with a sample SELECT. |
| Incremental table | An incremental action with a uniqueKey and a when(incremental(), …) filter. |
| Assertion | An assertion action with a query selecting the rows that fail. |
| Operations | An operations action with hasOutput: false and a placeholder statement. |
| Declaration | A declaration of a table the project reads but does not create. |
| Unit test | A test action with an input block and the expected output. See Unit tests. |
Disabled actions
A SQLX file whose action declares disabled: true keeps its place in the Project view, with a greyed
out icon and a disabled hint next to its name.