# PatchResource

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.GoogleBigQuery>

{% tabs %}
{% tab title="Parameter: Connection" %}

| Name                               | Description                                                                                                                                                                                                                                                                                                      |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| BaseUri : `String`                 | <p>Service base URI.</p><p>If empty, the default base URI for the service is used.</p><p><br>Default: <code>-</code><br>Example: <code><https://bigquery.googleapis.com></code></p>                                                                                                                              |
| ProjectId : `String`               | <p>Project ID.</p><p><br>Default: <code>-</code><br>Example: <code>global-env-397309</code></p>                                                                                                                                                                                                                  |
| DatasetId : `String`               | <p>Dataset ID.</p><p><br>Default: <code>-</code><br>Example: <code>baseball</code></p>                                                                                                                                                                                                                           |
| TableId : `String`                 | <p>Table ID.</p><p><br>Default: <code>-</code><br>Example: <code>games\_post\_wide</code></p>                                                                                                                                                                                                                    |
| ReadJsonMethod : `ReadJsonMethods` | <p>Method to read Service account JSON.</p><p>Possible values:</p><ul><li><code>JSON</code>:</li></ul><p>Method to read Service account JSON.</p><ul><li><code>File</code>:</li></ul><p>Method to read Service account JSON.</p><p><br>Default: <code>1</code><br>Example: <code>ReadJsonMethods.File</code></p> |
| 🗝SecretJson : `String`            | <p>Service account key file.</p><p><br>Default: <code>-</code><br>Example: <code>{ "type": "service\_account", "project\_id": "your-project-id", ... }</code></p>                                                                                                                                                |
| CredentialsFilePath : `String`     | <p>Filepath to service account key file.</p><p><br>Default: <code>-</code><br>Example: <code>C:\temp\jsonfile.json</code></p>                                                                                                                                                                                    |
| {% endtab %}                       |                                                                                                                                                                                                                                                                                                                  |

{% tab title="Parameter: Input" %}

