llama-index-packs-snowflake-query-engine


Namellama-index-packs-snowflake-query-engine JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
Summaryllama-index packs snowflake_query_engine integration
upload_time2024-11-17 22:42:48
maintainerwenqiglantz
docs_urlNone
authorYour Name
requires_python<4.0,>=3.9
licenseMIT
keywords engine query snowflake
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Snowflake Query Engine Pack

This LlamaPack uses `snowflake-sqlalchemy` to connect to Snowflake, then calls `NLSQLTableQueryEngine` to query data.

## Usage

You can download the pack to a the `./snowflake_pack` directory:

```python
from llama_index.core.llama_pack import download_llama_pack

# download and install dependencies
SnowflakeQueryEnginePack = download_llama_pack(
    "SnowflakeQueryEnginePack", "./snowflake_pack"
)
```

From here, you can use the pack, or inspect and modify the pack in `./snowflake_pack`.

`NLSQLTableQueryEngine` uses OpenAI models by default, ensure you set your OpenAI API key.

You can set up the pack by passing in the Snowflake connection details and the table(s):

```python
# create the pack
snowflake_pack = SnowflakeQueryEnginePack(
    user="<USER>",
    password="<PASSWORD>",
    account="<ORG>-<ACCOUNT>",
    database="<DATABASE>",
    schema="<SCHEMA>",
    warehouse="<WAREHOUSE>",
    role="<ROLE>",
    tables=["<TABLE1>", "<TABLE2>", ...],
)
```

The `run()` function is a light wrapper around `query_engine.query()`. See below a sample query run. You can add additional prompt in the query text.

```python
response = snowflake_pack.run(
    "Give me the repo id with the most stars on 2023-12-01."
)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-packs-snowflake-query-engine",
    "maintainer": "wenqiglantz",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "engine, query, snowflake",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/8e/97/80710c12ae480a808c2f9e63f91a92fd4b64e236c8c59872cb3e655c266d/llama_index_packs_snowflake_query_engine-0.4.0.tar.gz",
    "platform": null,
    "description": "# Snowflake Query Engine Pack\n\nThis LlamaPack uses `snowflake-sqlalchemy` to connect to Snowflake, then calls `NLSQLTableQueryEngine` to query data.\n\n## Usage\n\nYou can download the pack to a the `./snowflake_pack` directory:\n\n```python\nfrom llama_index.core.llama_pack import download_llama_pack\n\n# download and install dependencies\nSnowflakeQueryEnginePack = download_llama_pack(\n    \"SnowflakeQueryEnginePack\", \"./snowflake_pack\"\n)\n```\n\nFrom here, you can use the pack, or inspect and modify the pack in `./snowflake_pack`.\n\n`NLSQLTableQueryEngine` uses OpenAI models by default, ensure you set your OpenAI API key.\n\nYou can set up the pack by passing in the Snowflake connection details and the table(s):\n\n```python\n# create the pack\nsnowflake_pack = SnowflakeQueryEnginePack(\n    user=\"<USER>\",\n    password=\"<PASSWORD>\",\n    account=\"<ORG>-<ACCOUNT>\",\n    database=\"<DATABASE>\",\n    schema=\"<SCHEMA>\",\n    warehouse=\"<WAREHOUSE>\",\n    role=\"<ROLE>\",\n    tables=[\"<TABLE1>\", \"<TABLE2>\", ...],\n)\n```\n\nThe `run()` function is a light wrapper around `query_engine.query()`. See below a sample query run. You can add additional prompt in the query text.\n\n```python\nresponse = snowflake_pack.run(\n    \"Give me the repo id with the most stars on 2023-12-01.\"\n)\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index packs snowflake_query_engine integration",
    "version": "0.4.0",
    "project_urls": null,
    "split_keywords": [
        "engine",
        " query",
        " snowflake"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "32109dfc0a437ac6ae64836cccafc26dc1b500a5ac9b11aa8302b96bdd4e9c60",
                "md5": "958a63c377f3e0b9c6250fa31195905d",
                "sha256": "383af6dcef54bfd37907a26d5101c5b89df0fc73c3da89af12c73e88b9b599e7"
            },
            "downloads": -1,
            "filename": "llama_index_packs_snowflake_query_engine-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "958a63c377f3e0b9c6250fa31195905d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 3360,
            "upload_time": "2024-11-17T22:42:47",
            "upload_time_iso_8601": "2024-11-17T22:42:47.483719Z",
            "url": "https://files.pythonhosted.org/packages/32/10/9dfc0a437ac6ae64836cccafc26dc1b500a5ac9b11aa8302b96bdd4e9c60/llama_index_packs_snowflake_query_engine-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e9780710c12ae480a808c2f9e63f91a92fd4b64e236c8c59872cb3e655c266d",
                "md5": "ab6976a0ef54b32bd34532a54a8b4296",
                "sha256": "626e91ea4e543ff80c71d8b1beb5e26250e5e9f82429f9a7a23d32505e3a0dde"
            },
            "downloads": -1,
            "filename": "llama_index_packs_snowflake_query_engine-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ab6976a0ef54b32bd34532a54a8b4296",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 2955,
            "upload_time": "2024-11-17T22:42:48",
            "upload_time_iso_8601": "2024-11-17T22:42:48.284316Z",
            "url": "https://files.pythonhosted.org/packages/8e/97/80710c12ae480a808c2f9e63f91a92fd4b64e236c8c59872cb3e655c266d/llama_index_packs_snowflake_query_engine-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 22:42:48",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-packs-snowflake-query-engine"
}
        
Elapsed time: 0.58421s