Alteryx Designer Desktop Discussions

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

From a given list of column headers, check if the other files have those headers or not.

ShounakGhosh
6 - Meteoroid

I have 4 transaction files, and I have another file with the list of Column Headers.

 

I just need to check if all the Column headers that are mentioned in the file, exist in the Transaction Files. Like a check list.

 

I was thinking of creating a report or just updating the current Column Header file with the updated data of which files the headers are missing out from.

 

How do I approach this? 

 

Thank You for your help 🙂

9 REPLIES 9
atcodedog05
22 - Nova
22 - Nova

Hi @ShounakGhosh 

 

You can use field info tool to get column header and then you can use find & replace tool to do vlookup to match with the original column list.

 

https://help.alteryx.com/20212/designer/field-info-tool

 

If you can provide sample data files we can help you with an example.

 

Hope this helps : )

ShounakGhosh
6 - Meteoroid

thank you, I am going thru the Field info Tool.

 

These are the column names:

Column Names
A
B
C
D
E
F
G
H

 

Sample Transaction Files

1. 

ABCDEFG
1011001
1011101
0110001
1100100
1100010

 

File 2:

ABDEG
10110
10111
01100
11001
11000

 

File 3:

BDEFH
10110
10111
01100
11001
11000

 

So basically as you can see for example, Column Name: H doesnt exist in File 1 and 2, so in the report or the result it generated as The list of files that doesnt have H as a Column Header. 

Jean-Balteryx
16 - Nebula
16 - Nebula

You want to generate a report for each header telling which file doesn't contain it ?

ShounakGhosh
6 - Meteoroid

Report is just a preference, but it can be produced in just another file stating file names that the columns are missing. 

 

Like 

Column NameFile Name
HFile 2, File 3

 

Thank you.

Jean-Balteryx
16 - Nebula
16 - Nebula

Can you provide sample files as Excel or csv ?

atcodedog05
22 - Nova
22 - Nova

Hi @ShounakGhosh 

 

You can do something like this.

 

Workflow:

atcodedog05_0-1626958750468.png

 

1. Use field info to get column names of files.

2. Use formula tool to tag the columns to their file name.

3. Using multi-join tool to join on column names.

4. Using formula tool to create consolidated list of file names.

5. Using select tool to keep only required column.

 

Hope this helps : )

 

ShounakGhosh
6 - Meteoroid

Just made some sample files. 

atcodedog05
22 - Nova
22 - Nova

Hi @ShounakGhosh

 

You can check the above solution and let me if that works for you 🙂.

ShounakGhosh
6 - Meteoroid

Thank you, it definitely runs.

 

Im trying to use the same to read transaction files from a directory now. 

Labels