| Name                                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Resource : `Resources`                  | <p>Resource type.</p><p>Possible values:</p><ul><li><code>Dataset</code>:</li></ul><p>Resource type.</p><ul><li><code>Table</code>:</li></ul><p>Resource type.</p><p><br>Default: <code>0</code><br>Example: <code>Resources.Dataset</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Description : `String`                  | <p>Resource description. (Optional)</p><p><br>Default: <code>-</code><br>Example: <code>Example description.</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| FriendlyName : `String`                 | <p>Friendly name for Dataset or Table resource. (Optional)</p><p><br>Default: <code>-</code><br>Example: <code>Example name</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Location : `String`                     | <p>The geographic location where the resource should reside.</p><p>See details at <https://cloud.google.com/bigquery/docs/locations></p><p><br>Default: <code>EU</code><br>Example: <code>europe-north1</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Label : `LabelParameters[]`             | <p>Label(s) for Dataset or Table resource. (Optional)</p><p>Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes.</p><p>International characters are allowed.</p><p>Label keys must start with a letter and each label in the list must have a different key.</p><p><br>Default: <code>-</code><br>Example: <code>\[ {foo, bar }, { bar, foo } ]</code></p>                                                                                                                                                                                                                                                                |
| SetEncryptionConfiguration : `Boolean`  | <p>Set Dataset or Table encryption configuration.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| KmsKeyName : `String`                   | <p>Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table.</p><p>The BigQuery Service Account associated with your project requires access to this encryption key.</p><p><br>Default: <code>-</code><br>Example: <code>projects/your-project/locations/global/keyRings/your-key-ring/cryptoKeys/your-key</code></p>                                                                                                                                                                                                                                                                                                                                                     |
| StorageBillingModel : `String`          | <p>Storage billing model to be used for all tables in the dataset.</p><p>Can be set to PHYSICAL.</p><p><br>Default: <code>LOGICAL</code><br>Example: <code>LOGICAL</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| IsCaseInsensitive : `Boolean`           | <p>Indicates if table names are case insensitive in the dataset.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| MaxTimeTravelHours : `Int64`            | <p>Number of hours for the max time travel for all tables in the dataset.</p><p>Unlimited if 0.</p><p><br>Default: <code>0</code><br>Example: <code>0</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Access : `AccessParameters[]`           | <p>An array of objects that define dataset access for one or more entities. (Optional)</p><p>You can set this property when inserting or updating a dataset in order to control who is allowed to access the data.</p><p>If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities:</p><p>access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: \[dataset creator email]; access.role: OWNER;</p><p><br>Default: <code>-</code><br>Example: <code>\[ { READER, <foo@bar.com> }, { WRITER, <bar@bar.com> } ]</code></p> |
| Tag : `TagParameters[]`                 | <p>The tags associated with this dataset. (Optional)</p><p>Tag keys are globally unique.</p><p><br>Default: <code>-</code><br>Example: <code>\[ { foo, bar }, { foo2, bar2 } ]</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| RequirePartitionFilter : `Boolean`      | <p>If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| TableSchema : `TableSchemaParameters[]` | <p>Describes the schema of this table.</p><p><br>Default: <code>-</code><br>Example: <code>\[ { Name = "Name", Type = "STRING" }, { Name = "AGE", Type = "INTEGER" }, { Name = "BDAY", Type = "DATE" } ]</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Partition : `TablePartitionOptions`     | <p>Partition option.</p><p>Possible values:</p><ul><li><code>None</code>:</li></ul><p>Partition option.</p><ul><li><code>RangePartitioning</code>:</li></ul><p>Partition option.</p><ul><li><code>TimePartitioning</code>:</li></ul><p>Partition option.</p><p><br>Default: <code>0</code><br>Example: <code>TablePartitionOptions.RangePartitioning</code></p>                                                                                                                                                                                                                                                                                                                                                 |
| RangeField : `String`                   | <p>The table is partitioned by this field.</p><p>The field must be a top-level NULLABLE/REQUIRED field.</p><p>The only supported type is INTEGER/INT64.</p><p><br>Default: <code>-</code><br>Example: <code>AGE</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| RangeStart : `Int64`                    | <p>The start of range partitioning, inclusive</p><p><br>Default: <code>-</code><br>Example: <code>1</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| RangeEnd : `Int64`                      | <p>The end of range partitioning, exclusive.</p><p><br>Default: <code>-</code><br>Example: <code>2</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| RangeInterval : `Int64`                 | <p>The width of each interval.</p><p><br>Default: <code>-</code><br>Example: <code>2</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| TimeField : `String`                    | <p>If not set, the table is partitioned by pseudo column, referenced via either '\_PARTITIONTIME' as TIMESTAMP type, or '\_PARTITIONDATE' as DATE type.</p><p>If field is specified, the table is instead partitioned by this field.</p><p>The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.</p><p><br>Default: <code>-</code><br>Example: <code>TIMESTAMP</code></p>                                                                                                                                                                                                                                                                                               |
| Type : `TimeTypeOptions`                | <p>Generate one partition per day, hour, month, or year.</p><p>Possible values:</p><ul><li><code>DAY</code>:</li></ul><p>Generate one partition per day, hour, month, or year.</p><ul><li><code>HOUR</code>:</li></ul><p>Generate one partition per day, hour, month, or year.</p><ul><li><code>MONTH</code>:</li></ul><p>Generate one partition per day, hour, month, or year.</p><ul><li><code>YEAR</code>:</li></ul><p>Generate one partition per day, hour, month, or year.</p><p><br>Default: <code>0</code><br>Example: <code>TimeTypeOptions.DAY</code></p>                                                                                                                                              |
| TimeRequirePartitionFilter : `Boolean`  | <p>RequirePartitionFilter</p><p><br>Default: <code>false</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ExpirationMs : `Int64`                  | <p>Number of milliseconds for which to keep the storage for partitions in the table.</p><p>The storage in a partition will have an expiration time of its partition time plus this value.</p><p><br>Default: <code>0</code><br>Example: <code>0</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| {% endtab %}                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

{% tab title="Parameter: Options" %}

| Name                     | Description                                                                                                                                                                          |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ThrowOnError : `Boolean` | <p>Throw an error on exception.</p><p>If set to false, exception message can be found in Result.ErrorMessage.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p> |
| {% endtab %}             |                                                                                                                                                                                      |

{% tab title="Result: Result" %}

| Name                    | Description                                                             |
| ----------------------- | ----------------------------------------------------------------------- |
| Success : `Boolean`     | <p>Operation complete without errors.<br>Example: <code>true</code></p> |
| ErrorMessage : `String` | <p>Error message.<br>Example: <code>Error occured...</code></p>         |
| {% endtab %}            |                                                                         |

{% tab title="Changelog" %}

## Changelog

### \[1.0.0] - 2023-09-19

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
