79269453

Date: 2024-12-10 19:04:41
Score: 1.5
Natty:
Report link

@brandon, I like your approach using tasks for table locking while inserting.

You can take this step by using Snowflake Pipes to load from the internal stage. CREATE PIPE docs

This way, multiple processes can put files through an internal stage, and Snowflake PIPE will insert data into tables. This approach should have lower latency than the task approach.

CREATE PIPE mypipe2
  AS
  COPY INTO mytable(C1, C2)
  FROM (SELECT $5, $4 FROM @mystage)
  FILE_FORMAT = (TYPE = 'JSON');
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @brandon
  • Low reputation (1):
Posted by: neeru0303