Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Need Header Row Before Column Names

asq
6 - Meteoroid

Version: Alteryx Version 9.5

 

Attached is an example of what I'm working with

 

The data in my workflow will be pulled using a database connection and database output tools

 

I need the report to display the header row first, then column names below that, followed by the corresponding data

 

 

What is the best way for me to make this happen?

 

For a visual, here is what they want the output to look like

 

Expected Output

 

When I produce the file however, the column header names are above the Header Record and I need the Header row to always be at the top.

 

Please let me know if you have questions.

 

Thanks

10 REPLIES 10
jack_morgan
9 - Comet

Hey asq,

Lots of different ways to do this but a simple table tool should suffice. Try the attached file and let me know id you ahve any questions.

asq
6 - Meteoroid

This method doesn't seem to be compatible with a .csv output format. What are some other options. Sorry that I forgot to mention output type.

 

Thanks for your help!

jack_morgan
9 - Comet

Here you go!

 

Works as a CSV, I did test that. Setup to go to temp/output.csv for now.

JPLynch
5 - Atom

@jack_morgan wrote:

Here you go!

 

Works as a CSV, I did test that. Setup to go to temp/output.csv for now.


Great tip, much appreciated. How can I remove trailing pipes in the header row when creating a pipe delimited .csv?

Changing delimiter to "|" in output data in  Example.yxmd


HeaderRecord|123456|||
Avin1618
5 - Atom

hello Morgan,

i am new to alteryx and i have seen your example provided below when i was searching for a solution to one of our requirement. Thank you.

i need help to understand how the middle flow works (field info--> formula-->cross tab ) works.

we have an XML file as an input, and we are trying to translate it to a CSV file, with the tags as header and the corresponding values below.

however we need to add another header line on top of this. like Header 1 (4 fields, can be read from a CSV or a txt file), 2nd column has the actual headers from the XML and followed by the corresponding data from the XML. 

1. can this work without creating a Record ID?

2. not clear on how the middle flow logic works , i've tried changing but the values coming out of that flow are not changing

 

regards

Avinash

 

hamster001
6 - Meteoroid

Perfect. i forgot to untick the "First Row Contains Field Names" but could easily apply this workflow to my work. Thank you! so helpful

amazz24
7 - Meteor

Hello, I tried to use this solution while also using the 'Take File/Table Name From Field' function to generate 100+ workbooks based on a criteria in my dataset and found that the information above the field names only appears in the first workbook.  Is there a way to have this header information show in all outputs?

 

I am writing the output to a .CSV file and also found that if I deselect "First Row Contains Field Names" option, then field names will only appear on row 1 of the first file that is generated, above the header information that I added.  All other files that are generated from the output tool do not contain the header information or field names - is there a way to fix this?

 

Thanks!

markcawood
5 - Atom

Did you get an answer on this?  I've got the same issue whereby my file header has a different number of fields to data being sent. 

 

I could manually concatenate the fields, but I've got up to 80 fields so i'd rather have a more automated solution. 

 

Issue - trailing pipes on header record:

 

HeaderRecord|123456|||

ppatane
8 - Asteroid

How can I get the column headers to also output delimited?

Labels