Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Update snowflake docs
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter committed Aug 30, 2023
1 parent 663c0dc commit 41a0224
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions docs/griptape-framework/data/sql-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,17 @@ import snowflake.connector
from snowflake.connector import SnowflakeConnection
from griptape.drivers import SnowflakeSqlDriver

PWD = os.environ.get('PWD')

def get_snowflake_connection() -> SnowflakeConnection:
return snowflake.connector.connect(
account = 'account',
user = 'user',
password = PWD,
database = 'database',
schema = 'schema',
account=os.environ['SNOWFLAKE_ACCOUNT'],
user=os.environ['SNOWFLAKE_USER'],
password=os.environ['SNOWFLAKE_PASSWORD'],
database=os.environ['SNOWFLAKE_DATABASE'],
schema=os.environ['SNOWFLAKE_SCHEMA'],
warehouse=os.environ['SNOWFLAKE_WAREHOUSE']
)

driver=SnowflakeSqlDriver(
connection_func=get_snowflake_connection
)
driver = SnowflakeSqlDriver(connection_func=get_snowflake_connection)

driver.execute_query("select * from users;")
```
driver.execute_query("SELECT * from PEOPLE;")
```

0 comments on commit 41a0224

Please sign in to comment.