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

Support views (CREATE VIEW) in Iceberg connector #8216

Closed
esemeniuc opened this issue Jun 7, 2021 · 7 comments
Closed

Support views (CREATE VIEW) in Iceberg connector #8216

esemeniuc opened this issue Jun 7, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@esemeniuc
Copy link

Hi all, when using iceberg catalog and creating a view, I see this:

presto:partition_demo_iceberg> create OR REPLACE view sfms_cpustats as (SELECT * FROM sfms_cpustats_daily);
Query 20210607_203635_03250_hfqhn failed: This connector does not support creating views

I noticed this line about view support:


Can view support be added, or is there a fundamental issue with views and iceberg?

@raunaqmorarka
Copy link
Member

You can simply use MATERIALIZED VIEW. It behaves like a VIEW if you don't run REFRESH MATERIALIZED VIEW query on it.
@electrum might have more thoughts about explicit support of VIEW in iceberg.

@findepi findepi changed the title Cannot create views using iceberg catalog Support views (CREATE VIEW) in Iceberg connector Jun 8, 2021
@findepi findepi added the enhancement New feature or request label Jun 8, 2021
@findepi
Copy link
Member

findepi commented Jun 8, 2021

You can simply use MATERIALIZED VIEW. It behaves like a VIEW if you don't run REFRESH MATERIALIZED VIEW query on it.

nice workaround, thanks @raunaqmorarka for sharing.

Another workaround is to define a view via Hive connector, but reference Iceberg catalog in the view body. Not as useful, but may be helpful in some cases.

We should just add support for views ("trino views") in Iceberg. This is pretty straightforward, and Hive connector can be used as an example.

@gorthitk
Copy link
Member

@findepi : Its been a while since I contributed, may I help with adding the support for views ?

@findepi
Copy link
Member

findepi commented Jun 11, 2021

@jetsasank sure!

@gorthitk
Copy link
Member

Great, I will assign this issue to myself and start working on a solution.

@gorthitk gorthitk self-assigned this Jun 12, 2021
@losipiuk
Copy link
Member

losipiuk commented Jul 9, 2021

Hi @jetsasank are you still working on this issue? I wanted to dig into that, but if you have in flight it would be great to not duplicate work.

@ebyhr
Copy link
Member

ebyhr commented Mar 24, 2022

Closing as #8540

@ebyhr ebyhr closed this as completed Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

6 participants