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

Athena Views support? #11

Closed
chwonghk01 opened this issue May 20, 2019 · 10 comments · Fixed by #53
Closed

Athena Views support? #11

chwonghk01 opened this issue May 20, 2019 · 10 comments · Fixed by #53
Labels
enhancement New feature or request
Milestone

Comments

@chwonghk01
Copy link

First of all, thanks for the great plugin!

However it seems that currently the driver only support tables but not views in Athena. Is this known issue? Any plan to support Athena views?

@dacort
Copy link
Owner

dacort commented May 20, 2019

Ah, good catch. Yes, would definitely like to support views.

get-tables will need to get updated to be able to identify those. I believe the table type comes back as VIRTUAL_VIEW.

@dacort dacort added the enhancement New feature or request label May 20, 2019
@jamarzka
Copy link

It does but there is an issue with how the queries are built still. Currently all columns are formatted database.table.column and that doesn't work when using a view. It can't include the database.

@dacort
Copy link
Owner

dacort commented May 21, 2019

@jamarzka Do you have an example of how you query views using the JDBC driver?

edit: Nevermind, I see what you mean.

SELECT database.table.column FROM database.table works fine
But SELECT database.table.column FROM database.view does not.

SELECT column FROM database.view does work.

@lukealexmiller
Copy link

lukealexmiller commented Jan 6, 2020

Unless I misunderstand the previous comments, Athena views remain unsupported (I am unable to see any views in the database schema in Metabase). Is a PR expected for this any time soon? Would be great to be able to use Athena views. Thanks for the great work on the plugin!

@dacort
Copy link
Owner

dacort commented Jan 6, 2020

@lukealexmiller Correct, views remain unsupported. I'm in the codebase this week, so I'll try to get a level of effort for what it would take to support views, but no work is currently planned to implement them. That may change depending on the investigation.

@vaibhav-acko
Copy link

@dacort - Does athena view support coming soon? We are also looking to query views from metabase.

@chrispruitt
Copy link

chrispruitt commented May 29, 2020

It looks like the views are working when writing custom queries, however they are not shown as a part of the DB schema. So we are unable to create any Field Filters from the view columns, among other features. Also higher level users are unable to choose a view as a data source for a simple question.

Any movement on this lately?

@dacort
Copy link
Owner

dacort commented May 30, 2020

I unfortunately haven't been able to get around to adding support for them yet, sorry.

@jainanuj07

This comment has been minimized.

@dacort dacort added this to the v1.1.0 milestone Jul 30, 2020
@dacort
Copy link
Owner

dacort commented Jul 30, 2020

I think the right thing to do here is add VIRTUAL_VIEW into the list of table patterns in the get-tables function.

Note that I'm also planning on upgrading the Athena JDBC driver and, as part of that, there's a new option to map virtual views to views. But it should be easy enough to add support for virtual views. We still need a custom get-tables to deal with the fact that tables show up as EXTERNAL_TABLE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants