# ExecuteQuery

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                                                                                                                                                                                                                                                                                                      |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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                                                                                   |
| ------------------------------------------ | --------------------------------------------------------------------------------------------- |
| Query : `String`                           | <p>Query.</p><p><br>Default: <code>-</code><br>Example: <code>SELECT \* FROM table</code></p> |
| BigQueryParameter : `BigQueryParameters[]` | <p>Parameters.</p><p><br>Default: <code>-</code><br>Example: <code>parametername</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> |
| MaxRetryAttempts : `Int32` | <p>Maximum number of retry attempts before throwing an exception or ending this Task.</p><p><br>Default: <code>-</code><br>Example: <code>1</code></p>                               |
| Delay : `Int32`            | <p>Delay in seconds between retry attempts.</p><p><br>Default: <code>-</code><br>Example: <code>5</code></p>                                                                         |
| {% endtab %}               |                                                                                                                                                                                      |

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

| Name                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`     | <p>Operation complete without errors.<br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                        |
| Data : `Object`         | <p>Result as JToken.<br>Example: <code>{ "integer\_field": 1, "string\_field": "Sample String", "date\_field": "2023-09-20T00:00:00", "float\_field": 3.14, "boolean\_field": true, "timestamp\_field": "2023-09-20T12:34:56Z", "time\_field": "12:34:56.7890000", "datetime\_field": "2023-09-20T12:34:56.789", "record\_field": { "nested\_string": "Nested String" }, "array\_field": \[ "Item 1", "Item 2" ], "name": "John Smith", "age": 30 }</code></p> |
| ErrorMessage : `String` | <p>Error message.<br>Example: <code>Error occured...</code></p>                                                                                                                                                                                                                                                                                                                                                                                                |
| {% endtab %}            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

{% tab title="Changelog" %}

## Changelog

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

#### Added

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