Stored Procedure In Snowflake | Chapter-21.1 | Snowflake Hands-on Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ต.ค. 2024

ความคิดเห็น • 93

  • @vkumaremail
    @vkumaremail 2 ปีที่แล้ว +5

    The following keywords for the CREATE PROCEDURE command are deprecated on May 12, 2022
    IMMUTABLE
    VOLATILE

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว +2

      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

    • @MohitSharma0205
      @MohitSharma0205 ปีที่แล้ว

      @@DataEngineering poo plotw

  • @chakradharreddymodulla6695
    @chakradharreddymodulla6695 2 ปีที่แล้ว

    Thank you Sir, I completed snowpro certification. Your videos on topics and practice tests made 80% of my preparation

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว

      Wonderful and congratulation on your success.

    • @maheshtiriveedi5130
      @maheshtiriveedi5130 2 ปีที่แล้ว

      I want to contact you..may ask your email id..

  • @kameswarig5630
    @kameswarig5630 2 ปีที่แล้ว +1

    Thank you so much for your great effort sir.. We owe you for such free teaching with so much in detail knowledge.

  • @SreePotluri2024
    @SreePotluri2024 2 ปีที่แล้ว

    Your connect and explanation is great! One can get well experienced in snowflake just by following your channel. Thank you!

  • @sireeshap9624
    @sireeshap9624 ปีที่แล้ว

    Thanks for sharing. Videos are very helpful to me to learn Snowflake.

  • @subramanyams3742
    @subramanyams3742 ปีที่แล้ว +1

    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?.

    • @DataEngineering
      @DataEngineering  ปีที่แล้ว

      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.

  • @gauravsinghal4948
    @gauravsinghal4948 ปีที่แล้ว

    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.

    • @DataEngineering
      @DataEngineering  ปีที่แล้ว

      - 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..

  • @sebastienrichez6813
    @sebastienrichez6813 11 หลายเดือนก่อน

    Yours videos are great. Do you have any insight about stored procedure in Javascript vs stored procedure in Python ? for the cost, performance, devOps...

    • @DataEngineering
      @DataEngineering  11 หลายเดือนก่อน

      Not yet.. will consider it in future.. it is a very rare requirement..

  • @motivationalvibes5699
    @motivationalvibes5699 ปีที่แล้ว +1

    Thanks sir awesome explanation

  • @pranjalinagarkar3176
    @pranjalinagarkar3176 2 ปีที่แล้ว

    Amazing video sir. every concept is well explained with example. Thank you for sharing your knowledge.

  • @bethtilley5648
    @bethtilley5648 ปีที่แล้ว

    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?

  • @shubhangidhamdhere4612
    @shubhangidhamdhere4612 2 ปีที่แล้ว +1

    Thanks a million Sir.. We are very grateful to you for such a great effort and sharing your knowledge. Respect 🙏!!

  • @venkateshpasunuri4017
    @venkateshpasunuri4017 2 ปีที่แล้ว

    Thank you so much for all your videos , every topic explained very well .

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว

      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

  • @grishrrr
    @grishrrr ปีที่แล้ว

    Thank you so much! It was excellent.

  • @Storyteller_30
    @Storyteller_30 ปีที่แล้ว

    hi you are doing great work can you make storedprocedure in SQL Language with proper examples

  • @babubansi9133
    @babubansi9133 2 ปีที่แล้ว +1

    Great Work.

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว +1

      Thank you 🙏 for watching my video and your word of appreciation really means a lot to me.

  • @kandanulupruthvi8844
    @kandanulupruthvi8844 ปีที่แล้ว

    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)

  • @knowledgeacquire8566
    @knowledgeacquire8566 2 ปีที่แล้ว +1

    Thank you so much Sir!!

  • @vinothkannaramsingh8224
    @vinothkannaramsingh8224 3 หลายเดือนก่อน

    stored procedure is dead ? For ETL we can use spark or snowpark right ?

  • @Praveen_Kumar_R_CBE
    @Praveen_Kumar_R_CBE 2 ปีที่แล้ว

    Amazing content, very useful as always...

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว +1

      Thank you 🙏 for watching my video and your word of appreciation really means a lot to me.

  • @jiangjy1982
    @jiangjy1982 2 ปีที่แล้ว

    Excellent tutorials! I find the tree view of course content very helpful. Is it shared anywhere? Thanks!

  • @visshalgupta
    @visshalgupta 2 ปีที่แล้ว

    Hi Snowflake is coming up with the new version of the snowpro core examination ? how much difference it will make ?

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว

      The weightage is changing but overlal the coverage is some.

  • @Buzzingfact
    @Buzzingfact 2 ปีที่แล้ว

    Thank you for creating these videos 👏

  • @Anil_Rishvik_Memories
    @Anil_Rishvik_Memories 2 ปีที่แล้ว

    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
      @DataEngineering  2 ปีที่แล้ว

      For such complex logic, you can write java or java script stored procedure rather using SQL based stored procedure.

    • @Anil_Rishvik_Memories
      @Anil_Rishvik_Memories 2 ปีที่แล้ว

      @@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

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว +1

      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.

    • @Anil_Rishvik_Memories
      @Anil_Rishvik_Memories 2 ปีที่แล้ว

      @@DataEngineering yes shared the same in your insta message

  • @srinivasanelluri8068
    @srinivasanelluri8068 2 ปีที่แล้ว

    Hello sir , thank you for the video, can we call thirdpary api call inside storedprocedure ?

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว

      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...

  • @hankjones9043
    @hankjones9043 2 ปีที่แล้ว

    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';'

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว

      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...

  • @SreePotluri2024
    @SreePotluri2024 2 ปีที่แล้ว

    Also I was wondering if you are planning on a video focusing only on snowpark (python) ?

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว +1

      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

  • @rajeshbhosale2008
    @rajeshbhosale2008 9 หลายเดือนก่อน

    Thanks a lot 👍🏻

    • @DataEngineering
      @DataEngineering  9 หลายเดือนก่อน

      You're welcome! and liked you are dropping a note after finishing each chapter.

  • @muralikrishna-gi2kh
    @muralikrishna-gi2kh 2 ปีที่แล้ว

    Hi ur videos are very usefull please make a video on snaplogic

  • @manidhar.V.S
    @manidhar.V.S 2 ปีที่แล้ว +1

    Request you to keep all queries,data that are used in vedios inside the discription box as text files.

  • @nijamudhins3405
    @nijamudhins3405 2 ปีที่แล้ว +1

    Thanks alot!😀

  • @pavankalyankonda1022
    @pavankalyankonda1022 ปีที่แล้ว

    do we have any custom tool to convert SAP ABAP code to Snowsql?

  • @saereddy
    @saereddy ปีที่แล้ว

    Calling too many stored procs leads to dead lock. So is there any limit for this ???

    • @DataEngineering
      @DataEngineering  ปีที่แล้ว

      I don't think that there is any rule... have you come across any such scenario?

  • @investingduz8583
    @investingduz8583 2 ปีที่แล้ว

    Youre amazing, thank you so much

  • @sunshadow9704
    @sunshadow9704 2 ปีที่แล้ว +2

    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.

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว +1

      Sorry for that and noted... will try my best to speak slow.

  • @ipsna2758
    @ipsna2758 2 ปีที่แล้ว

    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.

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว

      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/)

  • @swatisharma4409
    @swatisharma4409 2 ปีที่แล้ว

    Hey there,
    Can we learn snowflake without having coding knowledge?

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว +1

      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 th-cam.com/video/X4uXkGS0dUQ/w-d-xo.html

  • @pmohantymohanty7
    @pmohantymohanty7 หลายเดือนก่อน

    Why isn't the sql script webpage opening ?

  • @maheshpokharkar278
    @maheshpokharkar278 ปีที่แล้ว

    How to enforce Primary Key Constraint in Snowflake?

  • @shashankm2859
    @shashankm2859 ปีที่แล้ว

    How can we print message in snowflake sql procedure?

    • @DataEngineering
      @DataEngineering  ปีที่แล้ว

      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.

  • @NeumsFor9
    @NeumsFor9 6 หลายเดือนก่อน

    Maybe they meant idempotent instead if immutable?

    • @DataEngineering
      @DataEngineering  6 หลายเดือนก่อน

      Could you point which part of the video has that term.. I published it long back.. so not able to recall

  • @abhik2791
    @abhik2791 2 ปีที่แล้ว +1

    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();

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว

      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.

  • @shreyaskulkarni2142
    @shreyaskulkarni2142 2 ปีที่แล้ว

    Where is part - 2?

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว +1

      I am working on it

    • @Jubin369
      @Jubin369 2 ปีที่แล้ว

      ​@@DataEngineering Waiting for part-2 sir. Thank you.

  • @shruthiik6817
    @shruthiik6817 2 ปีที่แล้ว

    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');

    • @DataEngineering
      @DataEngineering  2 ปีที่แล้ว

      What error are you getting.. if you could send the text or share screenshot in my insta account.. I could help you

  • @guptagurumukh00
    @guptagurumukh00 ปีที่แล้ว

    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
      @DataEngineering  ปีที่แล้ว

      Can you share the error via instagram to my insta account

    • @guptagurumukh00
      @guptagurumukh00 ปีที่แล้ว

      @@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.