# UpdateResource

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>                                                                                                                                                                                                                    |
| RoutineId : `String`               | <p>The ID of the routine.</p><p><br>Default: <code>-</code><br>Example: <code>routine</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>Routine</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.</p><p><br>Default: <code>-</code><br>Example: <code>Example description.</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| FriendlyName : `String`                           | <p>Friendly name for Dataset or Table resource.</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>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| DefinitionBody : `String`                         | <p>The body of the routine.</p><p>For functions, this is the expression in the AS clause.</p><p>If language=SQL, it is the substring inside (but excluding) the parentheses.</p><p>For example, for the function created with the following statement:</p><p><code>CREATE FUNCTION JoinLines(x string, y string) as (concat(x, "\n", y))</code> The definition\_body is <code>concat(x, "\n", y)</code> (\n is not replaced with linebreak).</p><p>If language=JAVASCRIPT, it is the evaluated string in the AS clause.</p><p>For example, for the function created with the following statement:</p><p><code>CREATE FUNCTION f() RETURNS STRING LANGUAGE js AS 'return "\n";\n'</code> The definition\_body is <code>return "\n";\n</code></p><p>Note that both \n are replaced with linebreaks.</p><p><br>Default: <code>-</code><br>Example: <code>concat(x, "\n", y)</code></p>                                                                                                                                                                                                                                                                                                                                                                                    |
| Language : `String`                               | <p>Defaults to "SQL" if Input.RemoteFunctionParameters is not empty, not set otherwise. (Optional)</p><p><br>Default: <code>-</code><br>Example: <code>SQL</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| RoutineType : `RoutineTypes`                      | <p>Routine type.</p><p>Possible values:</p><ul><li><code>SCALAR\_FUNCTION</code>:</li></ul><p>Routine type.</p><ul><li><code>PROCEDURE</code>:</li></ul><p>Routine type.</p><ul><li><code>TABLE\_FUNCTION</code>:</li></ul><p>Routine type.</p><p><br>Default: <code>0</code><br>Example: <code>RoutineTypes.SCALAR\_FUNCTION</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ReturnType : `String`                             | <p>Optional if language = "SQL"; required otherwise.</p><p>Cannot be set if Input.RoutineType = "TABLE\_VALUED\_FUNCTION".</p><p>If absent, the return type is inferred from definition\_body at query time in each query that references this routine.</p><p>If present, then the evaluated result will be cast to the specified returned type at query time.</p><p>For example, for the functions created with the following statements: \* <code>CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);</code> \* <code>CREATE FUNCTION Increment(x FLOAT64) AS (Add(x, 1));</code> \* <code>CREATE FUNCTION Decrement(x FLOAT64) RETURNS FLOAT64 AS (Add(x, -1));</code> The return\_type is <code>{type\_kind: "FLOAT64"}</code> for <code>Add</code> and <code>Decrement</code>, and is absent for <code>Increment</code> (inferred as FLOAT64 at query time).</p><p>Suppose the function <code>Add</code> is replaced by <code>CREATE OR REPLACE FUNCTION Add(x INT64, y INT64) AS (x + y);</code> Then the inferred return type of <code>Increment</code> is automatically changed to INT64 at query time, while the return type of <code>Decrement</code> remains FLOAT64.</p><p><br>Default: <code>-</code><br>Example: <code>DATE</code></p> |
| DeterminismLevel : `DeterminismLevels`            | <p>The determinism level of the JavaScript UDF, if defined.</p><p>Possible values:</p><ul><li><code>DETERMINISM\_LEVEL\_UNSPECIFIED</code>:</li></ul><p>The determinism level of the JavaScript UDF, if defined.</p><ul><li><code>DETERMINISTIC</code>:</li></ul><p>The determinism level of the JavaScript UDF, if defined.</p><ul><li><code>NOT\_DETERMINISTIC</code>:</li></ul><p>The determinism level of the JavaScript UDF, if defined.</p><p><br>Default: <code>0</code><br>Example: <code>DeterminismLevels.DETERMINISTIC</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| StrictMode : `Boolean`                            | <p>Can be set for procedures only.</p><p>If true (default), the definition body will be validated in the creation and the updates of the procedure.</p><p>For procedures with an argument of ANY TYPE, the definition body validtion is not supported at creation/update time, and thus this field must be set to false explicitly.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ImportedLibrary : `ImportedLibraryParameters[]`   | <p>If Input.Language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries. (Optional)</p><p><br>Default: <code>-</code><br>Example: <code>\[ { foo }, { bar } ]</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Argument : `ArgumentParameters[]`                 | <p>Argument(s) of a function or a stored procedure.</p><p><br>Default: <code>-</code><br>Example: <code>\[ { x, IN, INT64, FIXED\_TYPE }, { y, OUT, INT64, FIXED\_TYPE }, { 'not set', 'not set', INT64, 'not set' } ]</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| SetRemoteFunctionParameters : `Boolean`           | <p>Set remote function specific options.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| RemoteConnection : `String`                       | <p>Fully qualified name of the user-provided connection object which holds the authentication information to send requests to the remote service.</p><p><br>Default: <code>-</code><br>Example: <code>projects/{projectId}/locations/{locationId}/connections/{connectionId}</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| RemoteEndpoint : `String`                         | <p>Endpoint of the user-provided remote service.</p><p><br>Default: <code>-</code><br>Example: <code><https://us-east1-my_gcf_project.cloudfunctions.net/remote_add></code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| RemoteMaxBatchingRows : `Int64`                   | <p>Max number of rows in each batch sent to the remote service.</p><p>If 0, BigQuery dynamically decides the number of rows in a batch.</p><p><br>Default: <code>-</code><br>Example: <code>0</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| RemoteUserDefinedContext : `UserDefinedContext[]` | <p>User-defined context as a set of key/value pairs, which will be sent as function invocation context together with batched arguments in the requests to the remote service.</p><p>The total number of bytes of keys and values must be less than 8KB.</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-18

#### Added

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