- [HTTP request](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#body.request_body)
- [Response body](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#body.QueryCompilationResultActionsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#body.aspect_1)
- [CompilationResultAction](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#CompilationResultAction)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#CompilationResultAction.SCHEMA_REPRESENTATION)
- [Relation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Relation)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Relation.SCHEMA_REPRESENTATION)
- [RelationDescriptor](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationDescriptor)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationDescriptor.SCHEMA_REPRESENTATION)
- [ColumnDescriptor](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#ColumnDescriptor)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#ColumnDescriptor.SCHEMA_REPRESENTATION)
- [RelationType](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationType)
- [IncrementalTableConfig](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#IncrementalTableConfig)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#IncrementalTableConfig.SCHEMA_REPRESENTATION)
- [TableFormat](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#TableFormat)
- [FileFormat](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#FileFormat)
- [Operations](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Operations)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Operations.SCHEMA_REPRESENTATION)
- [Assertion](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Assertion)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Assertion.SCHEMA_REPRESENTATION)
- [Declaration](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Declaration)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Declaration.SCHEMA_REPRESENTATION)
- [Notebook](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Notebook)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Notebook.SCHEMA_REPRESENTATION)
- [DataPreparation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#DataPreparation)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#DataPreparation.SCHEMA_REPRESENTATION)
- [SqlDefinition](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#SqlDefinition)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#SqlDefinition.SCHEMA_REPRESENTATION)
- [ErrorTable](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#ErrorTable)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#ErrorTable.SCHEMA_REPRESENTATION)
- [LoadConfig](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#LoadConfig)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#LoadConfig.SCHEMA_REPRESENTATION)
- [SimpleLoadMode](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#SimpleLoadMode)
- [IncrementalLoadMode](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#IncrementalLoadMode)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#IncrementalLoadMode.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#try-it)

Returns CompilationResultActions in a given CompilationResult.

### HTTP request

Choose a location:
<button value="global" default="">global</button> <button value="africa-south1">africa-south1</button> <button value="asia-east1">asia-east1</button> <button value="asia-east2">asia-east2</button> <button value="asia-northeast1">asia-northeast1</button> <button value="asia-northeast2">asia-northeast2</button> <button value="asia-northeast3">asia-northeast3</button> <button value="asia-south1">asia-south1</button> <button value="asia-south2">asia-south2</button> <button value="asia-southeast1">asia-southeast1</button> <button value="asia-southeast2">asia-southeast2</button> <button value="australia-southeast1">australia-southeast1</button> <button value="australia-southeast2">australia-southeast2</button> <button value="europe-central2">europe-central2</button> <button value="europe-north1">europe-north1</button> <button value="europe-southwest1">europe-southwest1</button> <button value="europe-west1">europe-west1</button> <button value="europe-west10">europe-west10</button> <button value="europe-west12">europe-west12</button> <button value="europe-west2">europe-west2</button> <button value="europe-west3">europe-west3</button> <button value="europe-west4">europe-west4</button> <button value="europe-west6">europe-west6</button> <button value="europe-west8">europe-west8</button> <button value="europe-west9">europe-west9</button> <button value="me-central1">me-central1</button> <button value="me-central2">me-central2</button> <button value="me-west1">me-west1</button> <button value="northamerica-northeast1">northamerica-northeast1</button> <button value="northamerica-northeast2">northamerica-northeast2</button> <button value="southamerica-east1">southamerica-east1</button> <button value="southamerica-west1">southamerica-west1</button> <button value="us-central1">us-central1</button> <button value="us-east1">us-east1</button> <button value="us-east4">us-east4</button> <button value="us-east5">us-east5</button> <button value="us-south1">us-south1</button> <button value="us-west1">us-west1</button> <button value="us-west2">us-west2</button> <button value="us-west3">us-west3</button> <button value="us-west4">us-west4</button>   
`GET https://dataform.googleapis.com/v1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The compilation result's name. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `dataform.compilationResults.query` |

### Query parameters

| Parameters ||
|---|---|
| `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 `compilationResults.query` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `compilationResults.query`, with the exception of `pageSize`, 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 `filePath` field. |

### Request body

The request body must be empty.

### Response body

`compilationResults.query` response message.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "compilationResultActions": [ { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#CompilationResultAction`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `compilationResultActions[]` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#CompilationResultAction`)`` List of compilation result actions. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/bigquery`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `dataform.compilationResults.query`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## CompilationResultAction

Represents a single Dataform action in a compilation result.

| JSON representation |
|---|
| ``` { "target": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) }, "canonicalTarget": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) }, "filePath": string, // Union field `compiled_object` can be only one of the following: "relation": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Relation`) }, "operations": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Operations`) }, "assertion": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Assertion`) }, "declaration": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Declaration`) }, "notebook": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Notebook`) }, "dataPreparation": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#DataPreparation`) } // End of list of possible types for union field `compiled_object`. "internalMetadata": string } ``` |

| Fields ||
|---|---|
| `target` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`)`` This action's identifier. Unique within the compilation result. |
| `canonicalTarget` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/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 (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Relation`)`` The database relation created/updated by this action. |
| `operations` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Operations`)`` The database operations executed by this action. |
| `assertion` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Assertion`)`` The assertion executed by this action. |
| `declaration` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Declaration`)`` The declaration declared by this action. |
| `notebook` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#Notebook`)`` The notebook executed by this action. |
| `dataPreparation` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#DataPreparation`)`` The data preparation executed by this action. |
| `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

Represents a database relation.

| JSON representation |
|---|
| ``` { "dependencyTargets": [ { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) } ], "disabled": boolean, "tags": [ string ], "relationDescriptor": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationDescriptor`) }, "relationType": enum (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationType`), "selectQuery": string, "preOperations": [ string ], "postOperations": [ string ], "incrementalTableConfig": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#IncrementalTableConfig`) }, "partitionExpression": string, "clusterExpressions": [ string ], "partitionExpirationDays": integer, "requirePartitionFilter": boolean, "additionalOptions": { string: string, ... }, "connection": string, "tableFormat": enum (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#TableFormat`), "fileFormat": enum (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#FileFormat`), "storageUri": string } ``` |

