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

6 REPLIES
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