[pull] master from cube-js:master - #639
Merged
Merged
Conversation
* docs: document dbt pull primary key detection and reverse joins Describe the three-tier primary key ladder (dbt constraints β strict unique + not_null tests β column-name suffixes), the new pull options, and add troubleshooting for missing/incorrect keys and one-directional joins. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs: address review feedback on dbt primary key section - "Every cube needs a primary_key" β a cube can end up without one - constraints snippet now includes the enforced model contract dbt requires, plus a pointer to the test-based path for projects without contracts - name the parent option instead of "the option above"/"below" - attribute pull-time behavior to "the pull", not "Cube" Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs: correct the join relationship type dbt pull generates Generated joins are always many_to_one from the cube owning the foreign key; one_to_many/one_to_one were never emitted for forward joins. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs: cover forced join keys and all-or-nothing constraints in dbt pull Verified the page against the implementation: document that join target columns are keyed regardless of the tiers, that a primary_key constraint naming an undocumented column is skipped entirely, and that foreign-key avoidance is a preference with a fallback. Order the pull options to match the settings card. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs: clarify join-target keys and drop references to server-side logs Join-referenced columns are additive on top of the tiers and apply to the referenced cube only, so the FK owner is what typically ends up keyless. Replace pointers to pull log output, which isn't surfaced to users, with the compile error and the generated .yml. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs: qualify the keyless-cube symptom in dbt pull The compile error only fires when the cube has an aggregatable measure; without one the join is dropped with no error. Quote the full message. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs: full consistency pass on the dbt primary key content - name the measure types that trigger the compile error, and the runtime "Can't find join path" failure when none is present - drop the unqualified "Cube requires a key on both ends of every join" - Limitations no longer claims tests are unused; they feed key and join detection - note that warehouse enforcement is irrelevant (the pull only parses) - a dbt relationship describes one side, rather than dbt being unable to declare both Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
β¦ single declaration (#11409) * refactor(tesseract): unify MemberSymbol dependency traversal behind a single declaration Each symbol node now declares its dependency slots exactly once β via the symbol_deps! macro for structs (full destructuring, so a new field fails to compile until classified) or a hand-written SymbolDeps impl for enums β and both the read side (collect_deps, collect_cube_refs) and the rebuild side (apply_recursive, apply_to_deps) are derived from that declaration by generic algorithms in planner/symbols/deps.rs. This replaces the per-node hand-written get_dependencies / extract_symbol_deps / get_cube_refs / extract_cube_refs / apply_to_deps bodies, which enumerated the same slots independently. Semantic points: - A dependency is a symbol or cube ref whose rendered SQL enters the node's SQL. Multi-stage grain/filter member lists are annotations matched by full_name, not dependencies: apply_to_deps no longer rewrites them. - TimeDimensionSymbol::base_symbol is a transparent slot: reads emit the base's dependencies, transforms receive the slot itself. - Transform semantics are uniform: f is applied to every symbol node exactly once, recursion is handled by the algorithm. - Slot order is a contract (declaration order); reference symbols resolve to their first dependency. - iter_sql_calls/validate, owned_by_cube and DebugSql stay bespoke. * test(tesseract): pin the TimeDimension dependency contract The base symbol is a granularity view, not a dependency: reads look through it (emitting the base's own dependencies), while transforms receive it as a replaceable slot and the wrapper keeps its identity. * test(tesseract): cover switch and case-switch dimensions in multi-stage include grain Include grain refs are selected inside the multi-stage CTEs; case pruning and calc-group value resolution follow each leaf's own filters (the leaf rebuilds its QueryProperties, re-applying static filters), so a leaf whose filter directive excludes the switch filter keeps the full CASE while a filtered leaf renders the pruned branch.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? π Please sponsor : )