Update the Dataform core package

This document shows you how to update Dataform core to the latest version.

Dataform core is the open-source Dataform framework for developing SQL workflows with SQLX and JavaScript.

When you initialize the first workspace in a repository, Dataform automatically installs Dataform core as a dependency package in the package.json file.

We recommend that you always use the latest available version of the Dataform core framework. For information about releases of the Dataform core framework, see Dataform releases on GitHub.

To prevent issues with package installation in your production environment, we recommend that you do the following:

  • Explicitly specify the Dataform core package version in package.json, for example, 3.0.0. Don't use other dependencies options of package.json, for example, >version.

  • Test new package versions in a non-production environment. For more information about configuring different code lifecycle environments, see Managing code lifecycle.

Before you begin

  1. Create a repository.
  2. Create and initialize a development workspace.

Required roles

To get the permissions that you need to update Dataform, ask your administrator to grant you the Dataform Editor (roles/dataform.editor) IAM role on workspaces. For more information about granting roles, see Manage access.

You might also be able to get the required permissions through custom roles or other predefined roles.

Update Dataform core

  1. Look up the latest version of @dataform/core on the Dataform releases page on GitHub.

  2. In the Google Cloud console, go to the Dataform page.

    Go to the Dataform page

  3. Select a repository, and then select a workspace.

  4. In the Files pane, open the package.json file.

  5. Update the @dataform/core dependency with the latest Dataform version in the following format:

    {
        "dependencies": {
            "@dataform/core": "VERSION"
        }
    }
    

    Replace VERSION with the latest version of Dataform, for example, 3.0.0.

  6. Click Install packages.

  7. Commit changes.

  8. Push changes to your repository.

The following code sample shows the @dataform/core dependency updated to the 3.0.0 version in the package.json file:

{
    "dependencies": {
        "@dataform/core": "3.0.0"
    }
}

What's next