PRQL / prql-query

Query and transform data with PRQL
Apache License 2.0
126 stars 7 forks source link

pq "from a | select { b, c }" fails with syntax error #37

Open SrslyJosh opened 1 year ago

SrslyJosh commented 1 year ago

The latest version of pq (0.0.15) doesn't seem to accept the same syntax for select that's documented on the PRQL website.

Example:

$ $ pq "from a | select { b, c }"
Error: Error:
   ╭─[:2:17]
   │
 2 │ from a | select { b, c }
   ·                 ┬
   ·                 ╰── unexpected {
───╯
Error:
   ╭─[:2:24]
   │
 2 │ from a | select { b, c }
   ·                        ┬
   ·                        ╰── unexpected }
───╯

I think this might be because pq is currently using an older version of prqlc:

$ pq "from a | select b"
SELECT
  b
FROM
  a

-- Generated by PRQL compiler version:0.6.1 (https://prql-lang.org)