From 41a0224af7d44f4cbc64fcf3f23f7f665ba92d13 Mon Sep 17 00:00:00 2001 From: Collin Dutter Date: Wed, 30 Aug 2023 15:18:59 -0700 Subject: [PATCH] Update snowflake docs --- docs/griptape-framework/data/sql-drivers.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/docs/griptape-framework/data/sql-drivers.md b/docs/griptape-framework/data/sql-drivers.md index bfd8fe3c..3a88b913 100644 --- a/docs/griptape-framework/data/sql-drivers.md +++ b/docs/griptape-framework/data/sql-drivers.md @@ -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;") -``` \ No newline at end of file +driver.execute_query("SELECT * from PEOPLE;") +```