Hi I want to use the concept of scratch schemas (<...
# announcements
n
Hi I want to use the concept of scratch schemas (https://gitlab.com/gitlab-data/analytics/blob/master/.gitlab/issue_templates/data_onboarding.md#L15) similar to gitlab analytics team. https://gitlab.com/gitlab-data/analytics/blob/master/load/snowflake/roles.yml. I am not sure how can i use meltano permissions to achieve giving access scratch schema to the individual users
y
You can have one role dedicated to each user that owns the scratch schema and then each user is part of that role also:
Copy code
... ... ... 
# User Roles
roles:
    ... ... ... 
    - iroussos:
        warehouses:
            ... ... ... 
        owns:
            schemas:
                - analytics.iroussos_scratch
... ... ...

# Users
users: 
    ... ... ... 
    - iroussos:
        can_login: yes
        member_of:
            ... ... ... 
            - iroussos
... ... ...
In the case above the scratch schema for each user is in the
analytics
DB but it could be in a DB named
scratch_schemas
or whatever
n
Is there a way to set autoresume on in the spec?
y
No we have not added such an option. I assume that you want the script to run:
Copy code
ALTER WAREHOUSE <name> RESUME IF SUSPENDED
Can you please add an issue in the meltano project so that we can add this in one of the following milestones?
n
dumb question, why cant I click submit? I must be doing something stupid.
a
No title
m
Quick one @austin_pray
n
@yannis_roussos https://gitlab.com/meltano/meltano/issues/954 added the above discussed issue. Thanks
y
Thank you @nehil_jain. Depending on our priorities, it will be added one of the following Milestones.
n
Does the spec work with snowflake functions?
Copy code
analyst:
      warehouses:
        - analyst_warehouse
      privileges:
        databases:
          read:
            - db_apps
            - snowflake
        schemas:
          read:
            - db_apps.*  
            - snowflake.*
        tables:
          read:
            - db_apps.*.*
            - snowflake.*.*
analyst role defined above doesnt have usage on the functions in the schemas in db_apps 😞
Copy code
GRANT USAGE, MONITOR, CREATE TABLE, CREATE VIEW, CREATE STAGE, CREATE FILE FORMAT, CREATE SEQUENCE, CREATE FUNCTION, CREATE PIPE ON SCHEMA DB_APPS.BIDDING TO ROLE analyst;
but this doesnt give access to the already existing functions or functions created by another role right?
y
That's interesting. We don't have any such functions, so I can not test that issue. If you have a tested, proposed solution please send it to us by creating an issue and we'll update the Grant we generate for roles 🙂