Export Empty File Question

More
2 years 9 months ago #22916 by bruce.gibbins
Question

AETLE v6.3.12.13 x64

Hi,

I was just wondering in the Export Data Package Action does "Do Not Create Empty files" mean that the header (if there is one) is also included? Meaning that if "Create Header" is CHECKED and the resulting export file has no detail rows, and the only output row is the header - does this constitute an "Empty File"?

AND

If this checkbox is enabled and an "Empty file" is generated - will the this raise an error, we can then redirect in the flow?

For our use case we need to trap that there were no detail rows generated - but there may still be a header. We would still call this an "empty file" and wish to abort the rest of the package. 

Perhaps either way, it would be good for the documentation to stipulate what would happen in this situation.

 

Thanks in advance.

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

More
2 years 9 months ago - 2 years 9 months ago #22917 by Peter.Jonson
Hi Bruce.

I had a look at the source.

"Create header" has no effect on "Do not create empty files" checkbox
EG when the source has zero records the file is not created.

In your particular case, the best approach would be to add the "Abort on empty file" checkbox

I think at some stage we would need to review how we work with parameters variables ETC.
Having too many parameters is confusing for the users.

I have another question for you.
Have you ever worked with semistructured Excel files?
For example with multiple tables per sheet.
If so what was your approach?
 

Peter Jonson
ETL Developer
Last edit: 2 years 9 months ago by Peter.Jonson.

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

More
2 years 9 months ago #22918 by admin
Replied by admin on topic Export Empty File Question
Perhaps we should call it: 

"Abort when no data was found"

I think it more clear

Mike
ETL Architect

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

More
2 years 9 months ago #22919 by bruce.gibbins
Thanks Peter. That was how I thought it would work. That is, if there is nothing to output from the input then don't create the export file at all and abort. That way the next step in the workflow and take appropriate action.

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

More
2 years 9 months ago #22920 by bruce.gibbins
Agree. (for me at least it would make it a lot clearer)

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

More
2 years 9 months ago #22921 by bruce.gibbins
Hi Peter. Can't say I have.

But if a human can touch the file (or an automation script. eg. Python with appropriate libraries) then I would set up separate named ranges for each area with a separate reader for each. If I had to go that far and build an external script to do that step, then I would possibly split the sheet into separate workbooks (.xlsx) files at the same time and read them as a batch with a different transformer per each file.

Reading an excel workbook with parsing etc is very straight forward with the right libraries in something like Python - without that many lines of code. I would also possibly break the whole workflow up into separate packages. The first to receipt the initial file and split or put the names ranges in and then drop the revised file(s) off into a monitored folder and let another package process from there. That way, I have focused elements doing specific tasks that I can plug and play of I needed to.

It would all depend on how automated I needed to make it and what the downstream processing needed to be. But I am not averse to have small purpose-built scripts to massage the inbound file into more easily consumable things that then makes it clearer in AETL.

Does that help?
cheers
 
The following user(s) said Thank You: Peter.Jonson

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