在 Snowflake 中是否可以自动合并? [英] Is it possible in Snowflake to automate a merge?

查看:48
本文介绍了在 Snowflake 中是否可以自动合并?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我有一个脚本在我的源表和目标表之间合并,但正在更新和插入.这两个表每天通过在雪花上创建的任务更新.我也想每天执行此合并.是否可以通过雪花上的任务或其他内容自动执行此合并?

Currently I have a script that merges between my source and target table but updating and inserting. Both of these tables update daily through a task created on snowflake. I would like to preform this merge daily too. Is it possible to automate this merge through either a task or something else on snowflake?

谢谢

推荐答案

如果你的脚本只包含 SQL 命令(或者可以用 JS 编写的命令),你可以创建一个存储过程来调用它们,然后创建一个任务每天运行此程序.

If your script contains only SQL commands (or commands that can be written in JS), you can create a stored procedure to call them, and then create a task to run this procedure on every day.

https://docs.snowflake.com/en/sql-reference/stored-procedures-usage.html

https://docs.snowflake.com/en/user-guide/tasks-intro.html

这篇关于在 Snowflake 中是否可以自动合并?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