Reading data from an empty table in snowflake
How can we read an empty table from Snowflake - Select snap?
While I use Snowflake - Select
snap and the table is empty, I don’t see any output preview so I decided to write it down to a flat file and the file generated was empty as well. How can I ensure that at least table columns are printed on the flat file as well as the same can be seen on the output preview of the snap too. I’m fine if the data beneath it displays as null.
I’ve nothing to do with the data but it is important for me to record the counts; as this is the first snap and it has no data, the other snaps after this would execute but nothing would happen which is kind of weird to me.
Any help is highly appreciated.
Best Regards,
Darsh
The whole point of reading data from an empty table in
snowflake - select snap
was to record the counts, as there is no easier way to do that when the table is empty, we can leverage thesnowflake - execute snap
and modify the query to get the counts ONLY.Return data type is an integer for me which I don’t have any concern with and, if need be, that can be converted to a String. Thus, the easiest solution is to use a
Snowflake - Execute
snap instead of a Snowflake - Select and modify the query.P.S.: All snowflake snaps trying to fetch data in an empty table wouldn’r return anything. Not even Null or 0.
Closing this thread now. Thank you.