Auto Insert UUID To MySQL Target

Situation:- To automatically generate UUID in the data mapper to the MySQL target so that it can be utilized as a Primary key on the database side.

 

Solution:- The 'getUUID' method is static so its value can be directly utilized. This can be achieved by using the below steps:-

1. Create a Global Custom method in mapping by using Class as 'com.adeptia.indigo.utils.IdGenerator' and Method as 'getUUID' with Parameters value as '0'. Once you create this method, it can be seen in Custom Methods.

CustomMethod.png


2. Map the value of this custom method to the target element in the textual Rule.

 

Textual_Rule.png

Textual Rules: java:com.adeptia.indigo.utils.IdGenerator.getUUID( )

By following the above steps we are able to fetch the unique random number.

Have more questions? Submit a request

0 Comments

Article is closed for comments.