0344-Generating A UUID Using A Java Transformation
0344-Generating A UUID Using A Java Transformation
2011 Informatica Corporation. No part of this document may be reproduced or transmitted in any form, by any means
Abstract
A Universal Unique Identifier (UUID) uniquely identifies a record. This article describes how you can use a Java transformation in a PowerCenter mapping to generate a UUID and send it to the target system.
Supported Versions
PowerCenter 8.6.1 HotFix13 - 9.1.0
Table of Contents
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Java Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Configuring an Output Port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Configuring the Java Code Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Import Packages Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 On Input Row Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Overview
A UUID is a 128-bit number and is represented by 32 hexadecimal alphanumeric characters. You do not require a centralized authority to administer a UUID. Therefore, you can completely automate the generation of a UUID and use it for multiple purposes. Here is an example of a UUID: e5dabe13-ff37-423b-b980-538e7132cd67.
Example
Your organization needs to integrate data from different databases, and you need to generate unique IDs that are unique across systems. A regular ID is unique within the table of the database. However, there may be a conflict of ID numbers when you integrate data from different databases. If the IDs are integers, an external entity can decipher the number of records and size of the database. To generate unique, non numeric IDs, use a UUID that is unique across systems and which you can generate using an external application. You can use the Java transformation to define simple or moderately complex transformation functionality without advanced knowledge of the Java programming language or an external Java development environment. You can use a passive Java transformation in a mapping to generate a UUID and send it to the target system.
Java Transformation
Use the Java transformation to read each row of data and pass the data to output ports. Define the Java transformation functionality on the Java Code tab. To generate a UUID, complete the following steps: 1. 2. Configure an output port Configure the Java Code tab
Author
Maria Kurien Abraham Senior Technical Writer
Acknowledgements
The author would like to acknowledge Sidhartha Sarat Bardoloye, QA Manager, for his technical assistance.