1 Flares Twitter 0 Facebook 1 Google+ 0 LinkedIn 0 Email -- Pin It Share 0 1 Flares ×

Map Operation Transformation

Map Operation TransformationSummary:-

Map Operation Transform enables us to change the operation code for records.

The operation code uses a flag which indicates how each row is applied into target.

There are 4 types of operation codes mentioned below

Normal:- Creates a new row in the target. All rows in a data set are flagged as NORMAL when they extracted from source. In case a row is flagged as NORMAL it will load into target. It is the common flag used by most of the transforms.

Insert:- – Creates a new row in the target.

Note: – Only history preserving and key generation transforms can accept data sets     with rows flagged as INSERT as input.

Delete :-  In case any row is ignored by target it will flag as DELETE.

Only the History Preserving transform with the Preserve delete rows as update rows option is selected can accept data sets with rows flagged as DELETE.

Update:- Update overwrites an existing row in the target table

Only History Preserving and Key Generation transforms accept data sets with rows flagged as UPDATE as input

Discard:- If you select this option, those rows will not be loaded into the target.

Example Scenario:-

In this figure 1 source file the changed records, updated, deleted records needs to be inserted  into different template table which means if the record ‘MT03’ has been updated as ‘MT01’that need to be inserted to separate table and if the second row deleted that has to be inserted into other template table.

 

Sequence column Material City Code Quarter
101 MT03 CT01 Q1
102 MT02 CT90 Q2

Figure 1:- Sample Source Data

In this figure 2 we can observe that the updated records are inserted.

Sequence column Material City Code Quarter
       101 MT01 CT01 Q1


Figure 2:- Sample Target data1 for update

In this figure 3 we can observe that the deleted records are inserted

Sequence column Material City Code Quarter
102 MT02 CT90 Q2

Figure 3:- Sample Target data 2 for delete 

Below figure 4 indicates the flow of objects in hierarchy format

Map Operation Transform in BODS
Figure 4:- Map_Opeation transformation object hierarchy

Below figure 5 indicates the flow of ETL job.

Map Operation Transform in SAP BODS
Figure 5:- ETL flow of map operation transformation

We can see the source data in below figure 6

Map Operation Transform in BODS 1
Figure6:- Source data

Delete Option:-

we can insert the deleted records into separate table by changing the delete option settings, as shown in figure 7

Map Operation Transform in BODS 3
Figure 7:- Map Operation transformation rule for delete

Update option:-

We can insert the updated records into separate table by changing the update option settings, as shown in figure 8

Map Operation Transform in SAP BODS 1
Figure 8:- Map Operation transformation rule for update

We can see that the updated records are inserted into separate table, as shown in figure 9

Map Operation Transform in SAP BODS 2
Figure9:- Updated row in Target data

we can see that the deleted records are inserted into separate table, as shown in figure 10

Map Operation Transformation in SAP BODS
Figure 10:- Deleted row in Target data

Source Files:-

  • Use the below files as sources for working out on the transformation 

Click Here to Download Source Data.

Attachment of ATL File:-

Import the below .ATL file in the Data Services Designer to find the Job for the above transformation.

Click Here to Download ATL File.

That’s it.

Enjoy 🙂

1 Flares Twitter 0 Facebook 1 Google+ 0 LinkedIn 0 Email -- Pin It Share 0 1 Flares ×