Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Support for table properties #53

Closed
wrb2 opened this issue Jul 9, 2021 · 1 comment · Fixed by #58
Closed

Support for table properties #53

wrb2 opened this issue Jul 9, 2021 · 1 comment · Fixed by #58

Comments

@wrb2
Copy link

wrb2 commented Jul 9, 2021

When creating a table in Presto or Trino, you can define table properties (example from docs):

CREATE TABLE hive.web.page_views (
  view_time timestamp,
  user_id bigint,
  page_url varchar,
  ds date,
  country varchar
)
WITH (
  format = 'ORC',
  partitioned_by = ARRAY['ds', 'country'],
  bucketed_by = ARRAY['user_id'],
  bucket_count = 50
)

It would be helpful to be able to define those for table models, similar to how you can configure distkey and sortkey in dbt-redshift.

{{
config(materialized='table',
       partitioned_by=['ds', 'country'],
       format='ORC',
       bucketed_by='user_id',
       bucket_count=50)
}}

It would allow the users to define storage formats, partitioning and similar. Since different Presto connectors use different properties, this option should be generic and allow any properties.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant