Thanks for note, I see it in snowflake docs now saying. [ VOLATILE | IMMUTABLE ] -- Note: VOLATILE and IMMUTABLE are deprecated. Ref: docs.snowflake.com/en/sql-reference/sql/create-procedure.html
Thank you 🙏 for watching my video and your word of appreciation really means a lot to me. ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ I have already published other knowledge series and snowflake certification videos and if you are interested, you can refer them. 🌐 Snowflake Complete Guide Playlist ➥ bit.ly/3iNTVGI 🌐 SnowPro Guide ➥ bit.ly/35S7Rcb 🌐 Snowflake SQL Series Playlist ➥ bit.ly/3AH6kCq 🌐 SnowPro Question Dump (300 questions) ➥ bit.ly/2ZLQm9E
Thanks a millions for this wonderful training for Snowflake developers. have one doubt regarding ROLE and ACCESS. in this videos-- in chapter-20- you said Role and users are to be created by security-admin role but you are using account-admin role for creating USER (lead01 & lead02) and ROLE(created by Security-admin) assigning to those user. and again you switch to Securtiy-admin to assign role to role. not having clear understanding when and on what we can use those roles.
- Users should be created by user-admin - Role assigment should be done by Security admin (that's why it is named as security admin) Let me re-look into the content... but your observation is right..
Thanks a lot for all the free videos. I am already certified however I am still learning a lot of real time content from your videos. 🙂Do you have any plans in making the videos on snowpark?.
You're very welcome! Will do it ..may take sometime... as need to understand the demand of audience... What specific challenge you have.. or area you wan to focus.. if you can drop note here or in my insta account .. I can design the course and publish it.
Yours videos are great. Do you have any insight about stored procedure in Javascript vs stored procedure in Python ? for the cost, performance, devOps...
Nice info, how can we implement SAP hana view reporting logic in snowflake procedure, that logic has multiple steps each step is depends on previous steps and it has if and case related stuff as ell
@@DataEngineering Thanks for the response and yeah i am using javascript to write procedures in snowflake for that logic but need some info how to implement as i know only the basics of stored procedures in Snowflake, can you guide me link or article which i can refer for the same
Hi @@Anil_Rishvik_Memories , now sure how helpful I will be as there are limited content available for javascript stored procedure and I am planning to make a playlist in future. If you can share your high level logic to my instagram account (instagram.com/learn_dataengineering/), I can review and see if I can guide you or point to some good content available out.
Thanks for your videos. I have question when I tried to simulate the first procedure purge_inactive_customer, I had to use double-quotes instead of single-quotes around the sqlText. Do you know why? Thanks again! example "DELETE FROM CUSTOMER WHERE CUST_STATUS = 'Inactive';" instead of 'DELETE FROM CUSTOMER WHERE CUST_STATUS = 'Inactive';'
This worked for me.. $$ var rs = snowflake.execute( { sqlText: `DELETE FROM CUSTOMER WHERE CUST_STATUS = 'Inactive';` } ); return 'Inactive customers purged.'; $$; Where are you trying this.. snowsight or legacy webui? I tried in snowsight and it worked for me...
Thanks for the videos, your videos are really very helpful. Can you help me with creating stored procedure using java script for inserting data into dimension tables(target)
Yes, you can and for that you have to create an external function first.. and then you can call it as function.. the function is processed per row basis.. so for example.. if you want to trasnlate the desc from language-1 to language-2 such use cases can be managed.. but just calling an API to get a single value like Java or python.. may not work.. or we need to check the documentation...
There are lot of content available on Snowpark... don't they give enough or good explaination.. if not..then I can make video around it... It needs a complete playlist as there are lot of key concept around snowpark. Feel free to share your though or drop me a note to my instagram or facebook msg. instagram.com/learn_dataengineering/ fb.me/learndataengineering
There is no direct way to see... it has to be stored in a string and then return and using result_scan, the values can be captured.. this is a work around but there is no direct way to do it.
Hi, thnak you for your videos. But I need one help -- I am working on automating Poricedures depedncies with Javascript in SP, But I am not sure how to debug it as simple print ,ie, Cosnole.log(message) does not give any Output. I am totaly new to JS, so not sure why Its not working. and I am stuck with my code errors as I am not able to debug.
Thanks for your note and I am really not sure how to help you without knowing the actual problem statement. It is a challenge debugging javascript in Snowflake unless you have worked in the past. Either you can add your domain problem here, or post a direct message to my instagram account (instagram.com/learn_dataengineering/)
Thanks @Swati for your note... to some extend yes.. to really leverage the power of snowflake, SQL is must.. to some extend cloud storage integration... For analyst, programming is not must and you can even pull snowflake data into excel (and power query) and perform transformation and analysis Watch my latest video ruclips.net/video/X4uXkGS0dUQ/видео.html
Hi I am getting error while executing the following stored procedure. Can you please help me to fix the issue? create or replace procedure customers_insert_procedure(LNAME VARCHAR) returns string language javascript as $$ var sql_command = 'INSERT INTO CUSTOMER1(LNAME) VALUES(:1);' snowflake.execute ( { sqlText: sql_Command, binds: [LNAME] }); return "successfully executed."; $$; calling the procedure: create or replace task procedure_task warehouse = compute_wh schedule = '1 minute' as call customers_insert_procedure ('JACK');
Great video! Great content. One question is can we use nested CTE as below with in sql or javascript construct? Is this valid at all? Do we have any limitation on number of CTE we can use (CT1,CT2,CT3------) CREATE OR REPLACE PROCEDURE sp5() RETURNS string LANGUAGE javascript AS $$ var my_sql_command = `with ct1 (f1,f2) as (select f1,f2 from TEST_1.PUBLIC.TEST11) ct2 (f1,f3) as (select f1,f3 from TEST_1.PUBLIC.TEST12) ct3 (f1,f2,f3) as (select a.f1,f2,f3 from TEST_1.PUBLIC.TEST11 a left join TEST_1.PUBLIC.TEST12 b on a.f1 = b.f1) insert into TEST_1.PUBLIC.EMP1 (f1,f2,f3) select f1,f2,f3 from ct2;`;
var statement1 = snowflake.createStatement( {sqlText: my_sql_command} ); var result_set1 = statement1.execute(); return "Done"; $$; call sp5();
Thanks Abhi ... as far as I know, having nested CET should not be an issue... SQL Scripting is new addition in stored proc space. Worth trying this use case and see how it works in snowflake. Thanks again for sharing your use case, it helps community to know about these challenges if they are trying to solve the same use case.
I am trying to create to Create stored proc with "java" i am getting error. can you please check. CREATE OR REPLACE PROCEDURE MYPROC(x int) RETURNS int LANGUAGE JAVA PACKAGES = ('com.snowflake:snowpark:latest') HANDLER = 'MyJavaClass.run' AS $$ import com.snowflake.snowpark_java.*; public class MyJavaClass { public Integer run(int y) { return y; } } $$;
@@DataEngineering sorry i dont use insta, btw can we write a procedure to run a sql query where we chose lang = java, why i see people use java script only.
The following keywords for the CREATE PROCEDURE command are deprecated on May 12, 2022
IMMUTABLE
VOLATILE
Thanks for note, I see it in snowflake docs now saying.
[ VOLATILE | IMMUTABLE ] -- Note: VOLATILE and IMMUTABLE are deprecated.
Ref:
docs.snowflake.com/en/sql-reference/sql/create-procedure.html
@@DataEngineering poo plotw
Thank you Sir, I completed snowpro certification. Your videos on topics and practice tests made 80% of my preparation
Wonderful and congratulation on your success.
I want to contact you..may ask your email id..
Thank you so much for your great effort sir.. We owe you for such free teaching with so much in detail knowledge.
It's my pleasure
Your connect and explanation is great! One can get well experienced in snowflake just by following your channel. Thank you!
Great to hear!
Thanks for sharing. Videos are very helpful to me to learn Snowflake.
Glad to hear that!
Thanks sir awesome explanation
Thanks for liking
Amazing video sir. every concept is well explained with example. Thank you for sharing your knowledge.
You are most welcome
Thanks a million Sir.. We are very grateful to you for such a great effort and sharing your knowledge. Respect 🙏!!
Thanks and welcome
Great Work.
Thank you 🙏 for watching my video and your word of appreciation really means a lot to me.
Thank you so much for all your videos , every topic explained very well .
Thank you 🙏 for watching my video and your word of appreciation really means a lot to me.
⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡
I have already published other knowledge series and snowflake certification videos and if you are interested, you can refer them.
🌐 Snowflake Complete Guide Playlist ➥ bit.ly/3iNTVGI
🌐 SnowPro Guide ➥ bit.ly/35S7Rcb
🌐 Snowflake SQL Series Playlist ➥ bit.ly/3AH6kCq
🌐 SnowPro Question Dump (300 questions) ➥ bit.ly/2ZLQm9E
Thanks a millions for this wonderful training for Snowflake developers. have one doubt regarding ROLE and ACCESS. in this videos--
in chapter-20- you said Role and users are to be created by security-admin role but you are using account-admin role for creating USER (lead01 & lead02) and ROLE(created by Security-admin) assigning to those user. and again you switch to Securtiy-admin to assign role to role. not having clear understanding when and on what we can use those roles.
- Users should be created by user-admin
- Role assigment should be done by Security admin (that's why it is named as security admin)
Let me re-look into the content... but your observation is right..
Thank you so much! It was excellent.
You're very welcome!
Amazing content, very useful as always...
Thank you 🙏 for watching my video and your word of appreciation really means a lot to me.
Thanks a lot for all the free videos. I am already certified however I am still learning a lot of real time content from your videos. 🙂Do you have any plans in making the videos on snowpark?.
You're very welcome! Will do it ..may take sometime... as need to understand the demand of audience...
What specific challenge you have.. or area you wan to focus.. if you can drop note here or in my insta account .. I can design the course and publish it.
Thank you for creating these videos 👏
Glad you like them!
Your video tutorials are great. Thanks. Is there a way to see the query that was used to create and populate the tables and views for past years?
Thank you so much Sir!!
most welcome
Yours videos are great. Do you have any insight about stored procedure in Javascript vs stored procedure in Python ? for the cost, performance, devOps...
Not yet.. will consider it in future.. it is a very rare requirement..
hi you are doing great work can you make storedprocedure in SQL Language with proper examples
will do it soon...
Thanks alot!😀
Happy to help
Thanks a lot 👍🏻
You're welcome! and liked you are dropping a note after finishing each chapter.
Hi Snowflake is coming up with the new version of the snowpro core examination ? how much difference it will make ?
The weightage is changing but overlal the coverage is some.
stored procedure is dead ? For ETL we can use spark or snowpark right ?
Nice info, how can we implement SAP hana view reporting logic in snowflake procedure, that logic has multiple steps each step is depends on previous steps and it has if and case related stuff as ell
For such complex logic, you can write java or java script stored procedure rather using SQL based stored procedure.
@@DataEngineering Thanks for the response and yeah i am using javascript to write procedures in snowflake for that logic but need some info how to implement as i know only the basics of stored procedures in Snowflake, can you guide me link or article which i can refer for the same
Hi @@Anil_Rishvik_Memories , now sure how helpful I will be as there are limited content available for javascript stored procedure and I am planning to make a playlist in future. If you can share your high level logic to my instagram account (instagram.com/learn_dataengineering/), I can review and see if I can guide you or point to some good content available out.
@@DataEngineering yes shared the same in your insta message
Youre amazing, thank you so much
You're so welcome!
Thanks for your videos. I have question when I tried to simulate the first procedure purge_inactive_customer, I had to use double-quotes instead of single-quotes around the sqlText. Do you know why? Thanks again! example "DELETE FROM CUSTOMER WHERE CUST_STATUS = 'Inactive';" instead of 'DELETE FROM CUSTOMER WHERE CUST_STATUS = 'Inactive';'
This worked for me..
$$
var rs = snowflake.execute( { sqlText:
`DELETE FROM CUSTOMER WHERE CUST_STATUS = 'Inactive';`
} );
return 'Inactive customers purged.';
$$;
Where are you trying this.. snowsight or legacy webui? I tried in snowsight and it worked for me...
do we have any custom tool to convert SAP ABAP code to Snowsql?
Thanks for the videos, your videos are really very helpful. Can you help me with creating stored procedure using java script for inserting data into dimension tables(target)
Will try
Request you to keep all queries,data that are used in vedios inside the discription box as text files.
Noted
Excellent tutorials! I find the tree view of course content very helpful. Is it shared anywhere? Thanks!
Not yet!
Hello sir , thank you for the video, can we call thirdpary api call inside storedprocedure ?
Yes, you can and for that you have to create an external function first.. and then you can call it as function.. the function is processed per row basis.. so for example.. if you want to trasnlate the desc from language-1 to language-2 such use cases can be managed.. but just calling an API to get a single value like Java or python.. may not work.. or we need to check the documentation...
Hi ur videos are very usefull please make a video on snaplogic
Will try it in future..
Why isn't the sql script webpage opening ?
Also I was wondering if you are planning on a video focusing only on snowpark (python) ?
There are lot of content available on Snowpark... don't they give enough or good explaination.. if not..then I can make video around it...
It needs a complete playlist as there are lot of key concept around snowpark.
Feel free to share your though or drop me a note to my instagram or facebook msg.
instagram.com/learn_dataengineering/
fb.me/learndataengineering
How can we print message in snowflake sql procedure?
There is no direct way to see... it has to be stored in a string and then return and using result_scan, the values can be captured.. this is a work around but there is no direct way to do it.
Maybe they meant idempotent instead if immutable?
Could you point which part of the video has that term.. I published it long back.. so not able to recall
Calling too many stored procs leads to dead lock. So is there any limit for this ???
I don't think that there is any rule... have you come across any such scenario?
Hi, thnak you for your videos. But I need one help -- I am working on automating Poricedures depedncies with Javascript in SP, But I am not sure how to debug it as simple print ,ie, Cosnole.log(message) does not give any Output. I am totaly new to JS, so not sure why Its not working.
and I am stuck with my code errors as I am not able to debug.
Thanks for your note and I am really not sure how to help you without knowing the actual problem statement.
It is a challenge debugging javascript in Snowflake unless you have worked in the past. Either you can add your domain problem here, or post a direct message to my instagram account (instagram.com/learn_dataengineering/)
How to enforce Primary Key Constraint in Snowflake?
Great demo. One serious request. Please speak slower. Not only this will make the context easy to follow, it will boost your confidence in teaching.
Sorry for that and noted... will try my best to speak slow.
Hey there,
Can we learn snowflake without having coding knowledge?
Thanks @Swati for your note... to some extend yes.. to really leverage the power of snowflake, SQL is must.. to some extend cloud storage integration...
For analyst, programming is not must and you can even pull snowflake data into excel (and power query) and perform transformation and analysis
Watch my latest video ruclips.net/video/X4uXkGS0dUQ/видео.html
Where is part - 2?
I am working on it
@@DataEngineering Waiting for part-2 sir. Thank you.
Hi
I am getting error while executing the following stored procedure. Can you please help me to fix the issue?
create or replace procedure customers_insert_procedure(LNAME VARCHAR)
returns string
language javascript
as
$$
var sql_command = 'INSERT INTO CUSTOMER1(LNAME) VALUES(:1);'
snowflake.execute
(
{
sqlText: sql_Command,
binds: [LNAME]
});
return "successfully executed.";
$$;
calling the procedure:
create or replace task procedure_task
warehouse = compute_wh
schedule = '1 minute'
as call customers_insert_procedure ('JACK');
What error are you getting.. if you could send the text or share screenshot in my insta account.. I could help you
Great video! Great content. One question is can we use nested CTE as below with in sql or javascript construct? Is this valid at all? Do we have any limitation on number of CTE we can use (CT1,CT2,CT3------)
CREATE OR REPLACE PROCEDURE sp5()
RETURNS string
LANGUAGE javascript
AS
$$
var my_sql_command = `with ct1 (f1,f2) as (select f1,f2 from TEST_1.PUBLIC.TEST11)
ct2 (f1,f3) as (select f1,f3 from TEST_1.PUBLIC.TEST12)
ct3 (f1,f2,f3) as (select a.f1,f2,f3 from TEST_1.PUBLIC.TEST11 a
left join TEST_1.PUBLIC.TEST12 b on a.f1 = b.f1)
insert into TEST_1.PUBLIC.EMP1 (f1,f2,f3)
select f1,f2,f3 from ct2;`;
var statement1 = snowflake.createStatement( {sqlText: my_sql_command} );
var result_set1 = statement1.execute();
return "Done";
$$;
call sp5();
Thanks Abhi ...
as far as I know, having nested CET should not be an issue... SQL Scripting is new addition in stored proc space. Worth trying this use case and see how it works in snowflake.
Thanks again for sharing your use case, it helps community to know about these challenges if they are trying to solve the same use case.
I am trying to create to Create stored proc with "java" i am getting error. can you please check.
CREATE OR REPLACE PROCEDURE MYPROC(x int)
RETURNS int
LANGUAGE JAVA
PACKAGES = ('com.snowflake:snowpark:latest')
HANDLER = 'MyJavaClass.run'
AS
$$
import com.snowflake.snowpark_java.*;
public class MyJavaClass {
public Integer run(int y) {
return y;
}
}
$$;
Can you share the error via instagram to my insta account
@@DataEngineering sorry i dont use insta, btw can we write a procedure to run a sql query where we chose lang = java, why i see people use java script only.