This document shows you how to manually trigger runs of your entire
workflow or only selected elements in your workflow.

You can trigger a run for the following elements of your workflow:

- All actions in your workflow
- Selected actions
- Actions with selected tags

## Before you begin

1. In the Google Cloud console, go to the **Dataform** page.

   [Go to the Dataform page](https://console.cloud.google.com/bigquery/dataform)
2. Select or [create a repository](https://docs.cloud.google.com/dataform/docs/create-repository.md.txt).

3. Select or [create a development workspace](https://docs.cloud.google.com/dataform/docs/create-workspace.md.txt).

4. Develop your workflow.

### Required roles


To get the permissions that
you need to manually trigger a run,

ask your administrator to grant you the
following IAM roles:

- [Dataform Editor](https://docs.cloud.google.com/iam/docs/roles-permissions/dataform.md.txt#dataform.editor) (`roles/dataform.editor`) on the Dataform repository
- [BigQuery Job User](https://docs.cloud.google.com/iam/docs/roles-permissions/bigquery.md.txt#bigquery.jobUser) (`roles/bigquery.jobUser`) on the project
- [Service Account User](https://docs.cloud.google.com/iam/docs/roles-permissions/iam.md.txt#iam.serviceAccountUser) (`roles/iam.serviceAccountUser`) on the custom service account


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


You might also be able to get
the required permissions through [custom
roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or other [predefined
roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

> [!IMPORTANT]
> **Important:** If your organization enforces an organization policy constraint that disallows Google Account user credentials by denying setting `end_user_auth_config`, you cannot execute workflows using your Google Account user credentials. For more information, see [Create custom organization policy constraints](https://docs.cloud.google.com/dataform/docs/create-custom-constraints.md.txt).

## Manually run all the actions in your workflow

To manually trigger a run of all the actions in your workflow,
follow these steps:

1. Go to a development workspace.
2. Click **Start execution**.
3. Click **Actions \> Multiple actions**.
4. In the **Authentication** section, authorize the
   execution with your Google Account user credentials or a service
   account.

   - To use your Google Account user credentials, select
     **Execute with user credentials**.

     Optional: In the **Extended access options** section, select the
     additional scopes that your workflow requires:
     - **Knowledge Catalog**: Allows Google Cloud Knowledge Catalog metadata updates.
     - **Google Drive**: Allows read-only access to Google Drive files.
     - **Bigtable**: Allows read-only access to Google Bigtable data.
   - To use a custom service account, select
     **Execute with selected service account**, and then select a custom
     service account.

     > [!NOTE]
     > **Note:** To see service accounts in the menu, you must have the `iam.serviceAccounts.list` permission at the project level, which is available in the [View Service Accounts role](https://docs.cloud.google.com/iam/docs/roles-permissions/iam.md.txt#iam.serviceAccountViewer) (`roles/iam.serviceAccountViewer`). If you don't have this permission, you can select the service account by clicking **Enter manually** and entering the service account ID.

5. Select **All actions**.

6. Optional: To rebuild all tables from scratch, select the
   **Run with full refresh** option. Without this option, Dataform
   updates incremental tables without rebuilding them from scratch.

7. Optional: Set the BigQuery query job priority with the
   **Execute as interactive job with high priority (default)** option.
   By default, BigQuery runs queries as
   [interactive query jobs](https://docs.cloud.google.com/bigquery/docs/running-queries.md.txt#interactive-batch),
   which are intended to start running as quickly as possible.
   Clearing this option runs the queries as
   [batch query jobs](https://docs.cloud.google.com/bigquery/docs/running-queries.md.txt#interactive-batch),
   which have lower priority.

8. Optional: To limit how many actions can run concurrently during the
   execution, select **Limit concurrent actions** , and in **Maximum concurrent
   actions** , enter a whole number between `1` and `5000`.

   If the number of ready actions exceeds the configured limit,
   Dataform places the remaining ready actions in a queue
   until a concurrency slot becomes available.

   The concurrent actions limit isn't supported when executing unit tests.
9. Click **Start execution** . If you selected **Execute with user credentials**
   for your authentication method, you must
   [authorize your Google Account](https://docs.cloud.google.com/dataform/docs/trigger-execution.md.txt#authorize-google-account).

## Manually run selected actions

To manually trigger a run of selected actions, follow these steps:

1. Go to your development workspace.
2. Click **Start execution**, then do either of the following:

   - Click **Actions**, then select an action that you want to run.
   - Click **Actions \> Multiple actions**.
3. In the **Authentication** section, authorize the
   execution with your Google Account user credentials or a service
   account.

   - To use your Google Account user credentials, select
     **Execute with user credentials**.

     Optional: In the **Extended access options** section, select the
     additional services that your workflow requires:
     - **Knowledge Catalog**: Allows Google Cloud Knowledge Catalog metadata updates.
     - **Google Drive**: Allows read-only access to Google Drive files.
     - **Bigtable**: Allows read-only access to Google Bigtable data.
   - To use a custom service account, select
     **Execute with selected service account**, and then select a custom
     service account.

     > [!NOTE]
     > **Note:** To see service accounts in the menu, you must have the `iam.serviceAccounts.list` permission at the project level, which is available in the [View Service Accounts role](https://docs.cloud.google.com/iam/docs/roles-permissions/iam.md.txt#iam.serviceAccountViewer) (`roles/iam.serviceAccountViewer`). If you don't have this permission, you can select the service account by clicking **Enter manually** and entering the service account ID.

4. Verify that **Selection of actions** is selected.

5. In the **Select actions to execute** menu, select the actions
   that you want to run.

6. Optional: To run the selected actions and their dependencies,
   select the **Include dependencies** option.

7. Optional: To run the selected actions and the actions that
   depend on them, select the **Include dependents** option.

8. Optional: To rebuild all tables from scratch, select
   the **Run with full refresh** option.

9. Optional: Set the BigQuery query job priority with the
   **Execute as interactive job with high priority (default)** option.
   By default, BigQuery runs queries as
   [interactive query jobs](https://docs.cloud.google.com/bigquery/docs/running-queries.md.txt#interactive-batch),
   which are intended to start running as quickly as possible.
   Clearing this option runs the queries as
   [batch query jobs](https://docs.cloud.google.com/bigquery/docs/running-queries.md.txt#interactive-batch),
   which have lower priority.

10. Optional: To limit how many actions can run concurrently during the
    execution, select **Limit concurrent actions** , and in **Maximum concurrent
    actions** , enter a whole number between `1` and `5000`.

    If the number of ready actions exceeds the configured limit,
    Dataform places the remaining ready actions in a queue
    until a concurrency slot becomes available.

    The concurrent actions limit isn't supported when executing unit tests.
11. Click **Start execution** . If you selected **Execute with my user
    credentials** for your authentication method, you must
    [authorize your Google Account](https://docs.cloud.google.com/dataform/docs/trigger-execution.md.txt#authorize-google-account).

## Manually run actions with selected tags

To manually trigger a run of actions with selected tags, follow these
steps:

1. Go to your development workspace.
2. Click **Start execution**, then do either of the following:

   - Click **Tags**, then select a tag that you want to run.
   - Click **Tags \> Multiple tags**.
3. In the **Authentication** section, authorize the
   execution with your Google Account user credentials or a service
   account.

   - To use your Google Account user credentials, select
     **Execute with user credentials**.

     Optional: In the **Extended access options** section, select the
     additional services that your workflow requires:
     - **Knowledge Catalog**: Allows Google Cloud Knowledge Catalog metadata updates.
     - **Google Drive**: Allows read-only access to Google Drive files.
     - **Bigtable**: Allows read-only access to Google Bigtable data.
   - To use a custom service account, select
     **Execute with selected service account**, and then select a custom
     service account.

     > [!NOTE]
     > **Note:** To see service accounts in the menu, you must have the `iam.serviceAccounts.list` permission at the project level, which is available in the [View Service Accounts role](https://docs.cloud.google.com/iam/docs/roles-permissions/iam.md.txt#iam.serviceAccountViewer) (`roles/iam.serviceAccountViewer`). If you don't have this permission, you can select the service account by clicking **Enter manually** and entering the service account ID.

4. Verify that **Selection of tags** is selected.

5. In the **Select tags to execute** menu, select the tags
   that you want to run.

6. Optional: To run the actions with the selected tags and
   their dependencies, select the **Include dependencies** option.

7. Optional: To run the actions with the selected tags and the actions
   that depend on them, select the **Include dependents** option.

8. Optional: To rebuild all tables from scratch, select
   the **Run with full refresh** option. Without this option, Dataform
   updates incremental tables without rebuilding them from scratch.

9. Optional: Set the BigQuery query job priority with the
   **Execute as interactive job with high priority (default)** option.
   By default, BigQuery runs queries as
   [interactive query jobs](https://docs.cloud.google.com/bigquery/docs/running-queries.md.txt#interactive-batch),
   which are intended to start running as quickly as possible.
   Clearing this option runs the queries as
   [batch query jobs](https://docs.cloud.google.com/bigquery/docs/running-queries.md.txt#interactive-batch),
   which have lower priority.

10. Optional: To limit how many actions can run concurrently during the
    execution, select **Limit concurrent actions** , and in **Maximum concurrent
    actions** , enter a whole number between `1` and `5000`.

    If the number of ready actions exceeds the configured limit,
    Dataform places the remaining ready actions in a queue
    until a concurrency slot becomes available.

    The concurrent actions limit isn't supported when executing unit tests.
11. Click **Start execution** . If you selected **Execute with my user
    credentials** for your authentication method, you must
    [authorize your Google Account](https://docs.cloud.google.com/dataform/docs/trigger-execution.md.txt#authorize-google-account).

## Authorize your Google Account

To authenticate the resource with your
[Google Account](https://docs.cloud.google.com/iam/docs/principals-overview.md.txt#google-account)
user credentials, you must manually grant permission for BigQuery
pipelines to get the access token for your Google Account and access the source
data on your behalf. You can grant manual approval with the OAuth dialog
interface. If you select any **Extended access options**, you must grant access to those services---for example, Google Drive or Knowledge Catalog.

> [!NOTE]
> **Note:** Context-Aware Access (CAA) policies---including IP-based, geolocation-based, and device compliance policies---aren't supported when executing or scheduling BigQuery pipelines with user credentials for a Google Account, because the token requests originate from Google infrastructure. CAA policies block these executions unless the Dataform OAuth client ID is [exempted from the policies](https://docs.cloud.google.com/dataform/docs/troubleshooting.md.txt#euc-permission-denied).

You only need to give permission to BigQuery pipelines once.

To revoke the permission that you granted, follow these steps:

1. Go to your [Google Account page](https://myaccount.google.com/).
2. Click **BigQuery Pipelines**.
3. Click **Remove access**.

> [!WARNING]
> **Warning:** Revoking access permissions prevents any future pipeline runs that this Google Account owns across all regions.

## Limit concurrent actions

By default, Dataform executes all actions whose upstream
dependencies are satisfied in parallel. When a workflow contains many independent
actions, executing them all simultaneously can cause BigQuery rate
limit errors, deplete project quotas, or exhaust BigQuery slots.

To control resource contention without introducing artificial dependencies
between independent actions in SQLX, you can configure a maximum concurrent
actions limit on a manual execution or on a
[workflow configuration schedule](https://docs.cloud.google.com/dataform/docs/schedule-runs.md.txt#create-workflow-configuration).

When you configure a concurrent actions limit,
Dataform starts executing ready actions simultaneously
up to the set limit. Additional actions whose
upstream dependencies are satisfied enter the `QUEUED` state.
As running actions complete and concurrency slots
become available, Dataform starts queued actions in available
slots until all actions complete. If a workflow execution fails or is cancelled
while actions are queued, the queued actions are skipped.

The limit applies per workflow invocation. Each
execution tracks its own running actions independently.

The concurrent actions limit isn't supported
when executing unit tests.

## What's next

- To learn how Dataform runs incremental tables and how to configure an incremental table, see [Configure an incremental table](https://docs.cloud.google.com/dataform/docs/create-tables.md.txt#configure-incremental-table).
- To learn how to view execution logs, see [Monitor execution logs](https://docs.cloud.google.com/dataform/docs/monitor-runs.md.txt#monitor-execution-logs).
- To learn how to schedule runs with Workflows and Cloud Scheduler, see [Schedule runs with Workflows and Cloud Scheduler](https://docs.cloud.google.com/dataform/docs/schedule-runs.md.txt#workflows-cloud-scheduler).
- To learn how to schedule runs with Managed Service for Apache Airflow, see [Schedule runs with Managed Service for Apache Airflow](https://docs.cloud.google.com/dataform/docs/schedule-runs.md.txt#composer).