Page 1 of 1

Write code to extract record from multiple tables to Files.

Posted: Tue Dec 09, 2008 5:46 am
by JITeam
Hi,

I have to extract multiple tables record and write into the different CSV files.
Extraction is simple (Select * from table),In Server Edition do you have idea of writing code in DS where we will define the table name , Connection strings of DB and get extracted the record in CSV with Table Definition.

EX:

Table File
ABC ABC.CSV
BCA BCA.CSV
CBA CBA.CSV

Thanks

Posted: Tue Dec 09, 2008 8:34 am
by chulett
There really isn't the concept of "select *" in Server since everything is metadata driven. So the typical answer would be one job per table.

How many tables are "multiple"?

Posted: Tue Dec 09, 2008 12:51 pm
by ray.wurlod
Provided that the record structure is identical, you could use one job with the table/file name a job parameter.

Posted: Tue Dec 09, 2008 11:05 pm
by JITeam
Thanks guys, the tables have different metadata and approx 95 tables, if in EE we could have used RCP I guess.

So writing a job with 100 extrats or different jobs is the only option?

Posted: Wed Dec 10, 2008 3:52 am
by ray.wurlod
No, you don't need 100 extracts. For 95 tables each with different metadata, 95 jobs should do it.

Posted: Wed Dec 10, 2008 8:51 pm
by babaojo
ray.wurlod wrote:No, you don't need 100 extracts. For 95 tables each with different metadata, 95 jobs should do it. ...

I think the question JITeam's was trying to ask is similar to mine; and that is:
Is there a way to parameterize the table definition in a job? Or is it possible to specify the definition as an external (operating system) object or as a DS_METADATA object rather than explicitly listing each column in the job?

Posted: Wed Dec 10, 2008 9:05 pm
by ray.wurlod
And the answer is, and remains, not in server jobs.

Parallel jobs give more flexibility, through the use of schema files, but things are always metadata driven.

Just don't expect any "T" in your "ETL".

Posted: Thu Dec 11, 2008 4:55 am
by Sainath.Srinivasan
Maybe you can concat them into a single column with comma sep. That way one job will do.