I really like duckdb's notebooks for exploration and this feature makes them even more awesome, but the fact that I can't share, export or commit them into a git repo feels extremely limiting. It's neat-ish that it dodfoods and store them in a duckdb database. It even seems to stores historical versions, but I can't really do anything with it..
Instant SQL for results as you type in DuckDB UI
51–60 of 124 posts
Re: Instant SQL for results as you type in DuckDB UI
#52Please 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.
What is q-SQL?
Re: Instant SQL for results as you type in DuckDB UI
#53It 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…
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: formattingRe: Instant SQL for results as you type in DuckDB UI
#54It 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…
Re: Instant SQL for results as you type in DuckDB UI
#55Earlier quoted context omitted.
The blog specifically says that they're getting the SQL AST so presumably they would not execute something like a DELETE.
Correct. We only enable fast previews for SELECT statements, which is the actual hard problem. This said, at some point we're likely to also add support for previewing a CTAS before you actually run it.
Re: Instant SQL for results as you type in DuckDB UI
#56It 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…
This is one of the reasons I'm excited about DuckDB's upcoming [2]PEG parser. If they can pull it off, we could have alternative dialects that run on DuckDB.
[1] https://www.malloydata.dev/ [2] https://duckdb.org/2024/11/22/runtime-extensible-parsers.htm...
Re: Instant SQL for results as you type in DuckDB UI
#57It 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…
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
FROM table SELECT foo, bar WHERE zoo=“goo”
Re: Instant SQL for results as you type in DuckDB UI
#58Earlier quoted context omitted.
It is already available in the local DuckDB UI! Let us know what you think! -Customer software engineer at MotherDuck
Does local DuckDB UI work without an internet connection?
Kinda like regex101, draw.io or excalidraw.
Re: Instant SQL for results as you type in DuckDB UI
#59I hope this doesn't work with DELETE queries.
Maybe in the next version they could also implement support for DROP, with autocorrect for the nearest (not yet dropped) table name.
Re: Instant SQL for results as you type in DuckDB UI
#60I just watched the author of this feature and blog post give a talk at the DataCouncil conference in Oakland, and it is obvious what a huge amount of craft, ingenuity, and care went into building it. Congratulations to Hamilton and the MotherDuck team for an awesome launch!