Created
July 1, 2015 14:39
-
-
Save donigian/18fc8a9d04b02dfeba91 to your computer and use it in GitHub Desktop.
RedShift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setup Database | |
create database [db-name]; | |
revoke all on schema public from public; | |
create schema [schema-name]; | |
create table [schema-name].[table-name]( | |
... | |
) | |
Create Read-only User | |
create user [user-name] password '[password]'; | |
grant usage on schema [schema-name] to [user-name]; | |
alter user [user-name] set search_path to [schema-name]; | |
grant select on table [schema-name].[table-name] to [user-name]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment