Deployments let you schedule code to run—for example, pipelines—that's stored in remote Git repositories. You can choose the directory where your code is located and perform the following actions:
- Create and manage deployments connected to remote repositories.
- Configure triggers to pull code from remote repositories and run code on a regular basis.
- Run pipelines on a schedule or with other triggers.
- View logs of your executions directly within the Google Cloud console. For alerting, Dataform deployments integrate with Cloud Logging and Cloud Monitoring.
Limitations
- Deployments don't have built-in alerting. You must use Logging and Monitoring to configure alerts.
- Authentication with Developer Connect only supports connections and not account connectors.
Before you begin
Before you create a deployment, complete the following tasks:
- Opt in to using the Pipelines & Connections page in the Google Cloud console.
Enable the BigQuery API, Dataform API, and Developer Connect API:
Required roles
To get the permissions that you need to complete the tasks in this document, ask your administrator to grant you the following IAM roles:
- Dataform Admin (
roles/dataform.admin) on the project - BigQuery Job User (
roles/bigquery.jobUser) on the project - Developer Connect Viewer (
roles/developerconnect.viewer) on the project -
Use a custom service account to run a deployment:
Service Account User (
roles/iam.serviceAccountUser) on the custom service account
For more information about granting roles, see Manage access to projects, folders, and organizations.
You might also be able to get the required permissions through custom roles or other predefined roles.
To use a custom service account to run a deployment, you must also grant the
BigQuery Data Editor role
(roles/bigquery.dataEditor) to the custom service account.
Create a deployment
To create a Dataform deployment, do the following:
In the Google Cloud console, go to the Pipelines & Connections page.
Click Create > Create deployment.
Select a repository authentication type, and then select one of the following options:
Developer Connect
- Select a repository and branch.
- Enter the path for the directory where the code is located.
- Enter a name for the deployment.
- Select a region for the deployment.
In the Schedule frequency section, do the following:
- In the Repeats menu, select the frequency of scheduled pipeline runs.
- In the At time field, enter the time for scheduled pipeline runs.
- In the Timezone menu, select the time zone for the schedule.
Alternatively, select On-demand to run your deployment on demand.
Optional: Enter the Google Cloud project ID.
Optional: Enter a schema suffix.
Optional: Enter a table prefix.
Optional: Enter the default schema.
Optional: Enter compilation variables.
Click Deploy.
HTTPS
- Enter the URL of your remote Git repository.
- Select a branch.
- Enter the path for the directory where the code is located.
- Enter the secret containing the personal access token for HTTPS remotes. For more information, see Connect a remote repository through HTTPS.
- Enter a name for the deployment.
- Select a region for the deployment.
In the Schedule frequency section, do the following:
- In the Repeats menu, select the frequency of scheduled pipeline runs.
- In the At time field, enter the time for scheduled pipeline runs.
- In the Timezone menu, select the time zone for the schedule.
Alternatively, select On-demand to run your deployment on demand.
Optional: Enter the Google Cloud project ID.
Optional: Enter a schema suffix.
Optional: Enter a table prefix.
Optional: Enter the default schema.
Optional: Enter compilation variables.
Click Deploy.
SSH
- Enter the URL of your remote Git repository.
- Select a branch.
- Enter the path for the directory where the code is located.
- Enter the secret containing a user private key and the SSH public host key value. For more information, see Connect a remote repository through SSH.
- Enter a name for the deployment.
- Select a region for the deployment.
In the Schedule frequency section, do the following:
- In the Repeats menu, select the frequency of scheduled pipeline runs.
- In the At time field, enter the time for scheduled pipeline runs.
- In the Timezone menu, select the time zone for the schedule.
Alternatively, select On-demand to run your deployment on demand.
Optional: Enter the Google Cloud project ID.
Optional: Enter a schema suffix.
Optional: Enter a table prefix.
Optional: Enter the default schema.
Optional: Enter compilation variables.
Click Deploy.
List deployments
To list the created deployments, do the following:
In the Google Cloud console, go to the Pipelines & Connections page.
View the list of deployments.
Create a deployment schedule
To create a schedule for a deployment, do the following:
In the Google Cloud console, go to the Pipelines & Connections page.
Click the Deployments tab, and then select a deployment.
On the Deployment details page, in the Triggers (workflow configurations) section, click Create.
In the Create workflow configuration pane, follow the steps to create a workflow configuration.
Run a deployment schedule
To run a schedule for a deployment, do the following:
In the Google Cloud console, go to the Pipelines & Connections page.
Click the Deployments tab and then select a deployment.
In the Triggers (workflow configurations) section, next to the deployment schedule that you want to run, click View actions > Run now.
Delete a deployment schedule
To delete a schedule for a deployment, do the following:
In the Google Cloud console, go to the Pipelines & Connections page.
Click the Deployments tab, and then select a deployment.
On the Deployment details page, in the Triggers (workflow configurations) section, next to the deployment schedule that you want to delete, click View actions > Delete.
Configure alerts
To receive notifications when a workflow run fails, configure alerts for failed workflow invocations.
What's next
- Learn how to create a repository.
- Learn how to schedule runs.
- Learn how to configure alerts.