snowsql

How to call snowsql client from python

房东的猫 提交于 2021-01-29 06:05:20
问题 I'm calling snowsql client from shell script. I'm importing properties file by doing source. And invoking snowsql client. How can I do the same in Python? Any help would be highly appreciated. Shell script to call snowsql client: source /opt/data/airflow/config/cyrus_de/snowflake_config.txt sudo /home/user/snowsql -c $connection --config=/home/user/.snowsql/config -w $warehouse --variable database_name=$dbname --variable stage=$stagename --variable env=$env -o exit_on_error=true -o variable

SnowSQL fails with “The library Security could not be found” after upgrading to mac Big Sur

拜拜、爱过 提交于 2020-12-12 10:44:07
问题 After upgrading to macOS Big Sur my snowsql scripts all fail with "The Library Security could not be found" $ snowsql -q "select 1 x" User: me Password: XXX The library Security could not be found If the error message is unclear, enable logging using -o log_level=DEBUG and see the log to find out the cause. Contact support for further help. Goodbye! This reminds me of an issue I ran into with the snowflake-connector-python library involving oscrypto library being used instead of openssl when

Adding current date in create script for Snowflake

流过昼夜 提交于 2020-06-29 05:24:50
问题 I have a requirement where I have to create tables with the date/datetime in the table name when they were created dynamically.Wondering if this option is possible in Snowflake? Eg: I would need somethinglike this. CREATE TABLE someNewTable_YYYYMMDD Thank you for your responses; Best, AB 回答1: You can achieve this using SQL variables and the IDENTIFIER keyword. Here's an example that adds the current date into the table-name: SET table_name=(SELECT 'someNewTable_' || TO_VARCHAR(CURRENT_DATE(),