FastExport script and output delimiters
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


FastExport script and output delimiters Expand / Collapse
Author
Message
Posted 9/10/2007 11:15:18 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 9/26/2008 8:52:45 AM
Posts: 32, Visits: 46
Howdy folks,

I just had a query from a user where he is using FastExport and wants to state what delimiter the output file should use. I have had a look on-line, consulted the FastExport user guide, and it appears that you cannot specify this, like you can in FastLoad.

Is the only way to achieve this to use an AXSMOD or INMOD procedure?

Many thanks!

Andrew Livingston


Andrew C. Livingston
Teradata Certified Professional and Trainer
Post #8847
Posted 9/11/2007 8:00:10 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/11/2007 7:46:00 AM
Posts: 4, Visits: 1
Here is what I've done, just add the delimiter in my query, not elegant but it's work!

select first_col(char(0)), ';' (char(1)) etc... from my_table

Post #8853
Posted 9/11/2007 8:19:19 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 9/26/2008 8:52:45 AM
Posts: 32, Visits: 46
Zebulon,

Interestingly enough, that is exactly what one of the DBA suggested.

It is a much simpler method that writing an OUTMOD function. The only drawback I can see is that it still inserts the tab, but as long as the application you are importing to is set to recognise another delimiter it should be fine. Also, depending on the size of the txt file, you can always do a bulk find/replace.

Many thanks for your post!

Andrew


Andrew C. Livingston
Teradata Certified Professional and Trainer
Post #8854
Posted 9/20/2007 8:42:13 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 5/29/2008 1:27:36 PM
Posts: 43, Visits: 48
I typically do the following, in order to eliminate the TABs:

select CAST(first_col AS CHAR(N)) || ';' || CAST (second_col AS CHAR(N)) || etc... from my_table

where "||" is the concatenation operator.

Post #8965
Posted 9/20/2007 9:41:06 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 9/26/2008 8:52:45 AM
Posts: 32, Visits: 46
Fabio,

Excellent! I don't think I would ever have even thought of that. Looking at the code, yes, that would work a treat.

Many thanks for your suggestion!

Andrew


Andrew C. Livingston
Teradata Certified Professional and Trainer
Post #8966
Posted 8/1/2008 9:44:28 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 8/18/2008 6:19:15 AM
Posts: 29, Visits: 14
select CAST(first_col AS CHAR(N)) || ';' || CAST (second_col AS CHAR(N)) || etc... from my_table


We can also do like this

select CAST(first_col AS CHAR(N))
,cast(';' as char(1))
,CAST (second_col AS CHAR(N))
, etc...
from my_table


Sushant Paricharak
Post #12423
Posted 8/1/2008 9:48:39 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 9/26/2008 8:52:45 AM
Posts: 32, Visits: 46
Sushant!

Arguably a better approach, as this would give you absolute control over the placement not only of delimiters, but of the actual data as well. Using this FE script would help write the FastLoad script.

Thanks!

Andrew


Andrew C. Livingston
Teradata Certified Professional and Trainer
Post #12424
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 11:06am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 10 queries. Compression Disabled.