Inline Stored Procedures for hybrid tables in Snowflake
Inline stored procedures run OLTP operations on hybrid tables as a single atomic unit, reducing overhead and latency.
O que mudou
Inline Stored Procedures are designed specifically for operational workloads on hybrid tables. The entire procedure body executes as a single atomic unit pushed directly to the query processing layer, reducing per-statement overhead and delivering low latency for OLTP transactions.### Use casesImagine you need to update records in a transactional orders table and write audit logs in the same transaction with high concurrency and low latency.- Wrap single DML operations for abstraction or access control.- Execute multi-statement OLTP transactions atomically.- Schedule recurring maintenance by calling the procedure from a Snowflake task.### How to use```sql CREATE OR REPLACE INLINE PROCEDURE place_order( order_id NUMBER(18,0), customer_id NUMBER(18,0), product VARCHAR, quantity NUMBER(10,0) ) RETURNS VARCHAR LANGUAGE SQL AS $$ BEGIN ATOMIC INSERT INTO orders (order_id, customer_id, product, quantity, status) VALUES (:order_id, :customer_id, :product, :quantity, 'PENDING'); RETURN 'OK'; END; $$
CALL place_order(1001, 42, 'Snowboard', 2);
1. The command creates a stored procedure using an atomic block.
2. The statement inserts data into the hybrid table using the passed arguments.
3. The procedure returns a confirmation string indicating success.### Limitations and requirementsThe feature is generally available (GA). They operate exclusively on hybrid tables; statements accessing standard Snowflake tables are not supported. Explicit BEGIN, COMMIT, or ROLLBACK statements are not allowed inside the procedure body since each invocation runs as an atomic block.
- hybrid tables
- stored procedures
- oltp
- sql
- snowflake
Inline Stored Procedures for hybrid tables (General availability)
Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.
Relacionadas
- SnowflakeGA
Geração de documentos em PDF, Word e PowerPoint no Snowflake CoWork
O Snowflake CoWork agora gera arquivos PDF, Word, PowerPoint e HTML diretamente de suas análises usando a ferramenta de execução de código do Cortex Agent.
snowflake cowork · cortex agent - SnowflakePublic Preview
Cortex Agent SDK para Python e TypeScript no Snowflake
O Cortex Agent SDK permite criar aplicações que utilizam Cortex Agents e Cortex Code em Python e TypeScript.
cortex agents · python - SnowflakeAtualização
Mensagens de erro mais detalhadas na classificação de dados sensíveis
A view DATA_CLASSIFICATION_LATEST agora traz mensagens de erro específicas e códigos do Snowflake para falhas na classificação.
data governance · trust center