TobikoData / sqlmesh

Efficient data transformation and modeling framework that is backwards compatible with dbt.
https://sqlmesh.com
Apache License 2.0
1.85k stars 164 forks source link

Custom Materialization Properties #2847

Closed achicoine-coveo closed 5 months ago

achicoine-coveo commented 5 months ago

I was interested in making a custom materialization that would be similar to incremental by time range and by partition. Everything seems to be there to do it, except a few properties to enable the chunking.

Would it be possible to add these properties to the custom kind? batch_size: t.Optional[SQLGlotPositiveInt] = None batch_concurrency: t.Optional[SQLGlotPositiveInt] = None lookback: t.Optional[SQLGlotPositiveInt] = None

https://github.com/TobikoData/sqlmesh/blob/034476e7f64d261860fd630c3ac56d8a9c9f3e3a/sqlmesh/core/model/kind.py#L766

If the properties were defined to pull the values out of materializationproperties would it work simply without breaking other custom materializations that don't set them?

izeigerman commented 5 months ago

Fixed in https://github.com/TobikoData/sqlmesh/pull/2852