`@fold` support for SQL
See original GitHub issueHere’s the initial plan for how to handle @fold
in SQL. May need additional considerations for interactions with other directives.
https://www.db-fiddle.com/f/cD9aczVx5B8gRiAXavWBhB/3
Let me know what you think @obi1kenobi @bojanserafimov @pmantica1
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (9 by maintainers)
Top Results From Across the Web
Power Query query folding - Microsoft Learn
Query folding is the ability for a Power Query query to generate a single query statement to retrieve and transform source data. The...
Read more >Which M functions support SQL code folding?
Relational data source transformations that can be query folded are those that can be written as a single SELECT statement. A SELECT statement...
Read more >Query Folding On SQL Queries In Power Query Using Value ...
Did you know that there's a way you can get query folding to work if you're using a native SQL query on SQL...
Read more >Fixing Query Folding with SQL Server in Power BI for ...
Query folding is Power Query's ability to generate a single query expression to retrieve and transform source data. Most SQL-based data sources such...
Read more >Solved! Query folding for native SQL in Power BI | by Nikola Ilic
If you choose to write custom SQL, all subsequent transformation steps applied in the Power Query Editor will not fold, even if you're...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://www.db-fiddle.com/f/4EXkttLVoWTdbMZQBsNDDB/3 I’ve added a
Neighborhood
withname = NULL
. In the first query, it appears asnull
inside the array (which is correct), but it’s not counted in the_x_count
.Shouldn’t we implement
_x_count
usingcount(*)
to solve this? It’s also simpler to emitcount(*)
from theLocalField
than it is to emitcount(some_column)
.Yeah @chewselene and I were just looking at this as well, and I think we ended up removing the outer
GROUP BY
since it didn’t seem to be necessary with the subqueries approach. I updated the fiddle to add a new SQL query with theGROUP BY
removed.