how to set reference to another entity in a Robust Transformer

ashrafi
Tera Contributor

Hi All,

I am inserting the a record in two separate table using robust transform map, but facing one issue of Reference field.

eg:- Table A has a reference field which is refer to table B. I want to set the sysId of record created in table B to the reference filed of Table A.

Any suggestion will be valuable ...

9 REPLIES 9

Hi,

I'm trying to understand the scenario both tables are getting the data same time. Are you using the Importset table approach? Can you please explain how data is getting into target tables.

Regards,

Suresh.

Regards,
Suresh.

Neil Starr
Tera Contributor

Did you ever solve this? I'm struggling to work out how to use the Referenced entity field myself.

sc
Tera Contributor

Btw. I'm not using ETL Integration Hub, and I don't want (this is just testing example for RTE, and base on that I want create totally different mapping).

J Siva
Tera Sage

Hi all,
I too had a similar requirement and found the solution. PFB for the detailed steps.

Requirement:
As a user I need to import the user, group and group member data from the single excel sheet.

Solution:

Excel data: (Demo data)

JSiva_0-1709185529361.png

 

 

Step 1: Create a Data Source and attach the excel file.

JSiva_1-1709185529373.png

 

 

Step 2: Create a Robust Transformer from the related list of the data source (created at step 1)

JSiva_2-1709185529379.png

 

JSiva_3-1709185529385.png

 

 

Step 3: Create a Transformer definition (ETL definition) and Entities.

As per the requirement, we need to load the data into 3 different tables (User, Group & Group member table).
Hence we need to create 5 tables in total (including Import set and Staging table)

1. Import set entity – To store the data from the source.
2. Staging entity – To store the copy of the source data to do the required operations.
3. User entity – sys_user table (Target)
4. Group entity – sys_user_group table (Target)
5. Group Member entity – sys_user_grmember table (Target)

 

JSiva_4-1709185529395.png

 

 

Entities:
1. Import set entity:

JSiva_5-1709185529404.png

2. Staging entity:
JSiva_6-1709185529413.png
3. User entity:
JSiva_7-1709185529422.png
4. Group entity:
JSiva_8-1709185529430.png
5. Group Member entity:
JSiva_9-1709185529438.png

 

Note:
Group member entity fields are dependent on previous entities (User and Group).
In the User entity, “User Name” field is considered as a primary key (Coalesce = true) and in the group entity “Name” field is the primary key.
So while declaring the path for Group Member entity fields, we need to use the primary keys of the dependent entities.

 

Step 4: Create Entity Mappings

JSiva_16-1709185599185.png

1. Import set to Staging table:

JSiva_17-1709185599196.png

 

2. Staging to User table:

JSiva_18-1709185599205.png

3. Staging to Group Table:

JSiva_19-1709185599214.png



4. Staging to Group member table:

JSiva_20-1709185599222.png


Finally, we need to load the data from the file and run the robust transform
map.
1. Load all the data from the file

JSiva_21-1709185878441.png

2. Run the Robust transform

JSiva_22-1709185935745.png


Results:
Users table:

JSiva_23-1709185976384.png

Groups table:

JSiva_24-1709186006149.png

Group Members Table:

JSiva_25-1709186030536.png

 

Regards,
Sivamuruganandam J

 

 

 



Hi, how would this work with more than one coalescence field, example importing costplans for a demand, where the identifiers are department and demand name?

Thanks!