filmov
tv
Control Transactions in Python-Snowflake Connection

Показать описание
In this video , I have discussed how to control Transactions in Python-Snowflake Connection
Prerequisite:
-----------------------
Transaction, Commit and Rollback in Snowflake
Transaction in Stored Procedure in-depth intuition
Snowflake Query:
---------------------------
--drop database if required
drop database if exists ramu;
--Create Database
create database if not exists ramu;
--use the database
use ramu;
create or replace table employee_history(employee_id number,
empl_join_date date,
dept varchar(10),
salary number,
manager_id number);
select * from employee_history;
create or replace table employee_history2(employee_id number,
empl_join_date date,
dept varchar(10),
salary number,
manager_id number);
select * from employee_history2;
Code without transaction control:
-------------------------------------------------------------
user=""
password=""
account=""
statement_1 = 'use warehouse COMPUTE_WH'
statement2 = "alter warehouse COMPUTE_WH resume IF SUSPENDED"
statement3 = "use database RAMU"
statement4 = "use role ACCOUNTADMIN"
statement5 = "use schema PUBLIC"
Code with transaction control:
-------------------------------------------------------------
import pandas as pd
user=""
password=""
statement_1 = 'use warehouse COMPUTE_WH'
statement2 = "alter warehouse COMPUTE_WH resume IF SUSPENDED"
statement3 = "use database RAMU"
statement4 = "use role ACCOUNTADMIN"
statement5 = "use schema PUBLIC"
Check this playlist for more Data Engineering related videos:
Snowflake Complete Course from scratch with End-to-End Project with in-depth explanation--
🙏🙏🙏🙏🙏🙏🙏🙏
YOU JUST NEED TO DO
3 THINGS to support my channel
LIKE
SHARE
&
SUBSCRIBE
TO MY YOUTUBE CHANNEL
Prerequisite:
-----------------------
Transaction, Commit and Rollback in Snowflake
Transaction in Stored Procedure in-depth intuition
Snowflake Query:
---------------------------
--drop database if required
drop database if exists ramu;
--Create Database
create database if not exists ramu;
--use the database
use ramu;
create or replace table employee_history(employee_id number,
empl_join_date date,
dept varchar(10),
salary number,
manager_id number);
select * from employee_history;
create or replace table employee_history2(employee_id number,
empl_join_date date,
dept varchar(10),
salary number,
manager_id number);
select * from employee_history2;
Code without transaction control:
-------------------------------------------------------------
user=""
password=""
account=""
statement_1 = 'use warehouse COMPUTE_WH'
statement2 = "alter warehouse COMPUTE_WH resume IF SUSPENDED"
statement3 = "use database RAMU"
statement4 = "use role ACCOUNTADMIN"
statement5 = "use schema PUBLIC"
Code with transaction control:
-------------------------------------------------------------
import pandas as pd
user=""
password=""
statement_1 = 'use warehouse COMPUTE_WH'
statement2 = "alter warehouse COMPUTE_WH resume IF SUSPENDED"
statement3 = "use database RAMU"
statement4 = "use role ACCOUNTADMIN"
statement5 = "use schema PUBLIC"
Check this playlist for more Data Engineering related videos:
Snowflake Complete Course from scratch with End-to-End Project with in-depth explanation--
🙏🙏🙏🙏🙏🙏🙏🙏
YOU JUST NEED TO DO
3 THINGS to support my channel
LIKE
SHARE
&
SUBSCRIBE
TO MY YOUTUBE CHANNEL
Комментарии