prql-query icon indicating copy to clipboard operation
prql-query copied to clipboard

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

Open SrslyJosh opened this issue 7 months ago • 0 comments

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)

SrslyJosh avatar Nov 15 '23 01:11 SrslyJosh