Skip to content

Conversation

@prybintsev
Copy link
Contributor

Currently it is impossible to run silk sql against clickhouse schemas that have materialized views, due to the following error:

unable to setup postgres sinker: load psql table: invalid table: sql sink requires a primary key in every table, none was found in table substreams_evm_tokens.mv_erc20_metadata_changes

clickhouse views don't have primary keys.
In previous versions streamingfast/schema was used to retrieve the list of clickhouse tables, that filtered materialized views and some other types of tables

https://github.com/streamingfast/schema/blob/master/dialect_clickhouse.go#L11

This PR ports the filtering logic from streamingfast/schema

@prybintsev prybintsev force-pushed the ignore-materialized-views-and-system-tables branch from cd852dd to d93a0cf Compare December 4, 2025 17:07
prybintsev and others added 2 commits December 4, 2025 12:07
…ystem-tables

GetTablesInSchema to ignorw materialized views, system, temporary and…
@prybintsev prybintsev force-pushed the ignore-materialized-views-and-system-tables branch from d93a0cf to 02e105b Compare December 4, 2025 18:11
@maoueh
Copy link
Contributor

maoueh commented Dec 4, 2025

I've also added an integration tests not to test that to ensure no regression here anymore.

@maoueh maoueh merged commit 2a6e293 into streamingfast:develop Dec 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants