MCP Tools Reference: dataform.googleapis.com

Tool: query_compilation_actions

Return the compilation result actions for a given Dataform compilation result.

The name parameter value must be in the format projects/{project_id}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}.

The following sample demonstrate how to use curl to invoke the query_compilation_actions MCP tool.

Curl Request
                  
curl --location 'https://dataform.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "query_compilation_actions",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

QueryCompilationResultActions request message.

QueryCompilationResultActionsRequest

JSON representation
{
  "name": string,
  "pageSize": integer,
  "pageToken": string,
  "filter": string
}
Fields
name

string

Required. The compilation result's name.

pageSize

integer

Optional. Maximum number of compilation results to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default.

pageToken

string

Optional. Page token received from a previous QueryCompilationResultActions call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to QueryCompilationResultActions, with the exception of page_size, must match the call that provided the page token.

filter

string

Optional. Optional filter for the returned list. Filtering is only currently supported on the file_path field.

Output Schema

QueryCompilationResultActions response message.

QueryCompilationResultActionsResponse

JSON representation
{
  "compilationResultActions": [
    {
      object (CompilationResultAction)
    }
  ],
  "nextPageToken": string
}
Fields
compilationResultActions[]

object (CompilationResultAction)

List of compilation result actions.

nextPageToken

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

CompilationResultAction

JSON representation
{
  "target": {
    object (Target)
  },
  "canonicalTarget": {
    object (Target)
  },
  "filePath": string,

  // Union field compiled_object can be only one of the following:
  "relation": {
    object (Relation)
  },
  "operations": {
    object (Operations)
  },
  "assertion": {
    object (Assertion)
  },
  "declaration": {
    object (Declaration)
  },
  "notebook": {
    object (Notebook)
  },
  "dataPreparation": {
    object (DataPreparation)
  }
  // End of list of possible types for union field compiled_object.

  // Union field _internal_metadata can be only one of the following:
  "internalMetadata": string
  // End of list of possible types for union field _internal_metadata.
}
Fields
target

object (Target)

This action's identifier. Unique within the compilation result.

canonicalTarget

object (Target)

The action's identifier if the project had been compiled without any overrides configured. Unique within the compilation result.

filePath

string

The full path including filename in which this action is located, relative to the workspace root.

Union field compiled_object. The compiled object. compiled_object can be only one of the following:
relation

object (Relation)

The database relation created/updated by this action.

operations

object (Operations)

The database operations executed by this action.

assertion

object (Assertion)

The assertion executed by this action.

declaration

object (Declaration)

The declaration declared by this action.

notebook

object (Notebook)

The notebook executed by this action.

dataPreparation

object (DataPreparation)

The data preparation executed by this action.

Union field _internal_metadata.

_internal_metadata can be only one of the following:

internalMetadata

string

Output only. All the metadata information that is used internally to serve the resource. For example: timestamps, flags, status fields, etc. The format of this field is a JSON string.

Relation

JSON representation
{
  "dependencyTargets": [
    {
      object (Target)
    }
  ],
  "disabled": boolean,
  "tags": [
    string
  ],
  "relationDescriptor": {
    object (RelationDescriptor)
  },
  "relationType": enum (RelationType),
  "selectQuery": string,
  "preOperations": [
    string
  ],
  "postOperations": [
    string
  ],
  "incrementalTableConfig": {
    object (IncrementalTableConfig)
  },
  "partitionExpression": string,
  "clusterExpressions": [
    string
  ],
  "partitionExpirationDays": integer,
  "requirePartitionFilter": boolean,
  "additionalOptions": {
    string: string,
    ...
  },
  "connection": string,
  "tableFormat": enum (TableFormat),
  "fileFormat": enum (FileFormat),
  "storageUri": string
}
Fields
dependencyTargets[]

object (Target)

A list of actions that this action depends on.

disabled

boolean

Whether this action is disabled (i.e. should not be run).

tags[]

string

Arbitrary, user-defined tags on this action.

relationDescriptor

object (RelationDescriptor)

Descriptor for the relation and its columns.

relationType

enum (RelationType)

The type of this relation.

selectQuery

string

The SELECT query which returns rows which this relation should contain.

preOperations[]

string

SQL statements to be executed before creating the relation.

postOperations[]

string

SQL statements to be executed after creating the relation.

incrementalTableConfig

