[destination-snowflake] Snowflake destination fails on empty stream (`partition_id` missing)
- Dominant language
- Python
- Stars
- 22.1k
- Forks
- 5.3k
- PR merge metrics
- PR metrics pending
Description
### Connector Name
destination-snowflake
### Connector Version
4.0.31
### What step the error happened?
None
### Relevant information
**Summary:**
Sync fails when a stream is empty. Source and destination checks succeed, but the destination pipeline throws `Expected partition_id and id in additional properties (got [id]).`
**Repro (concise):**
1. Run the sync.
2. Ensure the stream has 0 rows.
3. Sync fails in destination.
4. Expected: Sync succeeds with 0 records.
**Actual:** Destination pipeline crashes with partition_id missing.
**Versions:** Airbyte 2.0.1, source-mysql 3.51.5, destination-snowflake 4.0.31.
### Relevant log output
```shell
java.lang.IllegalStateException: Expected `partition_id` and `id` in additional properties (got [id])
at io.airbyte.cdk.load.message.DestinationMessageFactory.keyFromAdditionalPropertiesMaybe(DestinationMessageFactory.kt:179)
...
Failures: [{
"failureOrigin": "destination",
"failureType": "system_error",
"internalMessage": "java.lang.IllegalStateException: Expected `partition_id` and `id` in additional properties (got [id])",
"metadata": { "connector_command": "write" }
}]
Sync summary: {
"status": "failed",
"recordsSynced": 0,
"streamStats": [{
"streamName": "...",
"streamNamespace": "...",
"stats": { "recordsEmitted": 0, "recordsCommitted": 0 }
}]
}
```
### Contribute
- [ ] Yes, I want to contribute
---
**Internal Tracking:** https://github.com/airbytehq/oncall/issues/11049
Contributor guide
Assessment
This issue has not been assessed yet.