Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fir 35103 cannot find matching fk table id for fk field #62

Conversation

stepansergeevitch
Copy link
Collaborator

Attemp to fix (atleast partially) the unable to find matching fk issue. A bunch of improvements + reporting FKs as not supported by Firebolt (which is true)

@stepansergeevitch stepansergeevitch self-assigned this Sep 25, 2024
@stepansergeevitch stepansergeevitch requested a review from a team as a code owner September 25, 2024 13:21
Copy link
Collaborator

@ptiurin ptiurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from that looks good to my limited knowledge of Clojure.

Comment on lines +233 to +237
(defmethod sql-jdbc.describe-table/get-table-pks :firebolt
[_ ^Connection conn db-name-or-nil table]
(let [table-name (get table :name)
schema (get table :schema)
base-sql "SELECT primary_index FROM information_schema.tables WHERE table_name = ?"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be reporting primary index as a primary key? As far as i understand there's an important distinction - PIs are not unique.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used primarily for reporting to a customer, I don't think metabase relies on PKs (since you can just report an empty set and it would still work).

@stepansergeevitch stepansergeevitch merged commit 846bb07 into develop Sep 25, 2024
2 checks passed
@stepansergeevitch stepansergeevitch deleted the FIR-35103-cannot-find-matching-fk-table-id-for-fk-field branch September 25, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants