We will need a database to house the data and readonly user for metabase to connect to the data warehouse from.
The job should do a create database if not exists... and create a user and give that user select permission on all schemas/tables. The user part will likely require a do block and some iterating over schemas. There is no create user if not exists... statement.
AC:
[x] a job exists that runs on pre-install & pre-upgrade
[x] the job creates a database if the database doesn't exist
[x] the job creates a user if the user does not exist
[ ] the job assigns usage on all schemas in the database and select permissions on all tables in all schemas
We will need a database to house the data and readonly user for metabase to connect to the data warehouse from. The job should do a
create database if not exists...
and create a user and give that user select permission on all schemas/tables. The user part will likely require a do block and some iterating over schemas. There is nocreate user if not exists...
statement.AC: