Best way to map data between complex types
Is there an example/tutorial anywhere that shows the best way to map data between two complex data types? I've got 2 different database queries, query 1 gets called under certain conditions, query 2 under others. They are identical SQL but go to 2 different databases. So, they both return data of the same shape, but have different data type names because they're different queries. I want to be able to access the results via a RESTful JSON request, so I need to be able to map them both to the same type in the Done step. Each query returns a list of records, so I need to be able to map to an output list. Any suggestions?
Comments
-
You are able to use the "Select Type" return data option in the Query Integration editor (System > Integrations > Databases > *DBIntegrationName*) and select the complex type you'd like it to return as. Decisions will map the results of both queries to the appropriate fields based on the column names. The database that the data comes from shouldn't matter as long as the column names are the same.
If the column names are different and this isn't an option for you, the List Mapping Step will allow you to transform data of one type into another type. You will need to set up the List Mapping Step to output the desired type then tell the step which fields from the input correspond with what output fields with the "Show Item Mapping Editor".
Howdy, Stranger!
Categories
- 4.2K All Categories
- 64 General
- 11 Training
- 201 Installation / Setup
- 1.1K Flows
- 106 Rules
- 261 Administration
- 212 Portal
- 490 General Q & A
- 693 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 178 Pages
- 5 Process Mining
- New Features
- 178 Datastructures
- 69 Repository
- 220 Integrations
- 28 Multi-Tenant
- 27 SDK
- 78 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 76 Lunch And Learn Questions