How to create a generic schema in the project metadata from Dynamic input

Four Stars Rem
Four Stars

How to create a generic schema in the project metadata from Dynamic input

Hi! 

 

I'm looking for a way to create a new Generic Schema (saved in the project metadata) based on a Dynamic input I would receive in a tJavaRow. The input flow would only have 1 row, only to be able to parse the structure using, in the Java code, the Dynamic and DynamicMetadata classes. 

 

Is this even possible? 

 

Thanks! 

Eight Stars

Re: How to create a generic schema in the project metadata from Dynamic input

We can build the generic schema from XML's. So my idea is to create XML with  column details based on the input.  Create a generic schema using newly created XML file.

 

XML creation is easy. We need to findout the talend commandlines to create the generic schema in automated way. Once we are able to find the command, by using tSystem the generic schema can be created dynamic manner.. 

 

Four Stars Rem
Four Stars

Re: How to create a generic schema in the project metadata from Dynamic input

I've started to look at this solution this morning too. The XML needed to create a schema is pretty simple so it would be easy to prepare them. But I haven't found any command to load them automatically.

 

Another acceptable option would be If it was possible to load a folder of XML files in one shot. But from what I've found so far, if we want to create a generic schema from an XML file, it would still be one by one... and we have 400 of them to create. Just trying to save some time..

 

Thanks! 

Eight Stars

Re: How to create a generic schema in the project metadata from Dynamic input

Then create .item for each schema with its corresponding properties file but this needs very good understanding of the grammar used for generating the item file which is quite complicate task.  It won't be a recommended approach to manually compute a .item file..  Just a thought Smiley Happy

Eight Stars

Re: How to create a generic schema in the project metadata from Dynamic input

Then create .item for each schema with its corresponding properties file but this needs very good understanding of the grammar used for generating the item file which is quite complicate task.  It won't be a recommended approach to manually compute a .item file..  Just a thought Smiley Happy

Four Stars Rem
Four Stars

Re: How to create a generic schema in the project metadata from Dynamic input

I took a look at the properties and the items files for each generic schema....  Indeed very complexe, much more than the XML used to load the generic schema manually in a the project, but not impossible...

 

My major concern would be : How to generate each obect ID (attribute "xmi:id" in the item file) without creating conflict in the project repository ?  

 

I'm still open to new suggestions too! But after a second day of working aroud this idea (and not finding anything), I guess this will remain an idea....