Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…


This article explains how to make an order by in a mapping when loading hierarchical files.

 

The metadata

The hierarchical file we are loading looks like this:

 fileMetadata

See this article if you need help to make it.

Our goal is to order the data by TIT_CODE when loading the file from the demo database.

 

The mapping

The mapping is very similar to what we would usually do when loading a hierarchical file.

The source fields are mapped to the target and all the records are mapped with a repetition key.

mapping

Now, to order the customers by TIT_CODE, we are going to modify the expression of the customer record node.

The idea is to concatenate all the columns we would have put in an ORDER BY SQL Query.

We set it here to CONCAT(T_CUSTOMER.TIT_CODE, T_CUSTOMER.CUS_ID).

The data will then be ordered by TIT_CODE and CUS_ID

updatedMapping

 

Articles

Suggest a new Article!