# Transformation Language

**URL:** <https://forum.cloverdx.com/t/transformation-language/203>\
**Category:** CloverDX Platform\
**Created:** [August 3, 2007, 12:00am UTC](https://forum.cloverdx.com/t/transformation-language/203 "2007-08-03T00:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xsvov1seznam.cz](https://avatars.discourse-cdn.com/v4/letter/x/c6cbf5/32.png) [@xsvov1seznam.cz](https://forum.cloverdx.com/u/xsvov1seznam.cz)\
**Post date:** [August 3, 2007, 12:00am UTC](https://forum.cloverdx.com/t/transformation-language/203/1 "2007-08-03T00:00:00Z")

</div>

Hi,

I can ask question how I can Transformation Language in transformation.

LookupJoin

I can do it for exaple this in transformation.

${out.0.OrderID} = ${in.0.OrderID};  
${out.0.CustomerID} = ${in.0.CustomerID};  
${out.0.EmployeeID} = ${in.0.EmployeeID};  
${out.0.EmployeeID2} = lookup(employee,${in.1.EmployeeID}.employee\_ID);  
${out.0.LastName} = lookup(employee,${in.1.full\_name}.employee\_ID);

this is your exaple in ETL Transformation Language on the webside

print\_err(lookup(LKP,’ HELLO ').Age);  
print\_err(lookup\_found(LKP));  
print\_err(lookup\_next(LKP).Age);

Thank you

---

<div class="post-metadata">

**Author:** ![dpavlis](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dpavlis](https://forum.cloverdx.com/u/dpavlis)\
**Post date:** [August 3, 2007, 4:13pm UTC](https://forum.cloverdx.com/t/transformation-language/203/2 "2007-08-03T16:13:12Z")

</div>

Hi !

Internal transformation language has a bit different syntax than the “script” which is converted to Java source.

This is example of transform() function used in HashJoin:

```auto
function transform(){
$OrderID := $OrderID;
$CustomerID := $CustomerID;
$EmployeeID := num2str($EmployeeID);
$EmployeeID2 := num2str($1.EmployeeID);
$LastName := concat($1.LastName,":",$1.FirstName);
}

```

To use lookup, it has to be defined in graph. Then you can use it something like this:

```auto
lookup( <id of the lookup>, <key par1>, <key par2>, ...).<field name>

```

Thus the following:

```auto
lookup(LKP,'a12','xxx').Name

```

Means that from lookup table with id LKP, we get record which corresponds to key ‘a12’,‘xxx’ and from such record content of Name field.

Have a look at examples package. It should give you some more info.
