# Without data, file is not generated in S3

**URL:** <https://matillioncommunity.discourse.group/t/without-data-file-is-not-generated-in-s3/1930>\
**Category:** Matillion ETL\
**Created:** [November 2, 2022, 5:59am UTC](https://matillioncommunity.discourse.group/t/without-data-file-is-not-generated-in-s3/1930 "2022-11-02T05:59:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![suresh7433.ece](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/suresh7433.ece/32/46_2.png) [@suresh7433.ece](https://matillioncommunity.discourse.group/u/suresh7433.ece)\
**Post date:** [November 2, 2022, 5:59am UTC](https://matillioncommunity.discourse.group/t/without-data-file-is-not-generated-in-s3/1930/1 "2022-11-02T05:59:50Z")

</div>

My request is that a file be generated regardless of the data. I tried several different options in S3 stage, but nothing worked.

---

<div class="post-metadata">

**Author:** ![Adwait\_K](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Adwait\_K](https://matillioncommunity.discourse.group/u/Adwait_K)\
**Post date:** [November 2, 2022, 6:42pm UTC](https://matillioncommunity.discourse.group/t/without-data-file-is-not-generated-in-s3/1930/2 "2022-11-02T18:42:50Z")

</div>

Ah, yes, have encountered this quite a few times. Is there any way for you check if there is no data? If not, can you just dump out a file with column headers or something?

---

<div class="post-metadata">

**Author:** ![suresh7433.ece](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/suresh7433.ece/32/46_2.png) [@suresh7433.ece](https://matillioncommunity.discourse.group/u/suresh7433.ece)\
**Post date:** [November 15, 2022, 3:32pm UTC](https://matillioncommunity.discourse.group/t/without-data-file-is-not-generated-in-s3/1930/3 "2022-11-15T15:32:02Z")

</div>

Sorry for the late reply.. my file which is getting created daily will not have data sometimes and when the data is not there, file is not creating. I just need the file created with columns.

---

<div class="post-metadata">

**Author:** ![Adwait\_K](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Adwait\_K](https://matillioncommunity.discourse.group/u/Adwait_K)\
**Post date:** [November 15, 2022, 4:02pm UTC](https://matillioncommunity.discourse.group/t/without-data-file-is-not-generated-in-s3/1930/4 "2022-11-15T16:02:21Z")

</div>

You can use the query to scalar component to run a query for the count or records and store it into a variable. Then check if the variable is \> 0, if yes, then dump out a file. If not, then just create output a file with column headers. You can store the column headers in a variable or in another table.

&nbsp;

Just some ideas...haven't really thought through it.