object (IncrementalTableConfig)

Configures INCREMENTAL_TABLE settings for this relation. Only set if relation_type is INCREMENTAL_TABLE.

partitionExpression

string

The SQL expression used to partition the relation.

clusterExpressions[]

string

A list of columns or SQL expressions used to cluster the table.

partitionExpirationDays

integer

Sets the partition expiration in days.

requirePartitionFilter

boolean

Specifies whether queries on this table must include a predicate filter that filters on the partitioning column.

additionalOptions

map (key: string, value: string)

Additional options that will be provided as key/value pairs into the options clause of a create table/view statement. See https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language for more information on which options are supported.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

connection

string

Optional. The connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage. The connection can have the form {project}.{location}.{connection_id} or projects/{project}/locations/{location}/connections/{connection_id}, or be set to DEFAULT.

tableFormat

enum (TableFormat)

Optional. The table format for the BigQuery table.

fileFormat

enum (FileFormat)

Optional. The file format for the BigQuery table.

storageUri

string

Optional. The fully qualified location prefix of the external folder where table data is stored. The URI should be in the format gs://bucket/path_to_table/.

Target

JSON representation
{
  "database": string,
  "schema": string,
  "name": string
}
Fields
database

string

Optional. The action's database (Google Cloud project ID) .

schema

string

Optional. The action's schema (BigQuery dataset ID), within database.

name

string

Optional. The action's name, within database and schema.

RelationDescriptor

JSON representation
{
  "description": string,
  "columns": [
    {
      object (ColumnDescriptor)
    }
  ],
  "bigqueryLabels": {
    string: string,
    ...
  }
}
Fields
description

string

A text description of the relation.

columns[]

object (ColumnDescriptor)

A list of descriptions of columns within the relation.

bigqueryLabels

map (key: string, value: string)

A set of BigQuery labels that should be applied to the relation.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

ColumnDescriptor

JSON representation
{
  "path": [
    string
  ],
  "description": string,
  "bigqueryPolicyTags": [
    string
  ]
}
Fields
path[]

string

The identifier for the column. Each entry in path represents one level of nesting.

description

string

A textual description of the column.

bigqueryPolicyTags[]

string

A list of BigQuery policy tags that will be applied to the column.

BigqueryLabelsEntry

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

value

string

IncrementalTableConfig

JSON representation
{
  "incrementalSelectQuery": string,
  "refreshDisabled": boolean,
  "uniqueKeyParts": [
    string
  ],
  "updatePartitionFilter": string,
  "incrementalPreOperations": [
    string
  ],
  "incrementalPostOperations": [
    string
  ]
}
Fields
incrementalSelectQuery

string

The SELECT query which returns rows which should be inserted into the relation if it already exists and is not being refreshed.

refreshDisabled

boolean

Whether this table should be protected from being refreshed.

uniqueKeyParts[]

string

A set of columns or SQL expressions used to define row uniqueness. If any duplicates are discovered (as defined by unique_key_parts), only the newly selected rows (as defined by incremental_select_query) will be included in the relation.

updatePartitionFilter

string

A SQL expression conditional used to limit the set of existing rows considered for a merge operation (see unique_key_parts for more information).

incrementalPreOperations[]

string

SQL statements to be executed before inserting new rows into the relation.

incrementalPostOperations[]

string

SQL statements to be executed after inserting new rows into the relation.

AdditionalOptionsEntry

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

value

string

Operations

JSON representation
{
  "dependencyTargets": [
    {
      object (Target)
    }
  ],
  "disabled": boolean,
  "tags": [
    string
  ],
  "relationDescriptor": {
    object (RelationDescriptor)
  },
  "queries": [
    string
  ],
  "hasOutput": boolean
}
Fields
dependencyTargets[]

object (Target)

A list of actions that this action depends on.

disabled

boolean

Whether this action is disabled (i.e. should not be run).

tags[]

string

Arbitrary, user-defined tags on this action.

relationDescriptor

object (RelationDescriptor)

Descriptor for any output relation and its columns. Only set if has_output is true.

queries[]

string

A list of arbitrary SQL statements that will be executed without alteration.

hasOutput

boolean

Whether these operations produce an output relation.

Assertion

