How to get Character String Delimiter with TPT or FastExport

Tools
Enthusiast

How to get Character String Delimiter with TPT or FastExport

Hello.  I need to export large numbers of tables to CSV files for customer deliverables.  I am working under Teradata 13.10.  For VARCHAR fields, I need to include a Character String delimiter (double-quote) in the CSV.   I have created a tbuild/TPT export script as described in Example 10 of the TPT User Guide, but cant find a way to get the string delimiter.  Also looked over the FastExport manual, and did not see any way to do this.  But I see that the FastExport option in Teradata Studio Express allows a string delimiter to be specified, so how does it do it?     Is it part of the FASTEXPORT_OUTMOD_ADAPTER of TPT (Example 12)?   If so, how do I actually turn on inclusion of the string delmiter?  Is it one of the attributes ?   Any ideas or info would be very much appreciated.

Thanks much!

8 REPLIES
Teradata Employee

Re: How to get Character String Delimiter with TPT or FastExport

FastExport does not support the writing of delimtied data to files.

TPT can support it if you use the Selector operator for extracting out of Teradata. Using the Data Connector operator as the file writer, you can indicate the delimiter of choice through the TextDelimiter attribute.

-- SteveF
Enthusiast

Re: How to get Character String Delimiter with TPT or FastExport

Thanks.  But what I need is a secondary delimiter, just to put double-quotes around data that are strings.  Since I want to produce a CSV file as my output, the TextDelimiter attribute is already set to comma.

VARCHAR TextDelimiter = ','

What I need is the capability for a Character string delimiter.  This feature is given in the FastExport wizard of the Teradata Studio Express GUI.  But I dont want to use the GUI, I want to use TPT scripts, for automation.  So, for example, my desired output would look like the following:

EMP#,First Name,Last Name,DeptNo

1234,"MY FIRST NAME","MY LAST NAME",9999

Any ideas would be appreciated.

Teradata Employee

Re: How to get Character String Delimiter with TPT or FastExport

In TPT 14.0 we added "quoted delimited data support" which will allow for character strings to be enclosed in quotes. The opening and closing quote marks can be provided by the user, and they can be different. The default is the double-quote character.

Please refer to the TPT 14.0 documentation for details.

-- SteveF
Enthusiast

Re: How to get Character String Delimiter with TPT or FastExport

Thanks for the info on 14.0.  Currently our TD engine is 13.10 and all of the client tools are 13.10.  Is it possible to run 14.0 client tools (ie. TPT) on a 13.10 engine?  If so, maybe we can just obtain 14.0 client tools.

If not, I was thinking of a possible outmod solution.  The outmod would have to know the data types of each field, and if character type, it would add the double-quotes.  But the outmod examples I have seen dont process on a field-by-field basis.  Is it possible to pass type information into an outmod?  Any examples of that would be greatly appreciated.

Thanks!

Teradata Employee

Re: How to get Character String Delimiter with TPT or FastExport

Yes, you can run 14.0 TPT against TD 13.10.

Field information cannot be passed to an OUTMOD. An OUTMOD must be written customized for that particular job (it must know the data layout).

-- SteveF
Enthusiast

Re: How to get Character String Delimiter with TPT or FastExport

Thanks alot.  I will try to see if we can purchase the 14.0 client tools.

Enthusiast

Re: How to get Character String Delimiter with TPT or FastExport

Pretty shocking really, obviously the one thing most users want from Teradata is the ability to export tables quickly and easily to a delimited file, for use in other applications.

I don't see why this simple feature can't be included in FASTEXPORT. Without it, FASTEXPORT is largely useless.

I get that you want to sell people TPT so won't update any of the old tools, but haven't we already paid enough?

Teradata Employee

Re: How to get Character String Delimiter with TPT or FastExport

A TPT license does not cost any extra if you have a FastLoad/FastExport/MultiLoad license.

TPT is the load/unload tool going forward and thus it is the tool that will receive the new features and enhancements.

(If we added new features to FastExport, there would be no need for anyone to move to TPT.)

-- SteveF