Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

outut to txt file with one or more delimiter

Haokun
8 - Asteroid

hi

 

I want to output the source data into @delimitered txt file.

 

below is the source data

 

CountryAmountCodeMethodFile
SG11.50ABCDISDVD
SG12.00ABCDISDVD

 

output should be looking at below in txt file format

SG@11.50@@@@ABCD@@@IS@DVD@@@@@@@
SG@12.00@@@@ABCD@@@IS@DVD@@@@@@@

 

Note, there are multiple columns need to insert @ in the beginning of the string and end of string, so it is not very inefficient to add @ to each column and metadata is quite different from column to column. 

 

I try to use formula to handle those special columns like code and file, "@@@"+[Code]+"@@@", but when i output to txt, I can either choose @ as delimiter and quote output field auto, which my output will be looking something below. which i dont want to have this double quote.

SG@11.50@@"@@@ABCD@@@IS@DVD@"@@@@@@@
SG@12.00@@"@@@ABCD@@@IS@DVD@"@@@@@@@

 

I can't choose @ as delimiter and quote output filed as never, it will give error.

10 REPLIES 10
Clifford_Coon
11 - Bolide

Hi @Haokun ,

 

Can you give some detail on how you identify the "Special" columns and how many delimiters they requie?

geraldo
13 - Pulsar

@Haokun 

 

Have you changed this option?

 

geraldo_0-1683126874289.png

 

Haokun
8 - Asteroid

@geraldo I can't choose @ as delimiter and quote output filed as never, it will give error.

Haokun
8 - Asteroid

@Clifford_Coon special columns are those need to add more than 1 @ either in front or at the end of string

Clifford_Coon
11 - Bolide

@Haokun   - Is it just a static listing or identified at runtime?

geraldo
13 - Pulsar

@Haokun 

 

sorry, maybe x didn't understand your problem

 

geraldo_0-1683129396702.png

 

Haokun
8 - Asteroid

@geraldo 

 

my questions,

1. how to remove the double quote in the txt output, the delimiter is @.

2, the most inefficient way is to manually add @ to each column, is there a better way to handle? i am thinking use multi-field but there are 2 problems, some of the columns are in numeric, some columns need to add more than one @.   

 

below is the error screenshot.

Haokun_0-1683164061831.png

 

Haokun
8 - Asteroid

the listing is quite static. there is no changes to the headers at the moment just the underlying data will be changed.

geraldo
13 - Pulsar

@Haokun 

 

I didn't understand the criteria for filling in the @ before, after and before after fields.
where or why it is necessary to fill in @ and the delimiter to be @.

 

has the Mult-Field Formula tool that makes substitutions in several fields of the same format through the reserved word [_CurrentField_]

 

example:

geraldo_0-1683167399851.png

 

Labels
Top Solution Authors