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 to set tblproperties when creating tables and views. #33

Closed
manabian- opened this issue Dec 14, 2021 · 0 comments · Fixed by #49
Closed

Support to set tblproperties when creating tables and views. #33

manabian- opened this issue Dec 14, 2021 · 0 comments · Fixed by #49
Labels
enhancement New feature or request

Comments

@manabian-
Copy link

Describe the feature

In the models config, set tblpropeties as follows.

{{ config(
  materialized='incremental', 
  tblproperties={
    'delta.autoOptimize.optimizeWrite' : 'true',
    'delta.autoOptimize.autoCompact' : 'true'
  }
) }}

There is a similar issue in spark-dbt issues, but it doesn't seem to be implemented.

dbt-labs/dbt-spark#190

Describe alternatives you've considered

There is the way to execute Alter Table statements with dbt post-hooks

Who will this benefit?

All users who create tables or views in Databricks.

As described in the following Databricks document, tblproperties settings such as delta.autoOptimize.autoCompact are often set at table creation time.

https://docs.databricks.com/delta/optimizations/auto-optimize.html

@manabian- manabian- added the enhancement New feature or request label Dec 14, 2021
ueshin added a commit that referenced this issue Feb 23, 2022
…#49)

resolves #33

### Description

Supports to set `tblproperties` when creating tables and views.

In the models config, set `tblproperties` as follows.

```
{{ config(
  materialized='incremental', 
  tblproperties={
    'delta.autoOptimize.optimizeWrite' : 'true',
    'delta.autoOptimize.autoCompact' : 'true'
  }
) }}
```
ueshin added a commit that referenced this issue Feb 24, 2022
…#49)

resolves #33

### Description

Supports to set `tblproperties` when creating tables and views.

In the models config, set `tblproperties` as follows.

```
{{ config(
  materialized='incremental', 
  tblproperties={
    'delta.autoOptimize.optimizeWrite' : 'true',
    'delta.autoOptimize.autoCompact' : 'true'
  }
) }}
```
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.

1 participant