-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.sql
37 lines (32 loc) · 966 Bytes
/
setup.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use role accountadmin;
create role autopilot_role;
grant create integration
on account
to role autopilot_role;
create database autopilot_db;
grant usage on database autopilot_db
to role autopilot_role;
create schema demo;
grant ownership
on schema autopilot_db.demo
to role autopilot_role;
create warehouse autopilot_wh
with warehouse_size = 'medium';
grant modify,monitor,usage,operate
on warehouse autopilot_wh
to role autopilot_role;
create user autopilot_user
-- change the value for password in the line below
password = '<password>'
login_name = 'autopilot_user'
display_name = 'autopilot_user'
-- update the values for first/last name in he lines below
first_name = '<first name>'
last_name = '<last name>'
email = '<email address>'
default_role = autopilot_role
default_warehouse = autopilot_wh
default_namespace = autopilot_db
must_change_password = false;
grant role autopilot_role
to user autopilot_user;