Releases: streamingfast/substreams-sink-sql
Releases · streamingfast/substreams-sink-sql
v4.11.3
DatabaseChanges mode improvements
-
Fixed Clickhouse table fetching to ignore materialized columns when inserting data. If a column is materialized from another one, the column is skipped for data insertion coming from the Substreams.
-
Added
handle_block_durationtopostgres sink statsperiodic logger to show how long from start to finish handling a block takes (this make more sense once live where each block is flushed to the database normally). -
Added new Prometheus metrics:
substreams_sink_sql_prune_reversible_segment_duration- How long it takes to prune the reversible of the chain, when there is onesubstreams_sink_sql_tx_query_execution_duration{query_type: normal|undo}- How long it took to execute thetx.ExecContextcall for saving the received data into the database,normalbeing for the data insertion,undobeing for the saving of "undo" row to handle re-orgs.
Note Current metrics starts with
substreams_sink_postgres, we have started to now usesubstreams_sink_sql.
v4.11.2
v4.11.1
Clickhouse from proto improvements
Add retry logic queries and enhance client handling
- Introduced
clickhouse-query-retry-countandclickhouse-query-retry-sleepflags to configure retries. - Implemented retry mechanism with fresh client acquisition for query execution failures.
- Enhanced ClickHouse database and inserter logic to handle retries consistently.
DatabaseChanges mode improvements
- Refactor encoder to use CSV writer for row formatting when using
substreams-sink-sql generate-csvcommand.
Clickhouse specific changes
- Breaking: ClickHouse HTTP protocol is no longer supported. Only the native TCP protocol is accepted (ports 9000 or 9440 for secure connections). Attempting to use HTTP ports (8123 or 8443) will result in an explicit error:
ClickHouse HTTP protocol (port <port>) is not supported. Please use the native TCP protocol on port 9000 or 9440. The HTTP protocol had compatibility issues with schema introspection and metadata queries.
v4.11.0
v4.10.0
v4.9.0
DatabaseChanges mode improvements
- Fixed bug where some unescape column where not correctly preserving cases in some situations like handling of upsert primary key(s).
From-proto mode improvements
- Fixed conversion of
Decimal128,Decimal256,Int128,UInt128,Int256, andUInt256if they are defined asoptionalin the Protobuf.
Clickhouse specific improvements
- Removed
ClickhouseReplacingFieldand associated functionality- Removed
ClickhouseReplacingFieldusage from protobuf schema and generated files - Adjusted
ClickhouseTableOptionsto excludereplacing_fields - Updated ClickHouse dialect to streamline
ReplacingMergeTreelogic and addallow_experimental_replacing_merge_with_cleanupsetting - Cleaned up dependencies and unused code related to
ClickhouseReplacingField
- Removed
v4.8.0
From-proto mode enhancements
- Added support for new numeric types in from-proto mode:
Decimal128,Decimal256,Int128,UInt128,Int256, andUInt256- These fields are converted from string format in both PostgreSQL and ClickHouse implementations
- PostgreSQL maps these types to appropriate
NUMERICandDECIMALdata types with proper precision and scale - ClickHouse maps these types to their corresponding native numeric types (Int128, UInt128, Int256, UInt256, Decimal128, Decimal256)
- Enhanced protobuf schema definitions to include string conversion types for large numeric values
- Added string-to-numeric conversion support in PostgreSQL type mapping system
v4.7.0
v4.6.9
- Bumped
substreamstov1.16.7-0to add foundational stores support.
v4.6.8
Postgres & substreams-sink-sql run
- Fixed
schemaName=<schema>not working properly onsetupcommand if the user's SQL script does not specify an specific schema itself.
Clickhouse & substreams-sink-sql run
- Skip
AggregateFunctioncolumns on Clickhouse when describing the schema.