ksql icon indicating copy to clipboard operation
ksql copied to clipboard

Why do source streams require source table materialization to be enabled

Open Diyaa1 opened this issue 3 years ago • 2 comments

Hi all,

I don't know if this is expected, but when I try to create a source stream while table materialization is disabled, I get below error, how is this related to streams ??.

Cannot execute command because source table materialization is disabled.

another issue I have, is that source tables are creating a value schema for the used topic, I feel like this is unexpected considering it's a read-only topic.

Diyaa1 avatar May 31 '22 16:05 Diyaa1

Can you share the sql statements you used to get to that? You shouldn't need to materialize a stream at all.

agavra avatar Jun 07 '22 16:06 agavra

@agavra, oh sorry I'm late, in the documentation it says you can disable it using ksql.source.table.materialization.enabled.

I was testing things out and wanted to find a way to prevent ksqldb from creating a schemes for source topics no matter if it's source stream or source table

use case: We have around 17 KSQL migration files, the first one is for creating cdc.

when we run all the migrations together we get errors because the migrations won't wait for the cdc to finish it's initial snapshot and the source tables will create their own schemas instead of waiting for one.

so my one point is that if the source tables/streams are read only why do they create schemas.

https://docs.ksqldb.io/en/latest/developer-guide/ksqldb-reference/create-stream/#source-streams

Diyaa1 avatar Jun 23 '22 10:06 Diyaa1