JSON representation
{
  "dependencyTargets": [
    {
      object (Target)
    }
  ],
  "parentAction": {
    object (Target)
  },
  "disabled": boolean,
  "tags": [
    string
  ],
  "selectQuery": string,
  "relationDescriptor": {
    object (RelationDescriptor)
  }
}
Fields
dependencyTargets[]

object (Target)

A list of actions that this action depends on.

parentAction

object (Target)

The parent action of this assertion. Only set if this assertion was automatically generated.

disabled

boolean

Whether this action is disabled (i.e. should not be run).

tags[]

string

Arbitrary, user-defined tags on this action.

selectQuery

string

The SELECT query which must return zero rows in order for this assertion to succeed.

relationDescriptor

object (RelationDescriptor)

Descriptor for the assertion's automatically-generated view and its columns.

Declaration

JSON representation
{
  "relationDescriptor": {
    object (RelationDescriptor)
  }
}
Fields
relationDescriptor

object (RelationDescriptor)

Descriptor for the relation and its columns. Used as documentation only, i.e. values here will result in no changes to the relation's metadata.

Notebook

JSON representation
{
  "dependencyTargets": [
    {
      object (Target)
    }
  ],
  "disabled": boolean,
  "contents": string,
  "tags": [
    string
  ]
}
Fields
dependencyTargets[]

object (Target)

A list of actions that this action depends on.

disabled

boolean

Whether this action is disabled (i.e. should not be run).

contents

string

The contents of the notebook.

tags[]

string

Arbitrary, user-defined tags on this action.

DataPreparation

JSON representation
{
  "dependencyTargets": [
    {
      object (Target)
    }
  ],
  "disabled": boolean,
  "tags": [
    string
  ],

  // Union field definition can be only one of the following:
  "contentsYaml": string,
  "contentsSql": {
    object (SqlDefinition)
  }
  // End of list of possible types for union field definition.
}
Fields
dependencyTargets[]

object (Target)

A list of actions that this action depends on.

disabled

boolean

Whether this action is disabled (i.e. should not be run).

tags[]

string

Arbitrary, user-defined tags on this action.

Union field definition. The definition for the data preparation. definition can be only one of the following:
contentsYaml

string

The data preparation definition, stored as a YAML string.

contentsSql

object (SqlDefinition)

SQL definition for a Data Preparation. Contains a SQL query and additional context information.

SqlDefinition

JSON representation
{
  "query": string,
  "errorTable": {
    object (ErrorTable)
  },
  "load": {
    object (LoadConfig)
  }
}
Fields
query

string

The SQL query representing the data preparation steps. Formatted as a Pipe SQL query statement.

errorTable

object (ErrorTable)

Error table configuration,

load

object (LoadConfig)

Load configuration.

ErrorTable

JSON representation
{
  "target": {
    object (Target)
  },
  "retentionDays": integer
}
Fields
target

object (Target)

Error Table target.

retentionDays

integer

Error table partition expiration in days. Only positive values are allowed.

LoadConfig

JSON representation
{

  // Union field mode can be only one of the following:
  "replace": {
    object (SimpleLoadMode)
  },
  "append": {
    object (SimpleLoadMode)
  },
  "maximum": {
    object (IncrementalLoadMode)
  },
  "unique": {
    object (IncrementalLoadMode)
  }
  // End of list of possible types for union field mode.
}
Fields
Union field mode. Load mode mode can be only one of the following:
replace

object (SimpleLoadMode)

Replace destination table

append

object (SimpleLoadMode)

Append into destination table

maximum

object (IncrementalLoadMode)

Insert records where the value exceeds the previous maximum value for a column in the destination table

unique

object (IncrementalLoadMode)

Insert records where the value of a column is not already present in the destination table

IncrementalLoadMode

JSON representation
{
  "column": string
}
Fields
column

string

Column name for incremental load modes

RelationType

Indicates the type of this relation.

Enums
RELATION_TYPE_UNSPECIFIED Default value. This value is unused.
TABLE The relation is a table.
VIEW The relation is a view.
INCREMENTAL_TABLE The relation is an incrementalized table.
MATERIALIZED_VIEW The relation is a materialized view.

TableFormat

Supported table formats for BigQuery tables.

Enums
TABLE_FORMAT_UNSPECIFIED Default value.
ICEBERG Apache Iceberg format.

FileFormat

Supported file formats for BigQuery tables.

Enums
FILE_FORMAT_UNSPECIFIED Default value.
PARQUET Apache Parquet format.

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