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

Table extraction for basic queries #105

Merged
merged 3 commits into from
Oct 22, 2024
Merged

Conversation

crisptrutski
Copy link
Collaborator

This introduces a new Java class which walks queries to extract the tables we reference.

It restricts itself to queries that it definitely understands, and errs on the side of "IDK".

It also returns error keywords, rather than throwing exceptions. This might not be a good idea.

Error codes up for debate, but Metabase will treat them all the same (no access)

@crisptrutski crisptrutski self-assigned this Oct 22, 2024
@crisptrutski crisptrutski added .Team/BackendComponents enhancement New feature or request and removed enhancement New feature or request labels Oct 22, 2024
return tables;
}

}
Copy link
Contributor

Choose a reason for hiding this comment

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

very clean

Copy link
Contributor

@tsmacdonald tsmacdonald left a comment

Choose a reason for hiding this comment

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

Yeah much better than mine, I like it

@crisptrutski crisptrutski merged commit 41f6132 into master Oct 22, 2024
4 checks passed
@crisptrutski crisptrutski deleted the simple-table-extractor branch October 22, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants