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".

Sign In or Register to comment.