Trying to create a dynamic job in Studio

Four Stars

Trying to create a dynamic job in Studio

Hi

I have created a job that creates an XML suitable for importing into a tRowGenerator schema.

 

I then run a second job after importing the schema. I was wondering if it was possible to combine these 2 jobs in to one where the tRowGenerator's schema is dynamic, using the generated XML?

 

Thanks

K

Moderator

Re: Trying to create a dynamic job in Studio

Hello,

Could you please elaborate your case with an example with input and expected output values?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Trying to create a dynamic job in Studio

Hi

 

OK, I generate an XML dynamically, say:

<?xml version="1.0" encoding="UTF-8"?>

<schema>
  <column comment="" default="" function="TalendString.getAsciiRandomString(int)" key="false" label="RandString" length="0" nullable="true" originalDbColumnName="RandString" originalLength="-1" parameter="length=&gt;Numeric.random(6,15)   ; " pattern="" precision="0" preview="" talendType="id_String" type=""/>
  <column comment="" default="" function="Numeric.random(int,int)" key="false" label="RandNumber" length="0" nullable="true" originalDbColumnName="RandNumber" originalLength="-1" parameter="min value=&gt;0  ; max value=&gt;999" pattern="" precision="0" preview="" talendType="id_Integer" type=""/>
  <column comment="" default="" function="..." key="false" label="FullName" length="0" nullable="true" originalDbColumnName="FullName" originalLength="-1" parameter="customize parameter=&gt;TalendDataGenerator.getFirstName() + &quot; &quot; + TalendDataGenerator.getLastName()" pattern="" precision="0" preview="" talendType="id_String" type=""/>
</schema>

Then I use this in another job and import the schema to a tRowGenerator:

Capture.JPG

This works fine by selecting the "Import" button (marked in red above) and produces the expected (pictured) results.

 

What I am wondering was if it was possible to automate the load of this schema rather than having to manually clicking on the import button.

 

Hope I've explained it well enough this time.

 

Regards

Kenton

 

Moderator

Re: Trying to create a dynamic job in Studio

Hello,

Talend provides user with dynamic schema feature which allows you to design schema with an unknown column structure (unknown name and number of columns).
This feature is available in talend subscription solution.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Trying to create a dynamic job in Studio

Thanks Sabrina.

Can you point me in the right direction for how to do this in your enterprise version. I am using open studio while I've been waiting for the licensing to go ahead.
Moderator

Re: Trying to create a dynamic job in Studio

Hello,

Please refer to this article:https://community.talend.com/t5/Design-and-Development/How-to-process-changing-data-structure/ta-p/2....

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Trying to create a dynamic job in Studio

Hi Sabrina

 

Thanks for that.

 

Correct me if I'm wrong, but as I see it, what I am asking is NOT possible as tRowGenerator is not listed as a component that provide the Dynamic Schema feature.

 

Is there another way?

Kenton

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog