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

Genesis: Add dedicated "cratedb-configs" page to upstream documentation #7

Open
Tracked by #3
amotl opened this issue Dec 11, 2024 · 5 comments
Open
Tracked by #3
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@amotl
Copy link
Member

amotl commented Dec 11, 2024

About

Coming from dbt-labs/docs.getdbt.com#6564 (comment), we should review our implementation, and then possibly add a dedicated cratedb-configs page, for example like yellowbrick-configs is doing it, that educates readers about the fact CrateDB might only support a subset of the materialization strategies compared to what the PostgreSQL adapter provides per postgres-configs.

Workaround

For immediate application, we will do it like the risingwave-setup page is doing it, by referring to the no-configs page, that says there are "no specific configurations for this adapter". By doing it this way, we can contribute a relevant page later, but sure enough it would be sweet to get it right and complete from the very beginning.

@amotl amotl added the bug Something isn't working label Dec 11, 2024
@amotl amotl added documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed and removed bug Something isn't working labels Dec 11, 2024
@hlcianfagna
Copy link

It may be interesting to use this to expose things like sharding, number of replicas, and compression.
Also in terms of documenting supported materialization strategies, as the PostgreSQL implementation relies a lot on MERGE instead of INSERT ... ON CONFLICT we probably can only support delete+insert at the moment.

@amotl
Copy link
Member Author

amotl commented Dec 11, 2024

we probably can only support delete+insert at the moment.

Ah. Thank you. Can you point out a concise example dbt snippet/project to me, which uses delete+insert, which I could add to this example project, so that it will also be validated per integration test?

It may be interesting to use this to expose things like sharding, number of replicas, and compression.

That would be nice. 💯

Also in terms of documenting supported materialization strategies, because CrateDB can't provide all that PostgreSQL does.

Absolutely.

@hlcianfagna
Copy link

Can you point out a concise example dbt snippet/project to me, which uses delete+insert

Sure,

jobslog.sql

{{ config(materialized='ephemeral') }}

select * from sys.jobs_log

test2.sql

{{ config(materialized='incremental',
    unique_key='id',
    incremental_strategy='delete+insert'
  )
}}

select * from {{ ref("jobslog") }}
{% if is_incremental() %}

  where started >= (select max(started) from {{ this }})

{% endif %}

@amotl
Copy link
Member Author

amotl commented Dec 21, 2024

Thank you very much. I just added this recipe to another example project at cratedb-examples. Do you agree with this decision?

@amotl
Copy link
Member Author

amotl commented Dec 21, 2024

It may be interesting to use this to expose things like sharding, number of replicas, and compression.

I am not sure if this module could help in this regard?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants