Area: Ingestion Issues
Sub-Area: Payload Size Limits
Applies to: OSS + Cloud
Issue
An ingestion run emits an aspect that is larger than the size limit. This is most often a large schemaMetadata aspect on a table with many or deeply nested fields. The run reports a truncation warning, or the metadata for that dataset does not arrive.
Messages You Might See
- CLI warning:
MCP object <id> has size <n> that exceeds the max payload size of <limit>, so this metadata will likely fail to be emitted. - Run warning:
Schema truncated due to size constraint - Run warning:
Dataset profile truncated due to size constraint
You Might Be Asking
- Is there a setting to lower the aspect size limit on the client?
- Why was my schema truncated?
- Does
max_aspect_size_bytesormax_threadschange the payload size?
Cause
The DataHub CLI caps the payload it sends at 15728640 bytes (15 MiB). The environment variable DATAHUB_REST_EMITTER_BATCH_MAX_PAYLOAD_BYTES sets the cap. The emitter splits batches by this size. If one aspect is larger than the cap, the CLI logs the warning above, because splitting a batch cannot make a single aspect smaller.
Every ingestion run also applies an automatic aspect size check before it emits. The check uses the same cap. For an oversized schemaMetadata aspect, it:
- Drops the raw platform schema.
- Drops the deepest nested fields until the aspect fits.
- Reports the run warning
Schema truncated due to size constraint.
The check also truncates oversized dataset profiles, upstream lineage, query subjects, query properties and view properties. Each has its own warning title ending in truncated due to size constraint.
The server has its own separate limits, and the client cap is not a single figure for both. On DataHub Cloud you can't see or change server limits. If you think a server-side limit is rejecting your aspects, contact DataHub Support.
Solution
-
Read the run report. Find the warnings listed above. Each warning title shows which aspect was truncated.
-
Use the right setting for the client cap.
max_aspect_size_bytesis not adatahub-restsink option. The sink ignores unknown keys without an error, so the key does nothing. To lower the cap, and so the truncation threshold, set the environment variable:- CLI runs: set
DATAHUB_REST_EMITTER_BATCH_MAX_PAYLOAD_BYTESin the shell that runsdatahub ingest, for exampleexport DATAHUB_REST_EMITTER_BATCH_MAX_PAYLOAD_BYTES=10485760. - UI-based ingestion, including DataHub Cloud: add it under the source's advanced settings, in Extra Environment Variables.
A lower cap truncates schemas sooner, so you lose nested fields that you might want to keep.
- CLI runs: set
-
Do not change sink concurrency to shrink payloads. In the DataHub REST sink,
max_threadsandmax_pending_requestsonly control async concurrency. Batches are already split by byte size, and a single oversized aspect is not affected. Setting both to 1 only slows ingestion. -
Exclude or isolate the tables that cause the problem. For Iceberg,
table_patternis matched against<namespace>.<table>, andnamespace_patternfilters top-level namespaces. See the Iceberg source configuration. Use single quotes around patterns in YAML:source: type: iceberg config: table_pattern: allow: - 'specific_namespace\.essential_table_.*'You can also run separate jobs for different namespaces. This does not shrink an aspect that is too large on its own. Use it to keep the oversized tables out of a job.
-
Know that profiling is a separate aspect. Iceberg
profiling.enabledisfalseby default. The schema and the dataset profile are separate aspects with separate truncation. Turning profiling off does not change the size of the schema aspect.source: type: iceberg config: profiling: enabled: false -
Check that the writes landed. The
datahub-restsink defaults toASYNC_BATCHmode. GMS accepts the proposal first and processes it later. If that later processing fails, the failure goes to the Failed MCP topic and the original run does not see it. A successful run report does not prove that every write landed. Check the dataset in DataHub. -
Server limits on DataHub Cloud. You can't set GMS environment variables or server configuration on Cloud. Contact DataHub Support.
Do not add keys that the source does not define. Source configs reject unknown keys with an extra-fields error before the run starts.