This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hello,
Pretty self-explanatory, based on the title.
I have a workflow that queries from a database (In-Database tool), processes the data, and then uploads it via Amazon S3 Upload tool. The client expects a file, whether there is data processed or not. Problem is, Alteryx's default is usually not to output anything, when there is no data. Is there a simple way around this?
Thank you!
Solved! Go to Solution.
You could add a null data row with text input tool+union tool to the dataset. I think that it would solve your issue.
Hey @RonGatmaitan,
Interesting question, when I try this even with zero records a file is still wrote to S3:
Hi @Felipe_Ribeir0, will look into this. :)
Hi @IraWatt, even if it said 0 records were written? Did you check the AWS Bucket if I file was written?
Hi @Felipe_Ribeir0, not sure if I can add a null data row. Should only be uploading the headers. Is there an if-then tool?
@RonGatmaitan yeah you can see the S3 input tool below. My DB just outputted one header with no records, and it wrote to S3. When i input the data, I just get the header with no records.
Hi @IraWatt,
Oh, yes, it did work!
Here where, I realized, the problem was.
The parameter being passed as filename to the macro which contains the AWS Upload is also dependent on the script. The script doesn't return a value, the workflow doesn't pass a parameter.
Here's what I did, instead.
This way, even if the query doesn't return a value, the parameter still generates a file name.
Thank you very much for your valuable insight! Accepting your answer as solution.