Add BI SQL examples capturing tool-generated metric queries - #344
Open
christianeu-db wants to merge 2 commits into
Open
Add BI SQL examples capturing tool-generated metric queries#344christianeu-db wants to merge 2 commits into
christianeu-db wants to merge 2 commits into
Conversation
Add bi-sql-examples/ with real SQL that BI tools generate when they query metrics defined outside the tool. Include a tableau/ subfolder with a setup.sql model sketch, a README, and four feature-area examples: top-N filters, LOD two-stage aggregation, sets, and multi-table joins and relationships. These query shapes help verify that Ossie can cover the complex cases BI tools produce.
jbonofre
self-requested a review
August 28, 2026 12:37
jbonofre
requested changes
Aug 28, 2026
jbonofre
left a comment
Member
There was a problem hiding this comment.
Please add the ASF header in all files.
| @@ -0,0 +1,101 @@ | |||
| -- ============================================================================ | |||
Contributor
Author
There was a problem hiding this comment.
Thank you for the feedback - the headers have been added to this and all other files
Add the Apache Software Foundation license header to all files introduced in this PR: the HTML-comment style for Markdown files and the SQL line-comment style for .sql files. Co-authored-by: Isaac <no-reply@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One action item from the most recent (2026-08-26) language working group was to collect and commit examples of BI-generated SQL. BI tools have built rich functionality (for example, multi-table modeling, LOD calculations, subtotals), which can involve complex SQL. The SQL generated for similar features can be different across tools, and even within a single tool. This is especially true when you consider the optimizations applied by tool-specific query compilation pipelines.
This PR adds a first set of SQL examples as generated by Tableau. The features include top-N filters, sets, LOD (level of detail) calculations and multi-table analysis. These are adopted from this document, which fleshed out a SQL interface the working group is now calling the metric layer interface.
Separate PRs will describe the layered interface approach and the semantics of each layer, as discussed at the working group meeting.