DBT Cloud Account and project Setup
ฝัง
- เผยแพร่เมื่อ 6 ก.พ. 2025
- This is the first video in the new playlist for DBT. In this playlist we will learn all the basics of DBT and also advance implementation.
Below is the Snowflake environment/object creation script
-------------------------------------------------------------------------------------------------
--Grant warehouse access to useradmin and sysadmin
use role accountadmin;
grant usage on warehouse compute_wh to role useradmin;
grant usage on warehouse compute_wh to role sysadmin;
--Create database,schema and warehouse for DBT_user
use role accountadmin;
create or replace database analytics;
create or replace schema analytics.raw with managed access;
create or replace schema analytics.stg with managed access;
create or replace schema analytics.rpt with managed access;
create or replace warehouse dbt_wh with WAREHOUSE_SIZE = MEDIUM;
--Create DBT User and DBT Role to be used by DBT account
use role accountadmin;
create or replace role dbt_role;
create or replace user dbt_user identified by 'Dbttest@111';
--Grant Usage on DBT_ROLE and DBT_WH to DBT_USER
use role securityadmin;
grant role dbt_role to user dbt_user;
grant role dbt_role to role useradmin;
grant usage on warehouse dbt_wh to dbt_role;
-- database and schema usage grants
grant usage on database analytics to role dbt_role;
grant usage on schema analytics.raw to role dbt_role;
grant usage on schema analytics.stg to role dbt_role;
grant usage on schema analytics.rpt to role dbt_role;
grant create view on schema analytics.raw to role dbt_role;
grant create view on schema analytics.stg to role dbt_role;
grant create view on schema analytics.rpt to role dbt_role;
GRANT all ON FUTURE TABLES IN DATABASE analytics TO ROLE dbt_role;
grant create table on schema analytics.stg to role dbt_role;
grant create table on schema analytics.raw to role dbt_role;
grant create table on schema analytics.rpt to role dbt_role;
--grant for usage schema to role dbt_role
use role accountadmin;
grant imported privileges on database snowflake to role dbt_role;
use role accountadmin;
alter warehouse dbt_wh set WAREHOUSE_SIZE = 'XLARGE';
use role dbt_role;
use warehouse dbt_wh;
create or replace table ANALYTICS.RAW.customer as
select * from snowflake_sample_data.tpch_sf100.customer;
create or replace table analytics.raw.lineitem as
select * from SNOWFLAKE_SAMPLE_DATA.TPCH_SF100.LINEITEM;
create or replace table ANALYTICS.RAW.nation as
select * from snowflake_sample_data.tpch_sf100.nation;
create or replace table ANALYTICS.RAW.orders as
select * from snowflake_sample_data.tpch_sf100.orders;
create or replace table ANALYTICS.RAW.part as
select * from snowflake_sample_data.tpch_sf100.part;
create or replace table ANALYTICS.RAW.partsupp as
select * from snowflake_sample_data.tpch_sf100.partsupp;
create or replace table ANALYTICS.RAW.region as
select * from snowflake_sample_data.tpch_sf100.region;
create or replace table ANALYTICS.RAW.supplier as
select * from snowflake_sample_data.tpch_sf100.supplier;
use role accountadmin;
alter warehouse dbt_wh set WAREHOUSE_SIZE = 'MEDIUM';
#snowflake #streamlit #datascience #dataengineering #datawarehouse #reportingtool #looker #microstrategy #tutorial #tutorials #tutorialyoutube #snowflaketutorial #oracle #postgresql #rdbms #plsq #dbt #tuotorial
❤❤
Make complete videos bro ❤ thnk u so much
Complete ? What got left in agenda ?
Do you provided dbt training?
Sir do u have paid course in dbt
Yes ...plz join my group for details chat.whatsapp.com/Jz2ltS009Zi9DqXgiQMG0U