syndesis: Datamapper fails with split in some cases
This is a…
[ ] Feature request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Documentation issue or request
Description
We have had problems with datamapper causing errors when using split and aggregate steps. You can import this integration to see the error: https://drive.google.com/open?id=1aNSEt21U-NW8tyUrGo5JbL23V_tkNMQc Since it’s an API provider, you need to invoke the flow with:
curl -X POST <url> -d '[{"id":2,"completed":1,"task":"task2"},{"id":3,"completed":1,"task":"task3"}]'
This is the resulting stacktrace (there are multiple errors so choose one you find most useful 😄): i-todo-integration-post-collection-2-6qkd4.log
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 33 (32 by maintainers)
Commits related to this issue
- #6118 Support unified json bodies when auto adapting data shapes in combination with aggregate steps — committed to christophd/syndesis by christophd 5 years ago
- #6118 Support unified json bodies when auto adapting data shapes in combination with aggregate steps — committed to syndesisio/syndesis by christophd 5 years ago
- #6118 Do not use SQL batch update mode by default as it breaks existing data mappings in integrations — committed to christophd/syndesis by christophd 5 years ago
- #6118 Do not use SQL batch update mode by default as it breaks existing data mappings in integrations — committed to syndesisio/syndesis by christophd 5 years ago
- fix: explicitly set IDs for steps too, add comments; part of #6118 — committed to syndesisio/syndesis by gashcrumb 5 years ago
- fix: revisit fix for #6118, ensure step IDs are only overridden when undefined; for #6224 — committed to syndesisio/syndesis by gashcrumb 5 years ago
- Merge pull request #6237 from syndesisio/backport-6235-to-1.7.x [Backport 1.7.x] fix: revisit fix for #6118, ensure step IDs are only overridden when undefined — committed to syndesisio/syndesis by christophd 5 years ago
Thanks @gashcrumb this resolved my issue, let’s see if it does the same to @mmelko
@gashcrumb small correction: this is the correct schema with the
POST multipleoperationSteps to reproduce the API provider case: Create API Provider from this schema Implement flow
POST multiple tasksAdd split Add aggregate In between split and aggregate ad DB connection with queryINSERT INTO todo (id, completed, task) VALUES (:#id, :#completed, :#task)Add data mapper between split and DB and map id -> id, completed -> completed, task -> task Add data mapper after DB and map the properties the same way Publish the integration and run theCURL curl -X POST <url> -d '[{"id":2,"completed":1,"task":"task2"},{"id":3,"completed":1,"task":"task3"}]'EDIT: updated export TODO Integration post collection-export(1).zip