Ensure/Verify if Header Column must exist

Hellos,

In data below , I want to verify if the column DS and TS must exists.

I thought of doing transpose first which will move all headers to row 1, then checking on row 1 with filter , or any other way?

Template Task Name TS DS Trigger FMS# Duration FMS Task Type
Provide contact list to EA 01 1 0.001 FMS Task
Add contact Number to Director Phone 02 01 2 FMS Task
Fill the onboarding Form 03 01 3.54 FMS Task

Well here is one way

The Remove Cols transform is here only to simulate missing column, otherwise it is not needed.

Sample transform is used to get the very first row as no need to go through all the data.

Transform file.
VerifyHeaderColumnExistence.transform (3.6 KB)

2 Likes

Iā€™m not sure that I can improve on the above.

The plan is to add a Verify feature that can generate an error or warning when certain criteria are not met (e.g. missing column, column expected to be dates has a non-date value etc). It is high on the wishlist for v2 and I hope to get working on it soon.

the logic is great, but if the two columns are not populated in all rows, it fails.

Depending on the needs a fill in both directions (up and down) might be required.

VerifyHeaderColumnExistence 2.transform (5.4 KB)

As per my understanding, @prashant is looking to know if either or both of TS and DS column is missing. Not that they have data or not.

That is why I pick one row, which is sufficient to test if the columns are present or not.

1 Like

You are right precisely !

Would be epic helpful

Thank you for this , will evaluate :smiley:

1 Like