• Index
  •  » Talend Open Studio for Data Integration » Component creation
  •  » Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

#1 2012-04-11 17:03:53

ffwrude
Member
Registered: 2010-07-06
Posts: 57

Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

Hi,

I wanted to start my own joblet/component (don't really know the difference between the two) and i'm kind of stuck because of the DYNAMIC SCHEMA thing.

What i want to do ?

- Extract some data from a database into a CSV file on my server.
- Send the file via mail
- Delete the file

But the thing is that i don't want to do the guess schema each time. Because it changes the joblet. So i was wondering if there was a component that could read a schema. Or extrapolate it. The same way that TALEND itself asks if you want to recover the schema from the previous component.

Is there a way to do that ?

Or is there a way to emulate "click and validate" on the guess schema button for a component ?

Thanks by advance.

Rude


Talend user since 2010-07-01

Offline

#2 2012-04-11 18:16:32

vgalopin
Talend team
Registered: 2009-04-15
Posts: 442
Website

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

Hi Rude,

There's no way for what I know to have a dynamic schema inside Talend, except the actual dynamic schema feature in Talend Enterprise (the subscription version of Talend). This feature allows you to go over the fact that you need to define a schema. I've used it to do some db migrations like that:

tDbInput                                                          tDbInput                                                      tDbOutput
Request to Get Table Names ---->Iterate ---->   Dynamic Schema                 --------------->    Create Table
For a Db                                                          Select * from table_name

Pretty useful :-)


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

#3 2012-04-11 18:23:08

ffwrude
Member
Registered: 2010-07-06
Posts: 57

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

I've got TIS. Can i access thoses fonctionalities ?


Talend user since 2010-07-01

Offline

#4 2012-04-11 18:47:04

vgalopin
Talend team
Registered: 2009-04-15
Posts: 442
Website

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

Then you should be able to see it. Just create one column in your schema, and choose as a type the type "Dynamic".


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

#5 2012-04-11 18:59:02

ffwrude
Member
Registered: 2010-07-06
Posts: 57

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

Thank you but it's not what i'm looking for. I want to create the column dynamicaly.


Talend user since 2010-07-01

Offline

#6 2012-04-11 19:12:55

vgalopin
Talend team
Registered: 2009-04-15
Posts: 442
Website

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

This is what I'm saying...

Say you have a table with 3 columns:
Id
FirstName
LastName

And you want to load the content of that table into a file.

Use you DbInput, and in the schema just put a single column (the name doesn't matter) of type "Dynamic". All your columns will automatically be stored into that column.


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

#7 2012-04-11 19:33:17

ffwrude
Member
Registered: 2010-07-06
Posts: 57

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

Oh ok. I thought i had to create 3 columns with "Dynamic".


Talend user since 2010-07-01

Offline

#8 2012-04-11 19:48:51

ffwrude
Member
Registered: 2010-07-06
Posts: 57

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

Just tested it. Works WONDER ! Thank you !


Talend user since 2010-07-01

Offline

#9 2012-04-11 21:00:41

vgalopin
Talend team
Registered: 2009-04-15
Posts: 442
Website

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

You're welcome!


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

#10 2012-04-12 12:03:16

avdbrink
Member
Company: Conspect Consulting & ICT
Registered: 2010-11-08
Posts: 360
Website

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

Hi Vincent,

Do you know if there's any chance this Dynamic functionality as it is available to (some) database input components, will be ever made available for file input components (tFileInputExcel for example)?


Regards,
Arno

Offline

#11 2012-04-12 15:49:48

ffwrude
Member
Registered: 2010-07-06
Posts: 57

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

Hi again,

I just tried to create a Joblet From this but it says that "Input" doesn't support the Dynamic type.


Talend user since 2010-07-01

Offline

#12 2012-04-13 01:00:51

vgalopin
Talend team
Registered: 2009-04-15
Posts: 442
Website

Re: Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

To answer both of you:

Indeed the dynamic type is currently limited to some components only. I don't have the estimate right now on when they plan on making it available at a larger scale.

Arno: I think it's available for tFileInputDelimited, so you could transform your excel files in csv files and use this component.
ffwrude: I guess then it means that the Joblet components aren't developed with the Dynamic type feature in them yet! If you want to use Dynamic types, you can't use Joblets.

Both of you could make a feature request on our bugtracker to get that changed. Usually our developments are based on the customer needs, and by making the request on our bugtracker you will have an estimate of which release the feature will be included in.


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Component creation
  •  » Create a Dynamic sendFile from DB to file with DYNAMIC SCHEMA !

Board footer

Powered by FluxBB