# Execute Select Query Synchronously

> Execute Select Query Synchronously activity in the Snowflake connector.

## Project compatibility

Windows | Cross-platform

## Overview

| Description | API Method | API Path |
| --- | --- | --- |
| Executes a SELECT query on a Snowflake warehouse and returns the result set synchronously. | POST | /executeQuery |

:::note
The limit for retrieved records is 200 records. Even if you set the LIMIT parameter to a higher number, a maximum of 200 records are retrieved. You can set the LIMIT and OFFSET parameters directly in the **Select Query** property (example: `SELECT * PERSONS LIMIT 200 OFFSET 100`), within a [Do While](https://docs.uipath.com/activities/other/latest/workflow/interruptible-do-while) activity, to paginate through all records without timing out the process.
:::

## Input

| Parameter | Description | Data Type |
| --- | --- | --- |
| Select query | Input a valid SELECT query and then click the **Generate output schema** button. Query example: `SELECT * FROM PERSONS`. | string |

![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/latest-docs-image-451817-263bf140-0c910c29.webp)

:::important
* Add a valid query (without variables) to generate the schema. You can add or update variables in the query after the schema is successfully generated. See the Snowflake official documentation on [query syntax](https://docs.snowflake.com/en/sql-reference/sql/select).
* The Snowflake VARIANT data type is not supported.
* For security reasons, some patterns and commands are not supported. For a complete list, see the **Query restrictions** section below.
:::

## Output

| Parameter | Description | Data Type |
| --- | --- | --- |
| Query results | The query results | Object |

:::note
* In API workflows, a single response object is returned as the output. Any required fields can be extracted directly from this object.
* In RPA workflows, some output parameters may differ, but the necessary values can still be retrieved from the response object even if they are not explicitly exposed.
:::

## Query restrictions

The Snowflake connector enforces security restrictions on SQL queries to prevent potentially harmful operations. The following patterns and commands are not supported:

* **SQL Comments** - The following comment patterns are blocked anywhere in the query, including within string values:
  * `#` (hash/pound symbol)
  * `--` (double dash)
  * `/*` and `*/` (block comment delimiters)
  * `/**/` (empty block comments)
* **File References** - Queries cannot contain:
  * `file:` URL patterns
  * LOAD commands
* **DML Restrictions for executeQuery** - When using the executeQuery endpoint, only SELECT statements are supported. The following are blocked:
  * INSERT
  * UPDATE
  * DELETE
  * MERGE
  * TRUNCATE
