Skip to main content

llama-index readers snowflake integration

Project description

Snowflake Loader

pip install llama-index-readers-snowflake

This loader connects to Snowflake (using SQLAlchemy under the hood). The user specifies a query and extracts Document objects corresponding to the results. You can use this loader to easily connect to a database on Snowflake and pass the documents into a GPTSQLStructStoreIndex from LlamaIndex.

Usage

Option 1: Pass your own SQLAlchemy Engine object of the database connection

Here's an example usage of the SnowflakeReader.

from llama_index.readers.snowflake import SnowflakeReader

reader = SnowflakeReader(
    engine=your_sqlalchemy_engine,
)

query = "SELECT * FROM your_table"

documents = reader.load_data(query=query)

Option 2: Pass the required parameters to esstablish Snowflake connection

Here's an example usage of the SnowflakeReader.

from llama_index.readers.snowflake import SnowflakeReader

reader = SnowflakeReader(
    account="your_account",
    user="your_user",
    password="your_password",
    database="your_database",
    schema="your_schema",
    warehouse="your_warehouse",
    role="your_role",  # Optional role setting
    proxy="http://proxusername:proxypassword@myproxy:port",  # Optional proxy setting
)

query = "SELECT * FROM your_table"

documents = reader.load_data(query=query)

Author

Godwin Paul Vincent

This loader is designed to be used as a way to load data into LlamaIndex.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_readers_snowflake-0.4.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_snowflake-0.4.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_snowflake-0.4.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_snowflake-0.4.0.tar.gz
Algorithm Hash digest
SHA256 34a8c46e69d62b8656f1fd14cc055ad906bb17c820805b34713634c4025ab22e
MD5 4d0f37ea81fd96981f2d4a3b959d2065
BLAKE2b-256 13104f2f9ea3e3d45f3dc8f95ac93478f0aab0af997a4e7e114bdfad3af5f616

See more details on using hashes here.

File details

Details for the file llama_index_readers_snowflake-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_snowflake-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d043973d1c63a78b306b641f0d86b78006367b9ca5a602ce2183a10c19ca2cdb
MD5 4b9c857bf5a581b8bad334855baa54f8
BLAKE2b-256 b671c93edacc504ac1f224923c590ed88fd7de99b0b76a87bd40ab438248eeea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page