<div dir="ltr">Snowflake's Pipe Operator (aka the Arrow Operator) is much more than the Google Bigquery's Pipe (|>) operator. It is a way to write SQL based DAGs. Here is an example:<br><br>select <br>  c_mktsegment<br>  , count(*) as num_of_customer_per_segment<br>from SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.CUSTOMER<br>group by c_mktsegment<br>->> create or replace  table delete_me as select *<br><div>from $1 where num_of_customer_per_segment > 30000 </div><div>-- note the use of $1 to refer to the output from the previous statement</div>->> select * from delete_me;<br>;<br><br>Snowflake's Pipe Operator (aka the Arrow Operator) supports multiple SQL statements. Statements can be SELECTs, DMLs and pseudo-SQL statements (like SHOW, DESCRIBE etc. in Snowflake) and Stored Procedures etc. Statements can refer to results from any of the previous statements using the $1,$2, $3 syntax.<br><br><div>Here is example with using the pseudo-SQL statement "describe":</div><div><br></div>describe table SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.CUSTOMER<br>->> select *<br>from $1<br><div>where "type" ilike '%varchar%' ;</div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, May 13, 2025 at 10:27 PM Ali, Saqib <<a href="mailto:docbook.xml@gmail.com">docbook.xml@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"> Maybe Snowflake should have called it an Arrow Operator instead of Pipe Operator:<br><br>Bigquery and Databricks use "|>"<br>Snowflake uses "->>"</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 12, 2025 at 6:01 AM Ali, Saqib <<a href="mailto:docbook.xml@gmail.com" target="_blank">docbook.xml@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am curious why Snowflake chose "->>" as the Pipe Operator when<br>
Google Bigquery has already adopted "|>" as the Pipe Operator for SQL.<br>
¯\_(ツ)_/¯<br>
<br>
<br>
On Sat, May 10, 2025 at 10:21 PM Ali, Saqib <<a href="mailto:docbook.xml@gmail.com" target="_blank">docbook.xml@gmail.com</a>> wrote:<br>
><br>
> Following in Google BigQuery's footsteps, Snowflake will be adding support for the SQL Pipe Operator soon. The new pipe operator (->>) will enable chaining of  SQL statements. In the chain of SQL statements, the results of one statement can serve as the input to another statement. The pipe operator can simplify the execution of dependent SQL statements and improve the readability and flexibility of complex SQL operations.<br>
><br>
</blockquote></div>
</blockquote></div>