Forum Discussion

darshthakkar's avatar
darshthakkar
Valued Contributor
3 years ago
Solved

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 fil...
  • darshthakkar's avatar
    3 years ago

    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 the snowflake - 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.