A few mistakes in the "Chat with your Snowflake database using Gemini" documentation (https://vanna.ai/docs/configure/gemini/snowflake) #1024
badgiojuni
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have noticed two code errors on this documentation page.
Configure Your Agent Memory section
Code is currently:
To avoid a NameError because
toolsis not defined, code should be:Configure Your Database section
Select Snowflake as the database option.
In the code section ``# Option 2: RSA Key-Pair Authentication (recommended for production) ```, code is currently:
db_tool = RunSqlTool( sql_runner=SnowflakeRunner( account="your-account", username="your-username", private_key_path="/path/to/rsa_key.p8", private_key_passphrase="your-passphrase", # Optional if key is encrypted database="your-database", warehouse="your-warehouse" ) )if you execute it, you'll get the following error:
ProgrammingError: 251006: Password is empty
Two things happen:
authenticator="SNOWFLAKE_JWT"argument in the SnowflakeRunner call above. If not,authenticator="SNOWFLAKE"by default and it falls back to the deprecated user/password identification method.private_key_pathargument does not provide the path to your private RSA key when connection to snowflake is setting up so one would get the following error: TypeError : Expected bytes or RSAPrivateKey, got <class 'NoneType'>.Instead, use the
private_file_pathargument, it works like a charm.Thereby this code section should be:
db_tool = RunSqlTool( sql_runner=SnowflakeRunner( account="your-account", username="your-username", private_key_file="/path/to/rsa_key.p8", ############################################## here we replace 'private_key_path' by 'private_key_file' private_key_passphrase="your-passphrase", # Optional if key is encrypted database="your-database", warehouse="your-warehouse", authenticator ="SNOWFLAKE_JWT" ############################################## add the authenticator argument ) )Beta Was this translation helpful? Give feedback.
All reactions