# SnowflakeQueryTool

> **Class** in `langchain_snowflake`

📖 [View in docs](https://reference.langchain.com/python/langchain-snowflake/tools/query/SnowflakeQueryTool)

Execute SQL queries on Snowflake.

This tool allows execution of SQL queries against a Snowflake database
and returns the results in a formatted manner.

## Signature

```python
SnowflakeQueryTool(
    self,
    **kwargs = {},
)
```

## Description

**Setup:**

Install ``langchain-snowflake`` and configure Snowflake connection.

.. code-block:: bash

    pip install -U langchain-snowflake

**Instantiation:**

.. code-block:: python

from . import SnowflakeQueryTool

tool = SnowflakeQueryTool(
    session=session,
    # or connection parameters
    account="your-account",
    user="your-user",
    password="your-password",
    warehouse="your-warehouse"
)

**Invocation:**

.. code-block:: python

result = tool.invoke({"query": "SELECT COUNT(*) FROM my_table"})
print(result)

## Extends

- `BaseTool`
- `SnowflakeConnectionMixin`

## Constructors

```python
__init__(
    self,
    **kwargs = {},
)
```


## Properties

- `name`
- `description`
- `args_schema`
- `max_rows`

---

[View source on GitHub](https://github.com/langchain-ai/langchain-snowflake/blob/1a32a1c6642b6c453e9537f35afbc7da280f8679/libs/snowflake/langchain_snowflake/tools/query.py#L21)