| Fields ||
|---|---|
| `dependencyTargets[]` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/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 (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationDescriptor`)`` Descriptor for the relation and its columns. |
| `relationType` | ``enum (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#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 (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#IncrementalTableConfig`)`` Configures `INCREMENTAL_TABLE` settings for this relation. Only set if `relationType` 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 (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#TableFormat`)`` Optional. The table format for the BigQuery table. |
| `fileFormat` | ``enum (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#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/`. |

## RelationDescriptor

Describes a relation and its columns.

| JSON representation |
|---|
| ``` { "description": string, "columns": [ { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#ColumnDescriptor`) } ], "bigqueryLabels": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `description` | `string` A text description of the relation. |
| `columns[]` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#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

Describes a column.

| 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. |

## 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. |

## IncrementalTableConfig

Contains settings for relations of type `INCREMENTAL_TABLE`.

| 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 `uniqueKeyParts`), only the newly selected rows (as defined by `incrementalSelectQuery`) 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 `uniqueKeyParts` 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. |

## 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. |

## Operations

Represents a list of arbitrary database operations.

| JSON representation |
|---|
| ``` { "dependencyTargets": [ { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) } ], "disabled": boolean, "tags": [ string ], "relationDescriptor": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationDescriptor`) }, "queries": [ string ], "hasOutput": boolean } ``` |

| Fields ||
|---|---|
| `dependencyTargets[]` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/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 (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationDescriptor`)`` Descriptor for any output relation and its columns. Only set if `hasOutput` 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

Represents an assertion upon a SQL query which is required return zero rows.

| JSON representation |
|---|
| ``` { "dependencyTargets": [ { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) } ], "parentAction": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) }, "disabled": boolean, "tags": [ string ], "selectQuery": string, "relationDescriptor": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationDescriptor`) } } ``` |

| Fields ||
|---|---|
| `dependencyTargets[]` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`)`` A list of actions that this action depends on. |
| `parentAction` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/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 (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationDescriptor`)`` Descriptor for the assertion's automatically-generated view and its columns. |

## Declaration

Represents a relation which is not managed by Dataform but which may be referenced by Dataform actions.

| JSON representation |
|---|
| ``` { "relationDescriptor": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#RelationDescriptor`) } } ``` |

| Fields ||
|---|---|
| `relationDescriptor` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#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

Represents a notebook.

| JSON representation |
|---|
| ``` { "dependencyTargets": [ { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) } ], "disabled": boolean, "contents": string, "tags": [ string ] } ``` |

| Fields ||
|---|---|
| `dependencyTargets[]` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/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

Defines a compiled Data Preparation entity

| JSON representation |
|---|
| ``` { "dependencyTargets": [ { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) } ], "disabled": boolean, "tags": [ string ], // Union field `definition` can be only one of the following: "contentsYaml": string, "contentsSql": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#SqlDefinition`) } // End of list of possible types for union field `definition`. } ``` |

| Fields ||
|---|---|
| `dependencyTargets[]` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/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 (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#SqlDefinition`)`` SQL definition for a Data Preparation. Contains a SQL query and additional context information. |

## SqlDefinition

Definition of a SQL Data Preparation

| JSON representation |
|---|
| ``` { "query": string, "errorTable": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#ErrorTable`) }, "load": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#LoadConfig`) } } ``` |

| Fields ||
|---|---|
| `query` | `string` The SQL query representing the data preparation steps. Formatted as a Pipe SQL query statement. |
| `errorTable` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#ErrorTable`)`` Error table configuration, |
| `load` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#LoadConfig`)`` Load configuration. |

## ErrorTable

Error table information, used to write error data into a BigQuery table.

| JSON representation |
|---|
| ``` { "target": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) }, "retentionDays": integer } ``` |

| Fields ||
|---|---|
| `target` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`)`` Error Table target. |
| `retentionDays` | `integer` Error table partition expiration in days. Only positive values are allowed. |

## LoadConfig

Simplified load configuration for actions

| JSON representation |
|---|
| ``` { // Union field `mode` can be only one of the following: "replace": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#SimpleLoadMode`) }, "append": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#SimpleLoadMode`) }, "maximum": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#IncrementalLoadMode`) }, "unique": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#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 (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#SimpleLoadMode`)`` Replace destination table |
| `append` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#SimpleLoadMode`)`` Append into destination table |
| `maximum` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#IncrementalLoadMode`)`` Insert records where the value exceeds the previous maximum value for a column in the destination table |
| `unique` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.compilationResults/query#IncrementalLoadMode`)`` Insert records where the value of a column is not already present in the destination table |

## SimpleLoadMode

This type has no fields.
Simple load definition

## IncrementalLoadMode

Load definition for incremental load modes

| JSON representation |
|---|
| ``` { "column": string } ``` |

| Fields ||
|---|---|
| `column` | `string` Column name for incremental load modes |