Please finally add q language with proper integration to your tables so that our precious q-SQL is available there. Stop reinventing the wheel, let's at least catch up to the previous generation (in terms of convenience). Make the final step.
Instant SQL for results as you type in DuckDB UI
71–80 of 124 posts
Re: Instant SQL for results as you type in DuckDB UI
#72It would be even better if SQL had pipe syntax. SQL is amazing, but its ordering isn’t intuitive, and only CTEs provide a reliable way to preview intermediate results. With pipes, each step could clearly show intermediate outputs. Example: FROM orders |> WHERE order_date >= '2024-01-01' |> AGGREGATE SUM(order_amount) AS total_spent GROUP BY customer_id |> WHERE total_spent > 1000 |> INNER JOIN customers USING(custome…
The PRQL[1] syntax is built around pipelines and works pretty well. I added a similar "get results as you type" feature to the SQLite integration in the Logfile Navigator (lnav)[2]. When entering PRQL queries, the preview will show the results for the current and previous stages of the pipeline. When you move the cursor around, the previews update accordingly. I was waiting years for something like PRQL to implement…
https://community-extensions.duckdb.org/extensions/prql.html
Re: Instant SQL for results as you type in DuckDB UI
#73In DuckDB UI and MotherDuck. Awesome video of feature: https://youtu.be/aFDUlyeMBc8 Disclaimer: I’m a co-founder at MotherDuck.
Curious if there has been any thought given to open sourcing the UI? Of course there's no obligation to though!
Re: Instant SQL for results as you type in DuckDB UI
#74I spent the first two quarters of 2024 working on observability for a build-the-plane-as-you-fly-it style project. I can’t express how useful the cte preview would have been for debugging.
Re: Instant SQL for results as you type in DuckDB UI
#75Re: Instant SQL for results as you type in DuckDB UI
#76Re: Instant SQL for results as you type in DuckDB UI
#77Earlier quoted context omitted.
Google SQL has it now: https://cloud.google.com/blog/products/data-analytics/simpli... It's pretty neat: FROM mydataset.Produce |> WHERE sales > 0 |> AGGREGATE SUM(sales) AS total_sales, COUNT(\*) AS num_sales GROUP BY item; Edit: formatting
note that DuckDB allows that reverse ordering (FROM-first) FROM table SELECT foo, bar WHERE zoo=“goo”
Re: Instant SQL for results as you type in DuckDB UI
#78Why is it a killer feature? First of all, LLMs complete text from left to right. That alone is a killer feature.
But for us meatboxes with less compute power, pipe syntax allow (much better) code completion.
Pipe syntax is delightful to work with and makes going back to SQL a real bummer moment (please insert meme of Kate Perry kissing the earth here).
Re: Instant SQL for results as you type in DuckDB UI
#79DuckDb is missing a killer feature by not having a pipe syntax like kusto or google's pipe query syntax. Why is it a killer feature? First of all, LLMs complete text from left to right. That alone is a killer feature. But for us meatboxes with less compute power, pipe syntax allow (much better) code completion. Pipe syntax is delightful to work with and makes going back to SQL a real bummer moment (please insert meme…
Re: Instant SQL for results as you type in DuckDB UI
#80Earlier quoted context omitted.
Yes it comes from a desire to impose intuition from other contexts onto something instead of building intuition with that thing. SQL is a declarative language. The ordering of the statements was carefully thought through. I will say it's harmless though, the clauses don't have any dependency in terms of meaning so it's fine to just allow them to be reordered in terms of the meaning of the query, but that's true of lo…
No, it comes from wanting to make autocompletion easier and to make variable scoping/method ordering make sense within LINQ. It is an actual improvement in this regard. LINQ popularized it and others followed. It does what it says. Btw: saying that "people try to impose their own comfort" is uncalled for.
If you are right about why they did it its even dumber than my reason, they are changing a language grammar to let them make a much worse solution to the same problem.