Query: Column Count

More
3 years 7 months ago #22125 by bruce.gibbins
Hi

We have had a scenario where an inbound CSV file is basically the same shape as expected however, they have inserted blank columns, thus offsetting required data. There are ways we can visually determine that the file is malformed, but I was wondering if there was already a method in AETL that we could use a validator to check column count (metadata?).

this won't always work because do on occasion receive CSV files that have variable number of columns per row (or set of rows). Therefore, the ideal situation would be to explicitly "Read" say row x and determine if that has y columns or perhaps a known text value or is not blank. This would be challenging to make available across file formats. But thought I might raise the question in case you have come across it before.

thanks in advance

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #22126 by admin
Replied by admin on topic Query: Column Count
This is one of those problems where the ideal solution does not exist.

One thing you can try is to use flags

If the field is empty set it to one otherwise set it to zero.
Then you add all flags together and accumulate value using the running total.
If the resulting number is above the threshold there is something wrong wit the data.

Attachment transformation.png not found


Mike
ETL Architect
Attachments:
The following user(s) said Thank You: bruce.gibbins

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #22128 by bruce.gibbins
Replied by bruce.gibbins on topic Query: Column Count
Thanks for that. Definitely hadn't considered that but will take a look and see if I can mesh something out.

Thanks again

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save