Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Creates a new CompilationResult in a given project and location.
Fetches a single CompilationResult.
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists CompilationResults in a given Repository.
Retrieves the next page of results.
query(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Returns CompilationResultActions in a given CompilationResult.
Retrieves the next page of results.
close()
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Creates a new CompilationResult in a given project and location.
Args:
parent: string, Required. The repository in which to create the compilation result. Must be in the format `projects/*/locations/*/repositories/*`. (required)
body: object, The request body.
The object takes the form of:
{ # Represents the result of compiling a Dataform project.
"codeCompilationConfig": { # Configures various aspects of Dataform code compilation. # Immutable. If set, fields of `code_compilation_config` override the default compilation settings that are specified in dataform.json.
"assertionSchema": "A String", # Optional. The default schema (BigQuery dataset ID) for assertions.
"databaseSuffix": "A String", # Optional. The suffix that should be appended to all database (Google Cloud project ID) names.
"defaultDatabase": "A String", # Optional. The default database (Google Cloud project ID).
"defaultLocation": "A String", # Optional. The default BigQuery location to use. Defaults to "US". See the BigQuery docs for a full list of locations: https://cloud.google.com/bigquery/docs/locations.
"defaultNotebookRuntimeOptions": {
"gcsOutputBucket": "A String", # Optional. The GCS location to upload the result to. Format: `gs://bucket-name`.
},
"defaultSchema": "A String", # Optional. The default schema (BigQuery dataset ID).
"schemaSuffix": "A String", # Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names.
"tablePrefix": "A String", # Optional. The prefix that should be prepended to all table names.
"vars": { # Optional. User-defined variables that are made available to project code during compilation.
"a_key": "A String",
},
},
"compilationErrors": [ # Output only. Errors encountered during project compilation.
{ # An error encountered when attempting to compile a Dataform project.
"actionTarget": { # Represents an action identifier. If the action writes output, the output will be written to the referenced database object. # Output only. The identifier of the action where this error occurred, if available.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
"message": "A String", # Output only. The error's top level message.
"path": "A String", # Output only. The path of the file where this error occurred, if available, relative to the project root.
"stack": "A String", # Output only. The error's full stack trace.
},
],
"createTime": "A String", # Output only. The timestamp of when the compilation result was created.
"dataEncryptionState": { # Describes encryption state of a resource. # Output only. Only set if the repository has a KMS Key.
"kmsKeyVersionName": "A String", # The KMS key version name with which data of a resource is encrypted.
},
"dataformCoreVersion": "A String", # Output only. The version of `@dataform/core` that was used for compilation.
"gitCommitish": "A String", # Immutable. Git commit/tag/branch name at which the repository should be compiled. Must exist in the remote repository. Examples: - a commit SHA: `12ade345` - a tag: `tag1` - a branch name: `branch1`
"name": "A String", # Output only. The compilation result's name.
"releaseConfig": "A String", # Immutable. The name of the release config to compile. Must be in the format `projects/*/locations/*/repositories/*/releaseConfigs/*`.
"resolvedGitCommitSha": "A String", # Output only. The fully resolved Git commit SHA of the code that was compiled. Not set for compilation results whose source is a workspace.
"workspace": "A String", # Immutable. The name of the workspace to compile. Must be in the format `projects/*/locations/*/repositories/*/workspaces/*`.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents the result of compiling a Dataform project.
"codeCompilationConfig": { # Configures various aspects of Dataform code compilation. # Immutable. If set, fields of `code_compilation_config` override the default compilation settings that are specified in dataform.json.
"assertionSchema": "A String", # Optional. The default schema (BigQuery dataset ID) for assertions.
"databaseSuffix": "A String", # Optional. The suffix that should be appended to all database (Google Cloud project ID) names.
"defaultDatabase": "A String", # Optional. The default database (Google Cloud project ID).
"defaultLocation": "A String", # Optional. The default BigQuery location to use. Defaults to "US". See the BigQuery docs for a full list of locations: https://cloud.google.com/bigquery/docs/locations.
"defaultNotebookRuntimeOptions": {
"gcsOutputBucket": "A String", # Optional. The GCS location to upload the result to. Format: `gs://bucket-name`.
},
"defaultSchema": "A String", # Optional. The default schema (BigQuery dataset ID).
"schemaSuffix": "A String", # Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names.
"tablePrefix": "A String", # Optional. The prefix that should be prepended to all table names.
"vars": { # Optional. User-defined variables that are made available to project code during compilation.
"a_key": "A String",
},
},
"compilationErrors": [ # Output only. Errors encountered during project compilation.
{ # An error encountered when attempting to compile a Dataform project.
"actionTarget": { # Represents an action identifier. If the action writes output, the output will be written to the referenced database object. # Output only. The identifier of the action where this error occurred, if available.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
"message": "A String", # Output only. The error's top level message.
"path": "A String", # Output only. The path of the file where this error occurred, if available, relative to the project root.
"stack": "A String", # Output only. The error's full stack trace.
},
],
"createTime": "A String", # Output only. The timestamp of when the compilation result was created.
"dataEncryptionState": { # Describes encryption state of a resource. # Output only. Only set if the repository has a KMS Key.
"kmsKeyVersionName": "A String", # The KMS key version name with which data of a resource is encrypted.
},
"dataformCoreVersion": "A String", # Output only. The version of `@dataform/core` that was used for compilation.
"gitCommitish": "A String", # Immutable. Git commit/tag/branch name at which the repository should be compiled. Must exist in the remote repository. Examples: - a commit SHA: `12ade345` - a tag: `tag1` - a branch name: `branch1`
"name": "A String", # Output only. The compilation result's name.
"releaseConfig": "A String", # Immutable. The name of the release config to compile. Must be in the format `projects/*/locations/*/repositories/*/releaseConfigs/*`.
"resolvedGitCommitSha": "A String", # Output only. The fully resolved Git commit SHA of the code that was compiled. Not set for compilation results whose source is a workspace.
"workspace": "A String", # Immutable. The name of the workspace to compile. Must be in the format `projects/*/locations/*/repositories/*/workspaces/*`.
}
get(name, x__xgafv=None)
Fetches a single CompilationResult.
Args:
name: string, Required. The compilation result's name. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents the result of compiling a Dataform project.
"codeCompilationConfig": { # Configures various aspects of Dataform code compilation. # Immutable. If set, fields of `code_compilation_config` override the default compilation settings that are specified in dataform.json.
"assertionSchema": "A String", # Optional. The default schema (BigQuery dataset ID) for assertions.
"databaseSuffix": "A String", # Optional. The suffix that should be appended to all database (Google Cloud project ID) names.
"defaultDatabase": "A String", # Optional. The default database (Google Cloud project ID).
"defaultLocation": "A String", # Optional. The default BigQuery location to use. Defaults to "US". See the BigQuery docs for a full list of locations: https://cloud.google.com/bigquery/docs/locations.
"defaultNotebookRuntimeOptions": {
"gcsOutputBucket": "A String", # Optional. The GCS location to upload the result to. Format: `gs://bucket-name`.
},
"defaultSchema": "A String", # Optional. The default schema (BigQuery dataset ID).
"schemaSuffix": "A String", # Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names.
"tablePrefix": "A String", # Optional. The prefix that should be prepended to all table names.
"vars": { # Optional. User-defined variables that are made available to project code during compilation.
"a_key": "A String",
},
},
"compilationErrors": [ # Output only. Errors encountered during project compilation.
{ # An error encountered when attempting to compile a Dataform project.
"actionTarget": { # Represents an action identifier. If the action writes output, the output will be written to the referenced database object. # Output only. The identifier of the action where this error occurred, if available.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
"message": "A String", # Output only. The error's top level message.
"path": "A String", # Output only. The path of the file where this error occurred, if available, relative to the project root.
"stack": "A String", # Output only. The error's full stack trace.
},
],
"createTime": "A String", # Output only. The timestamp of when the compilation result was created.
"dataEncryptionState": { # Describes encryption state of a resource. # Output only. Only set if the repository has a KMS Key.
"kmsKeyVersionName": "A String", # The KMS key version name with which data of a resource is encrypted.
},
"dataformCoreVersion": "A String", # Output only. The version of `@dataform/core` that was used for compilation.
"gitCommitish": "A String", # Immutable. Git commit/tag/branch name at which the repository should be compiled. Must exist in the remote repository. Examples: - a commit SHA: `12ade345` - a tag: `tag1` - a branch name: `branch1`
"name": "A String", # Output only. The compilation result's name.
"releaseConfig": "A String", # Immutable. The name of the release config to compile. Must be in the format `projects/*/locations/*/repositories/*/releaseConfigs/*`.
"resolvedGitCommitSha": "A String", # Output only. The fully resolved Git commit SHA of the code that was compiled. Not set for compilation results whose source is a workspace.
"workspace": "A String", # Immutable. The name of the workspace to compile. Must be in the format `projects/*/locations/*/repositories/*/workspaces/*`.
}
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists CompilationResults in a given Repository.
Args:
parent: string, Required. The repository in which to list compilation results. Must be in the format `projects/*/locations/*/repositories/*`. (required)
filter: string, Optional. Filter for the returned list.
orderBy: string, Optional. This field only supports ordering by `name` and `create_time`. If unspecified, the server will choose the ordering. If specified, the default order is ascending for the `name` field.
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 `ListCompilationResults` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCompilationResults` must match the call that provided the page token.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # `ListCompilationResults` response message.
"compilationResults": [ # List of compilation results.
{ # Represents the result of compiling a Dataform project.
"codeCompilationConfig": { # Configures various aspects of Dataform code compilation. # Immutable. If set, fields of `code_compilation_config` override the default compilation settings that are specified in dataform.json.
"assertionSchema": "A String", # Optional. The default schema (BigQuery dataset ID) for assertions.
"databaseSuffix": "A String", # Optional. The suffix that should be appended to all database (Google Cloud project ID) names.
"defaultDatabase": "A String", # Optional. The default database (Google Cloud project ID).
"defaultLocation": "A String", # Optional. The default BigQuery location to use. Defaults to "US". See the BigQuery docs for a full list of locations: https://cloud.google.com/bigquery/docs/locations.
"defaultNotebookRuntimeOptions": {
"gcsOutputBucket": "A String", # Optional. The GCS location to upload the result to. Format: `gs://bucket-name`.
},
"defaultSchema": "A String", # Optional. The default schema (BigQuery dataset ID).
"schemaSuffix": "A String", # Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names.
"tablePrefix": "A String", # Optional. The prefix that should be prepended to all table names.
"vars": { # Optional. User-defined variables that are made available to project code during compilation.
"a_key": "A String",
},
},
"compilationErrors": [ # Output only. Errors encountered during project compilation.
{ # An error encountered when attempting to compile a Dataform project.
"actionTarget": { # Represents an action identifier. If the action writes output, the output will be written to the referenced database object. # Output only. The identifier of the action where this error occurred, if available.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
"message": "A String", # Output only. The error's top level message.
"path": "A String", # Output only. The path of the file where this error occurred, if available, relative to the project root.
"stack": "A String", # Output only. The error's full stack trace.
},
],
"createTime": "A String", # Output only. The timestamp of when the compilation result was created.
"dataEncryptionState": { # Describes encryption state of a resource. # Output only. Only set if the repository has a KMS Key.
"kmsKeyVersionName": "A String", # The KMS key version name with which data of a resource is encrypted.
},
"dataformCoreVersion": "A String", # Output only. The version of `@dataform/core` that was used for compilation.
"gitCommitish": "A String", # Immutable. Git commit/tag/branch name at which the repository should be compiled. Must exist in the remote repository. Examples: - a commit SHA: `12ade345` - a tag: `tag1` - a branch name: `branch1`
"name": "A String", # Output only. The compilation result's name.
"releaseConfig": "A String", # Immutable. The name of the release config to compile. Must be in the format `projects/*/locations/*/repositories/*/releaseConfigs/*`.
"resolvedGitCommitSha": "A String", # Output only. The fully resolved Git commit SHA of the code that was compiled. Not set for compilation results whose source is a workspace.
"workspace": "A String", # Immutable. The name of the workspace to compile. Must be in the format `projects/*/locations/*/repositories/*/workspaces/*`.
},
],
"nextPageToken": "A 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.
"unreachable": [ # Locations which could not be reached.
"A String",
],
}
list_next()
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.
query(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Returns CompilationResultActions in a given CompilationResult.
Args:
name: string, Required. The compilation result's name. (required)
filter: string, Optional. Optional filter for the returned list. Filtering is only currently supported on the `file_path` field.
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` must match the call that provided the page token.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # `QueryCompilationResultActions` response message.
"compilationResultActions": [ # List of compilation result actions.
{ # Represents a single Dataform action in a compilation result.
"assertion": { # Represents an assertion upon a SQL query which is required return zero rows. # The assertion executed by this action.
"dependencyTargets": [ # A list of actions that this action depends on.
{ # Represents an action identifier. If the action writes output, the output will be written to the referenced database object.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
],
"disabled": True or False, # Whether this action is disabled (i.e. should not be run).
"parentAction": { # Represents an action identifier. If the action writes output, the output will be written to the referenced database object. # The parent action of this assertion. Only set if this assertion was automatically generated.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
"relationDescriptor": { # Describes a relation and its columns. # Descriptor for the assertion's automatically-generated view and its columns.
"bigqueryLabels": { # A set of BigQuery labels that should be applied to the relation.
"a_key": "A String",
},
"columns": [ # A list of descriptions of columns within the relation.
{ # Describes a column.
"bigqueryPolicyTags": [ # A list of BigQuery policy tags that will be applied to the column.
"A String",
],
"description": "A String", # A textual description of the column.
"path": [ # The identifier for the column. Each entry in `path` represents one level of nesting.
"A String",
],
},
],
"description": "A String", # A text description of the relation.
},
"selectQuery": "A String", # The SELECT query which must return zero rows in order for this assertion to succeed.
"tags": [ # Arbitrary, user-defined tags on this action.
"A String",
],
},
"canonicalTarget": { # Represents an action identifier. If the action writes output, the output will be written to the referenced database object. # The action's identifier if the project had been compiled without any overrides configured. Unique within the compilation result.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
"declaration": { # Represents a relation which is not managed by Dataform but which may be referenced by Dataform actions. # The declaration declared by this action.
"relationDescriptor": { # Describes a relation and its columns. # 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.
"bigqueryLabels": { # A set of BigQuery labels that should be applied to the relation.
"a_key": "A String",
},
"columns": [ # A list of descriptions of columns within the relation.
{ # Describes a column.
"bigqueryPolicyTags": [ # A list of BigQuery policy tags that will be applied to the column.
"A String",
],
"description": "A String", # A textual description of the column.
"path": [ # The identifier for the column. Each entry in `path` represents one level of nesting.
"A String",
],
},
],
"description": "A String", # A text description of the relation.
},
},
"filePath": "A String", # The full path including filename in which this action is located, relative to the workspace root.
"notebook": { # The notebook executed by this action.
"contents": "A String", # The contents of the notebook.
"dependencyTargets": [ # A list of actions that this action depends on.
{ # Represents an action identifier. If the action writes output, the output will be written to the referenced database object.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
],
"disabled": True or False, # Whether this action is disabled (i.e. should not be run).
"tags": [ # Arbitrary, user-defined tags on this action.
"A String",
],
},
"operations": { # Represents a list of arbitrary database operations. # The database operations executed by this action.
"dependencyTargets": [ # A list of actions that this action depends on.
{ # Represents an action identifier. If the action writes output, the output will be written to the referenced database object.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
],
"disabled": True or False, # Whether this action is disabled (i.e. should not be run).
"hasOutput": True or False, # Whether these operations produce an output relation.
"queries": [ # A list of arbitrary SQL statements that will be executed without alteration.
"A String",
],
"relationDescriptor": { # Describes a relation and its columns. # Descriptor for any output relation and its columns. Only set if `has_output` is true.
"bigqueryLabels": { # A set of BigQuery labels that should be applied to the relation.
"a_key": "A String",
},
"columns": [ # A list of descriptions of columns within the relation.
{ # Describes a column.
"bigqueryPolicyTags": [ # A list of BigQuery policy tags that will be applied to the column.
"A String",
],
"description": "A String", # A textual description of the column.
"path": [ # The identifier for the column. Each entry in `path` represents one level of nesting.
"A String",
],
},
],
"description": "A String", # A text description of the relation.
},
"tags": [ # Arbitrary, user-defined tags on this action.
"A String",
],
},
"relation": { # Represents a database relation. # The database relation created/updated by this action.
"additionalOptions": { # 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.
"a_key": "A String",
},
"clusterExpressions": [ # A list of columns or SQL expressions used to cluster the table.
"A String",
],
"dependencyTargets": [ # A list of actions that this action depends on.
{ # Represents an action identifier. If the action writes output, the output will be written to the referenced database object.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
],
"disabled": True or False, # Whether this action is disabled (i.e. should not be run).
"incrementalTableConfig": { # Contains settings for relations of type `INCREMENTAL_TABLE`. # Configures `INCREMENTAL_TABLE` settings for this relation. Only set if `relation_type` is `INCREMENTAL_TABLE`.
"incrementalPostOperations": [ # SQL statements to be executed after inserting new rows into the relation.
"A String",
],
"incrementalPreOperations": [ # SQL statements to be executed before inserting new rows into the relation.
"A String",
],
"incrementalSelectQuery": "A String", # The SELECT query which returns rows which should be inserted into the relation if it already exists and is not being refreshed.
"refreshDisabled": True or False, # Whether this table should be protected from being refreshed.
"uniqueKeyParts": [ # 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.
"A String",
],
"updatePartitionFilter": "A 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).
},
"partitionExpirationDays": 42, # Sets the partition expiration in days.
"partitionExpression": "A String", # The SQL expression used to partition the relation.
"postOperations": [ # SQL statements to be executed after creating the relation.
"A String",
],
"preOperations": [ # SQL statements to be executed before creating the relation.
"A String",
],
"relationDescriptor": { # Describes a relation and its columns. # Descriptor for the relation and its columns.
"bigqueryLabels": { # A set of BigQuery labels that should be applied to the relation.
"a_key": "A String",
},
"columns": [ # A list of descriptions of columns within the relation.
{ # Describes a column.
"bigqueryPolicyTags": [ # A list of BigQuery policy tags that will be applied to the column.
"A String",
],
"description": "A String", # A textual description of the column.
"path": [ # The identifier for the column. Each entry in `path` represents one level of nesting.
"A String",
],
},
],
"description": "A String", # A text description of the relation.
},
"relationType": "A String", # The type of this relation.
"requirePartitionFilter": True or False, # Specifies whether queries on this table must include a predicate filter that filters on the partitioning column.
"selectQuery": "A String", # The SELECT query which returns rows which this relation should contain.
"tags": [ # Arbitrary, user-defined tags on this action.
"A String",
],
},
"target": { # Represents an action identifier. If the action writes output, the output will be written to the referenced database object. # This action's identifier. Unique within the compilation result.
"database": "A String", # The action's database (Google Cloud project ID) .
"name": "A String", # The action's name, within `database` and `schema`.
"schema": "A String", # The action's schema (BigQuery dataset ID), within `database`.
},
},
],
"nextPageToken": "A 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.
}
query_next()
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.