Snowflake Table Types

Sdílet
Vložit
  • čas přidán 6. 12. 2020
  • Working with Permanent, Temporary and Transient Tables in Snowflake
    Snowflake Table Types
    Working with Temporary and Transient Tables in Snowflake

Komentáře • 20

  • @kbkonatham1701
    @kbkonatham1701 Před 2 lety +1

    thanks for sharing info

  • @raj52858
    @raj52858 Před 3 lety +3

    Nice, Thanks

  • @0yustas0
    @0yustas0 Před 2 lety +1

    I assume, that it's good to add info about external tables to this video.

  • @vitesh6429
    @vitesh6429 Před 3 lety +1

    Nice

  • @RaviTheVlogger
    @RaviTheVlogger Před 3 lety

    very useful session. can you explain more on exact befits using transient tables, if we want to extend retention period of a table, how to change the values, where to change.

    • @VCKLYTech
      @VCKLYTech  Před 3 lety +2

      If we use Transient table , then we can reduce the storage cost incase , you dont want to time travel more than 1 day. We can extend retention period for the permanent table by using data_retention_time_in_days clause at the time of creation or later by using alter command.
      For example, 1) CREATE OR REPLACE TABLE mytable_30(col1 number, col2 date) data_retention_time_in_days=30;
      2) alter table if exists mytable set data_retention_time_in_days=90;

    • @RaviTheVlogger
      @RaviTheVlogger Před 3 lety

      @@VCKLYTech Thank you vey much.

    • @0yustas0
      @0yustas0 Před 2 lety

      if you play on the EU data market, you should support GDPR requirements. One of them- delete customer info by request. you can't do it in any way 7 days if you use regular tables, because you can't change file safety settings. It's main reason to use transient tables. second reason: if you have huge amount of DMLs on the big tables- standard backup(file safety feature) isn't optimal way. transient tables + old fashion CTAS by schedule is "the way". PS data_retention_time_in_days = 90 for regular tables can be used only on EE+ versions.

  • @reddyram1457
    @reddyram1457 Před 2 lety

    what would be scenario or use or die advantage if we can create both db and schema as temp and inside of this if we create permanent tables

    • @VCKLYTech
      @VCKLYTech  Před 2 lety +1

      No option to create a temp database and temp schema in snowflake.
      we can create snowflake permanent/transient database
      we can create snowflake permanent/transient/managed schemas

    • @reddyram1457
      @reddyram1457 Před 2 lety

      @@VCKLYTechwhat would be the data protection if we create transient db and created permanent table inside it .

  • @vishalsingh-ui9fg
    @vishalsingh-ui9fg Před 2 lety

    Can we use clustering in temporary table?

  • @Aj_11135
    @Aj_11135 Před 2 lety

    bro how to create a procedure that monitor changes in table plz send code

    • @VCKLYTech
      @VCKLYTech  Před 2 lety

      no need to create procedure , you just create a steam on your table so ur stream will capture the DML changes

  • @kandazh
    @kandazh Před 3 lety

    Dear Vickey, I tried creating with same table for permanent, transient and temporary tables and it creates, however table get overridden with either permanent or transient. so latest created get reflected. -- CREATING TABLES WITH SAME NAME;
    CREATE OR REPLACE TABLE CUSTOMER (ID NUMBER, DATES DATE); -- PERMANENT TABLE
    CREATE OR REPLACE TRANSIENT TABLE CUSTOMER (ID NUMBER, DATES DATE); -- TEMPORARY TABLE
    CREATE OR REPLACE TEMPORARY TABLE CUSTOMER (ID NUMBER, DATES DATE); -- TEMPORARY TABLE
    SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_CATALOG ='DEV_DB' AND TABLE_SCHEMA='TABLE_TYPES';
    DROP TABLE CUSTOMER;

    • @kandazh
      @kandazh Před 3 lety +1

      When user dont use or replace, then it throws error. otherwise it allows user to crate

    • @VCKLYTech
      @VCKLYTech  Před 3 lety +1

      Please try with out replace while creating tables so that we will get to know what scenario possible with same table name with different table types.