mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-08 21:34:25 +00:00
chore(snowflake): add commands
This commit is contained in:
@@ -161,12 +161,14 @@ CREATE ROLE IF NOT EXISTS some_service_role;
|
|||||||
SHOW GRANTS TO ROLE SYSADMIN;
|
SHOW GRANTS TO ROLE SYSADMIN;
|
||||||
-- Show permissions the current role has on other objects
|
-- Show permissions the current role has on other objects
|
||||||
SHOW GRANTS ON ROLE SYSADMIN;
|
SHOW GRANTS ON ROLE SYSADMIN;
|
||||||
|
SHOW CALLER GRANTS ON TABLE PROD_DWH.APP_PRODUCTION.FEATURES;
|
||||||
|
|
||||||
-- Grant permissions to roles
|
-- Grant permissions to roles
|
||||||
GRANT ROLE USERADMIN TO ROLE some_service_role;
|
GRANT ROLE USERADMIN TO ROLE some_service_role;
|
||||||
GRANT USAGE ON WAREHOUSE COMPUTE_WH TO ROLE SYSADMIN;
|
GRANT USAGE ON WAREHOUSE COMPUTE_WH TO ROLE SYSADMIN;
|
||||||
GRANT USAGE ON DATABASE dev_dwh TO ROLE some_service_role;
|
GRANT USAGE ON DATABASE dev_dwh TO ROLE some_service_role;
|
||||||
GRANT USAGE ON SCHEMA dev_dwh.public TO ROLE some_service_role;
|
GRANT USAGE ON SCHEMA dev_dwh.public TO ROLE some_service_role;
|
||||||
|
GRANT SELECT ON TABLE features IN SCHEMA dev_dwh.public TO ROLE some_service_role;
|
||||||
GRANT SELECT, INSERT ON ALL TABLES IN SCHEMA dev_dwh.public TO ROLE some_service_role;
|
GRANT SELECT, INSERT ON ALL TABLES IN SCHEMA dev_dwh.public TO ROLE some_service_role;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,12 @@ snow sql
|
|||||||
snow connection test --temporary-connection --account 'ABCDEFG-YZ01234' --username 'JDOE' --password '<PAT>'
|
snow connection test --temporary-connection --account 'ABCDEFG-YZ01234' --username 'JDOE' --password '<PAT>'
|
||||||
SNOWFLAKE_ACCOUNT='ABCDEFG-YZ01234' SNOWFLAKE_USER='JDOE' SNOWFLAKE_PASSWORD='SuperSecur3Pa$$word' snow \
|
SNOWFLAKE_ACCOUNT='ABCDEFG-YZ01234' SNOWFLAKE_USER='JDOE' SNOWFLAKE_PASSWORD='SuperSecur3Pa$$word' snow \
|
||||||
connection test --temporary-connection
|
connection test --temporary-connection
|
||||||
|
|
||||||
|
# Execute SQL
|
||||||
|
snow sql --temporary-connection \
|
||||||
|
--account 'ABCDEFG-YZ01234' --username 'REDASH_SERVICE_USER' --role 'ANALYST_FR' --warehouse 'REDASH_WH' \
|
||||||
|
--password 'ey…W3.ey…1Z.wT…F4--8N…gV-91L_C3…me_tGQf' \
|
||||||
|
--query 'SELECT * FROM VENDORS limit 1;'
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|||||||
Reference in New Issue
Block a user