0.18.0 (latest) 0.17.1 0.16.0 0.15.3 0.12.0 0.11.0 0.10.1 0.9.2 0.8.1 0.7.0 0.6.0 0.5.1 0.4.7 0.3.0 0.2.3 0.1.6

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Dataform V1beta1 Client class Relation.

Represents a database relation.

Generated from protobuf message `google.cloud.dataform.v1beta1.CompilationResultAction.Relation`

## Namespace

Google \\ Cloud \\ Dataform \\ V1beta1 \\ CompilationResultAction

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ dependency_targets` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.Target>` A list of actions that this action depends on. |
| `↳ disabled` | `bool` Whether this action is disabled (i.e. should not be run). |
| `↳ tags` | `string[]` Arbitrary, user-defined tags on this action. |
| `↳ relation_descriptor` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.RelationDescriptor` Descriptor for the relation and its columns. |
| `↳ relation_type` | `int` The type of this relation. |
| `↳ select_query` | `string` The SELECT query which returns rows which this relation should contain. |
| `↳ pre_operations` | `string[]` SQL statements to be executed before creating the relation. |
| `↳ post_operations` | `string[]` SQL statements to be executed after creating the relation. |
| `↳ incremental_table_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.CompilationResultAction.Relation.IncrementalTableConfig` Configures `INCREMENTAL_TABLE` settings for this relation. Only set if `relation_type` is `INCREMENTAL_TABLE`. |
| `↳ partition_expression` | `string` The SQL expression used to partition the relation. |
| `↳ cluster_expressions` | `string[]` A list of columns or SQL expressions used to cluster the table. |
| `↳ partition_expiration_days` | `int` Sets the partition expiration in days. |
| `↳ require_partition_filter` | `bool` Specifies whether queries on this table must include a predicate filter that filters on the partitioning column. |
| `↳ additional_options` | `array|Google\Protobuf\Internal\MapField` 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. |
| `↳ 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. |
| `↳ table_format` | `int` Optional. The table format for the BigQuery table. |
| `↳ file_format` | `int` Optional. The file format for the BigQuery table. |
| `↳ storage_uri` | `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/`. |

### getDependencyTargets

A list of actions that this action depends on.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.Target>` |   |

### setDependencyTargets

A list of actions that this action depends on.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.Target>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDisabled

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setDisabled

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTags

Arbitrary, user-defined tags on this action.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setTags

Arbitrary, user-defined tags on this action.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRelationDescriptor

Descriptor for the relation and its columns.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.RelationDescriptor|null` |   |

### hasRelationDescriptor

### clearRelationDescriptor

### setRelationDescriptor

Descriptor for the relation and its columns.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.RelationDescriptor` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRelationType

The type of this relation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [RelationType](https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.CompilationResultAction.Relation.RelationType). |

### setRelationType

The type of this relation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [RelationType](https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.CompilationResultAction.Relation.RelationType). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSelectQuery

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSelectQuery

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPreOperations

SQL statements to be executed before creating the relation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setPreOperations

SQL statements to be executed before creating the relation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPostOperations

SQL statements to be executed after creating the relation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setPostOperations

SQL statements to be executed after creating the relation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getIncrementalTableConfig

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.CompilationResultAction.Relation.IncrementalTableConfig|null` |   |

### hasIncrementalTableConfig

### clearIncrementalTableConfig

### setIncrementalTableConfig

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.CompilationResultAction.Relation.IncrementalTableConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPartitionExpression

The SQL expression used to partition the relation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setPartitionExpression

The SQL expression used to partition the relation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getClusterExpressions

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setClusterExpressions

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPartitionExpirationDays

Sets the partition expiration in days.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setPartitionExpirationDays

Sets the partition expiration in days.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRequirePartitionFilter

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setRequirePartitionFilter

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAdditionalOptions

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setAdditionalOptions

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getConnection

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setConnection

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTableFormat

Optional. The table format for the BigQuery table.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [TableFormat](https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.CompilationResultAction.Relation.TableFormat). |

### setTableFormat

Optional. The table format for the BigQuery table.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [TableFormat](https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.CompilationResultAction.Relation.TableFormat). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFileFormat

Optional. The file format for the BigQuery table.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [FileFormat](https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.CompilationResultAction.Relation.FileFormat). |

### setFileFormat

Optional. The file format for the BigQuery table.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [FileFormat](https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.CompilationResultAction.Relation.FileFormat). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getStorageUri

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setStorageUri

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |