Skip to content(if available)orjump to list(if available)

SQL pipe syntax available in public preview in BigQuery

notpushkin

PRQL is a similar idea, and it compiles to SQL: https://prql-lang.org/

    from invoices
    filter invoice_date >= @1970-01-16
    derive {
      transaction_fees = 0.8,
      income = total - transaction_fees
    }
    filter income > 1

Taikonerd

Relatedly, PRQL is a lovely pipe-oriented syntax for SQL DBs: https://prql-lang.org/

Their syntax is a lot cleaner, because it's a new language -- it's not backwards-compatible with SQL. But then again, they don't have the resources of Google behind them.

systems

if its not backward compatible with SQL, is not pipe syntax for SQL

its just a new Query language

most DBMS have proprietary extension to SQL, its messy, real success would be adding the new syntax to the standard and have implemented across multiple DBMSs

pjmlp

Ever since using Kusto Query Language, that I look forward to SQL getting something like this, maybe there is hope if enough DBs have it as an extension.

DarkCrusader2

I heavily use KQL on a daily basis and want nothing more than using it for Postgres and SQlite as well.

Taikonerd

This is so exciting. I hope Postgres and MySQL get some level of support for it, too.

whalesalad

Who invented pipe syntax? Elixir? Or is there another runtime or language that made this prevalent beforehand?

xnx

Originally? Douglas McIlroy for Unix in 1973: https://en.wikipedia.org/wiki/Pipeline_(Unix)

ellisv

The |> syntax? Perhaps F#. Pipes have been around since at least Unix v3.

_huayra_

Many such things from F# come from Haskell (given the influence from MSR UK, specifically Simon Peyton Jones before he left a few years ago), so likely Haskell or earlier imo (at least in terms of "complex" "pipe" operations that have higher-level operations than "bytes in, bytes out" of Unix).

nothrabannosir

Shell would at least qualify as prior art, I’d assume