Hi team, is it not possible to load rows with diff...
# questions-and-troubleshooting
s
Hi team, is it not possible to load rows with different columns using the Starrocks Kafka connector? We have a Primary Key table and we would like to stream load updates to different columns. However, if we set
partial_update: true
, we see an error like
Copy code
com.starrocks.data.load.stream.exception.StreamLoadFailException: Stream load failed because of error, db: dev, table: trait_data, label: -fd20516a-77cf-4f5d-906f-4c11a13bfc90,
responseBody: {
    "Status": "ANALYSIS_ERROR",
    "Message": "key column workspace_id not in partial update columns"
}
the message we are sending does have the primary key here - wondering if we need to specify the column list as some sink property? But there's nothing in the docs about this, and doing this would prevent us from updating different columns
Routine load seems to work if we specify every single column - should stream load work the same?
r
You can use partial update using starrocks Kafka connector. Can you share
show create table dev.trait_data;
Are you using it on distributed mode and how did you specify which columns to update?
s
Hmm actually we're seeing this issue with both routine load and kafka connector 😕 Table:
Copy code
CREATE TABLE `trait_data` (
  `tenant_id` varchar(36) NOT NULL COMMENT "",
  `object_id` varchar(36) NOT NULL COMMENT "",
  `entity_id` varchar(32) NOT NULL COMMENT "",
  `refreshed_at` datetime NOT NULL COMMENT "",
  `trait_0` varchar(1048576) NULL COMMENT "",
  `trait_1` varchar(1048576) NULL COMMENT "",
  `trait_2` varchar(1048576) NULL COMMENT "",
  `trait_3` varchar(1048576) NULL COMMENT "",
  `trait_4` varchar(1048576) NULL COMMENT "",
  `trait_5` varchar(1048576) NULL COMMENT "",
  `trait_6` varchar(1048576) NULL COMMENT "",
  `trait_7` varchar(1048576) NULL COMMENT "",
  `trait_8` varchar(1048576) NULL COMMENT "",
  `trait_9` varchar(1048576) NULL COMMENT "",
) ENGINE=OLAP 
PRIMARY KEY(`tenant_id`, `object_id`, `entity_id`)
PARTITION BY (`tenant_id`,`object_id`)
DISTRIBUTED BY HASH(`tenant_id`, `object_id`, `entity_id`)
ORDER BY(`tenant_id`, `object_id`, `entity_id`)
PROPERTIES (
"compression" = "LZ4",
"enable_persistent_index" = "true",
"fast_schema_evolution" = "true",
"replicated_storage" = "true",
"replication_num" = "1"
);
Routine load:
Copy code
CREATE ROUTINE LOAD dev.trait_updates on trait_data
COLUMNS (
	tenant_id, 
	object_id, 
	entity_id, 
	refreshed_at, 
	trait_0, 
	trait_1, 
	trait_2, 
	trait_3, 
	trait_4, 
	trait_5, 
	trait_6, 
	trait_7, 
	trait_8, 
	trait_9
)
PROPERTIES
(
"format"="json",
"partial_update"="true",
)
FROM KAFKA
(
"kafka_broker_list"="<...>:9092",
"kafka_topic"="trait_updates",
);
Example kafka message:
Copy code
{
  "object_id": "b54fcf32-472a-413c-bb5c-a7ae2705649f",
  "entity_id": "b54f_DCE40A21252F1457BBD84",
  "refreshed_at": "2025-11-07T20:00:31.625536406Z",
  "trait_1": "1",
  "tenant_id": "77449ebe-061d-4071-837e-e07b54f00ee2"
}
This loads successfully, but erases all other columns
Kafka connector sink
Copy code
config:
    topics: trait_updates
    starrocks.http.url: <>
    starrocks.topic2table.map: trait_updates:trait_data
    starrocks.username: <>
    starrocks.password: <>
    starrocks.database.name: dev
    sink.properties.strip_outer_array: "true"
    sink.properties.partial_update: "true"
    sink.properties.partial_update_mode: "column"
    sink.properties.columns: "tenant_id, object_id, entity_id, refreshed_at, trait_0, trait_1, trait_2, trait_3, trait_4, trait_5, trait_6, trait_7, trait_8, trait_9"
In reality - we actually have hundreds of columns - so a separate connector/routine load per column is not going to work for us
Seems like the answer is no 😕 https://starrocks.slack.com/archives/C02FACZSNJV/p1733302481621689 we have the exact same use case as this message