Example of ODBC using DataDirect VMtxt24.so (text file)

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dougcl
Premium Member
Premium Member
Posts: 137
Joined: Thu Jun 24, 2010 4:28 pm

Example of ODBC using DataDirect VMtxt24.so (text file)

Post by dougcl »

Hi folks, we are standardizing on the Connector Import Wizard for the purpose of importing table defs into DataStage, and I want to apply this also to sequential file sources. To that end, I am looking at the DataDirect text driver for ODBC (VMtxt24.so). Has anyone got a sample config in .odbc.ini?

Thanks,
Doug
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

I wouldn't recommend going to that extreme as you will lose a lot of flexibility (delimiters, quote characters, fixed-width files, etc.). The ODBC text file driver points to a directory and within a DSN you must specify your delimiter and quote character. So you would pretty much lock yourself into a box there.

The .odbc.ini file has a [Text] DSN sample entry in it already. To test it, copy and paste the sample DSN into a new entry with a new name in square brackets. For the Database= setting, enter a directory name (not a file). Customize the Delimiter= setting (I think it defaults to comma), and the FirstLineNames= setting (0 or 1 if the first line is column names). See how inflexible it becomes? Every other setting is pretty much good as is. Also edit the top-most header section of .odbc.ini to add your DSN name and type up there too.

When you run a job or import metadata, enter a file name when it asks for table name.
Choose a job you love, and you will never have to work a day in your life. - Confucius
dougcl
Premium Member
Premium Member
Posts: 137
Joined: Thu Jun 24, 2010 4:28 pm

Post by dougcl »

Fantastic answer. Thank you.
Post Reply