SnowflakeTableRetriever
Connects to a Snowflake database to execute a SQL query using ADBC and Polars.
Basic Information
- Type:
haystack_integrations.snowflake.src.haystack_integrations.components.retrievers.snowflake.snowflake_table_retriever.SnowflakeTableRetriever
Inputs
| Parameter | Type | Default | Description |
|---|---|---|---|
| query | str | The SQL query to execute. | |
| return_markdown | Optional[bool] | None | Whether to return a Markdown-formatted string of the DataFrame. If not provided, uses the value set during initialization. |
Outputs
| Parameter | Type | Default | Description |
|---|---|---|---|
| dataframe | DataFrame | A dictionary containing: - "dataframe": A Pandas DataFrame with the query results. - "table": A Markdown-formatted string representation of the DataFrame. | |
| table | str | A dictionary containing: - "dataframe": A Pandas DataFrame with the query results. - "table": A Markdown-formatted string representation of the DataFrame. |
Overview
Bear with us while we're working on adding pipeline examples and most common components connections.
Connects to a Snowflake database to execute a SQL query using ADBC and Polars. Returns the results as a Pandas DataFrame (converted from a Polars DataFrame) along with a Markdown-formatted string. For more information, see Polars documentation. and ADBC documentation.
Usage Example
components:
SnowflakeTableRetriever:
type: snowflake.src.haystack_integrations.components.retrievers.snowflake.snowflake_table_retriever.SnowflakeTableRetriever
init_parameters:
Parameters
Init Parameters
These are the parameters you can configure in Pipeline Builder:
| Parameter | Type | Default | Description |
|---|---|---|---|
| user | str | User's login. | |
| account | str | Snowflake account identifier. | |
| api_key | Secret | Secret.from_env_var('SNOWFLAKE_API_KEY') | Snowflake account password. |
| database | Optional[str] | None | Name of the database to use. |
| db_schema | Optional[str] | None | Name of the schema to use. |
| warehouse | Optional[str] | None | Name of the warehouse to use. |
| login_timeout | Optional[int] | 60 | Timeout in seconds for login. |
| return_markdown | bool | True | Whether to return a Markdown-formatted string of the DataFrame. |
Run Method Parameters
These are the parameters you can configure for the component's run() method. This means you can pass these parameters at query time through the API, in Playground, or when running a job. For details, see Modify Pipeline Parameters at Query Time.
| Parameter | Type | Default | Description |
|---|---|---|---|
| query | str | The SQL query to execute. | |
| return_markdown | Optional[bool] | None | Whether to return a Markdown-formatted string of the DataFrame. If not provided, uses the value set during initialization. |
Was this page helpful?