Issue running pgwarehouse commands
Closed this issue · 2 comments
I've setup my pgwarehouse_conf.yaml config file as below:
postgres:
pgdatabase: 'dbname'
pghost: 'host_name'
pgpassword: 'pw'
pgschema: 'schemaname'
pguser: 'username'
warehouse:
backend: snowflake
snowsql_account: 'xxxx.eu-west-3.aws'
snowsql_database: 'database_name'
snowsql_pwd: 'snowflake_password'
snowsql_user: 'username'
snowsql_schema: 'public'
snowsql_warehouse: 'warehouse_name'
snowsql_role: 'accountadmin'
Values have been changed for obvious reasons.
I've tested these connection parameters individually for postgres and snowflake, and they work.
However, whenever I run pgwarehouse commands, it gives me an "snowflake.connector.errors.ProgrammingError: 002043 (02000): SQL compilation error:" error . Please advise.
Example:
pgwarehouse listwh
Traceback (most recent call last):
File "/opt/homebrew/bin/pgwarehouse", line 8, in
sys.exit(main())
File "/opt/homebrew/lib/python3.10/site-packages/pgwarehouse/main.py", line 25, in main
pgw = PGWarehouse(
File "/opt/homebrew/lib/python3.10/site-packages/pgwarehouse/pgwarehouse.py", line 66, in init
self.backend = SnowflakeBackend(warehouse_config, self)
File "/opt/homebrew/lib/python3.10/site-packages/pgwarehouse/snowflake_backend.py", line 32, in init
self.setup_env()
File "/opt/homebrew/lib/python3.10/site-packages/pgwarehouse/snowflake_backend.py", line 49, in setup_env
self.snow_cursor.execute("use warehouse " + self.snowsql_warehouse + "; ")
File "/opt/homebrew/lib/python3.10/site-packages/snowflake/connector/cursor.py", line 1080, in execute
Error.errorhandler_wrapper(self.connection, self, error_class, errvalue)
File "/opt/homebrew/lib/python3.10/site-packages/snowflake/connector/errors.py", line 290, in errorhandler_wrapper
handed_over = Error.hand_to_other_handler(
File "/opt/homebrew/lib/python3.10/site-packages/snowflake/connector/errors.py", line 345, in hand_to_other_handler
cursor.errorhandler(connection, cursor, error_class, error_value)
File "/opt/homebrew/lib/python3.10/site-packages/snowflake/connector/errors.py", line 221, in default_errorhandler
raise error_class(
snowflake.connector.errors.ProgrammingError: 002043 (02000): SQL compilation error:
Object does not exist, or operation cannot be performed.
can you confirm the value of snowsql_warehouse
? If you connect via snowsql and run use warehouse <warehouse>
does it work? Maybe there is some quoting issue. Feel free to email me directly scottpersinger at gm... .
This should be fixed in #11