Repository navigation
fix(salesforce): emit the dataspace and dataObjectType the API requires - #526
Merged
jbonofre merged 1 commit intoOct 7, 2026
Merged
Conversation
The semantic model API rejects a payload that omits the model's dataspace or a data object's reference type, but both reached the output only by way of SALESFORCE custom_extensions. A model round-tripped out of Salesforce carried them; one authored anywhere else did not, so a document arriving from another converter exported JSON the API refuses: 400 "missing a mandatory dataspace value", and 500 once the dataspace alone is supplied. Both are now defaulted alongside the existing label and tableType defaults, which run after custom_extensions are restored, so an explicit value still wins. The reference type is read off the data object name, which Data Cloud suffixes with the kind of object it is: __dlm is a data model object and anything else a data lake object. The README documents both defaults.
jbonofre
approved these changes
Oct 7, 2026
jbonofre
left a comment
Member
There was a problem hiding this comment.
LGTM!
applyDefaults runs after restoreCustomExtensionsAtLevel and uses putIfAbsent, so a restored dataObjectType or dataspace still takes precedence over the default, and the new test covers that. A missing dataObjectName falls back to Dlo safely.
Nit: the __dlm suffix check is case-sensitive, so something like Orders__DLM would be classified as Dlo. Data Cloud suffixes are lowercase, so I don't think it matters in practice.
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The semantic model API rejects a payload that omits the model's
dataspaceor adata object's
dataObjectType, and both reached the export only throughSALESFORCEcustom extensions. A model that came back out of Salesforce carriesthem; one authored anywhere else does not, so a document handed over by another
converter exports JSON the API refuses:
Both now default alongside the existing
labelandtableTypedefaults, whichrun after custom extensions are restored, so a restored value still wins.
The reference type is read off the data object name: Data Cloud suffixes it with
the kind of object it is, so
datasets[].sourcealready carries the answer, andthe API enforces the pairing.
dataObjectNamedataObjectType…__dllDlo201…__dllDmo400, not a DMO…__dlmDmo201…__dlmDlo400, not a DLOA name with neither suffix came from outside Data Cloud and lands in a data lake
object once ingested, so
Dlois the default.The published schema's
dataObjectTypeenum is stale (Dlo,Query) wherev67.0 takes
DloandDmoand rejectsQuery. Export is not schema-validated,so this only bites on import, where a DMO-backed model is already rejected today.
The README notes it; it is a separate problem from this one.
Verification
mvn -B -DrequireSalesforceSchema=true clean verify: 296 tests, 0 failures,0 errors, 0 skipped. Green on the CI profile too, with the 15 pre-existing
schema-gated skips.
guards that a restored custom extension still wins over the suffix.
mainthe export POSTs400, on this branch the same export POSTs201and/validatereturnsisValid: true. The test model was deleted afterwards.SALESFORCEcustom extensions exports byte-identicalto
main, and export → import → export is stable.Related Issues
No existing issue or PR covers this. Same shape as #512 and #514: a default that
sits after the custom-extension restore.
Checklist
Sections this change does not touch (Specification, Ontology, Validation,
Examples) are omitted rather than left unchecked.
Converters
Documentation
converters/salesforce/README.mddocuments both defaults and the suffix ruleTests
Compliance