Method: projects.locations.repositories.compilationResults.query

Returns CompilationResultActions in a given CompilationResult.

HTTP request

GET https://dataform.googleapis.com/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The compilation result's name.

Authorization requires the following IAM 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 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 (CompilationResultAction)
    }
  ],
  "nextPageToken": string
}
Fields
compilationResultActions[]

object (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 the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • dataform.compilationResults.query

For more information, see the IAM documentation.

CompilationResultAction

Represents a single Dataform action in a compilation result.

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)
  }
  // End of list of possible types for union field compiled_object.
}
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.

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.

Relation

Represents a database 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,
    ...
  }
}
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 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" }.

RelationDescriptor

Describes a relation and its columns.

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

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.

Operations

Represents a list of arbitrary database 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 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 (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

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

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.