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.
SOLVED

How to add CRLF as end of record delimiter

AlteryxTrev
10 - Fireball

Hello,

 

I have a .csv file that I have turned into fixed width using the padright function and stringing everything together to be in one column, however, I need to add CRLF as an end of record delimiter. Does anyone know how I can do this?

5 REPLIES 5
IraWatt
17 - Castor
17 - Castor

Hey @AlteryxTrev,

You can change the delimiter here. By CRLF do you mean a Line Feed (\n)? in which case you can use \n

IraWatt_0-1652116610842.png

If you have any questions make sure to ask :)

HTH,

Ira

 

AlteryxTrev
10 - Fireball

@IraWatt They haved asked for the file to be delimited by "Carriage Return Line Feed". I initially tried using the delimiter of "\n", however, on rows that contained an apostraphe it would put quotes around the record (I thought this would mess with the fixed width format). My workaround was to use the delimiter of "\0" such that these double quotes were not present and everything visually lined up.

 

With the delimiter of the \0 a sample record would be output as:

 

Bob's Icecream Shop          123 Main Street    12345

 

With the delimiter of the \n a sample record would be output as:

 

"Bob's Icecream Shop          123 Main Street    12345"

 

Since the file needs to be fixed width the addition of the double quotes pushes everyone over one character. Or do these double quotes not affect anything and can in fact be part of the file?

IraWatt
17 - Castor
17 - Castor

@AlteryxTrev I don't seem get any "" when I use \n: 

IraWatt_0-1652125706786.png

IraWatt_1-1652125728562.png

 

By fixed width do you mean there is a maximum string length? Would you be able to share a screenshot of the issue or an example of the issue?

Thanks,

Ira

AlteryxTrev
10 - Fireball

Using the delimited of \n worked. Thank you!

IraWatt
17 - Castor
17 - Castor

Awesome glad it sorted it ! @AlteryxTrev 

Labels
Top Solution Authors