Warning on Warehouse Views w/ Input Tables

Hey all, just something I ran into recently that I thought others should know.

Input tables are great and the ability to persist the data back into the database is fantastic. What I did find though is how someone editing the workbook can inadvertently delete that data.

The scenario is that I have a workbook with a linked input table which multiple users can edit and fill in their respective data. That data is put back into Snowflake via a warehouse view which I reference elsewhere for analytics. To make it easier I put some page control filters on that input table so users could more quickly find/edit the data that is relevant to their area (i.e. if I’m the sales manager for a specific region, I don’t need to go fish through the other regions).

While testing some changes I set one of those filter categories and published the workbook to test edit some data (I have the table set to only allow data entry while published). When I did so, it seems to delete the entered data from the view for anything not matching the published filter criteria, even though this can be changed.

What’s stranger is that if I remove the filter criteria it still shows the values in the workbook as if they’re there, but they’re no longer in the materialized view. I had to copy the values out to Excel. Clear them to mark the records as “dirty” and save the data. Then copy the values back in from Excel to get them to write back to the database.

Admittedly the best practice I think would not be to pre-set filters for users, but I was really just testing something really quickly and planned to clear that filter before I was finished. My best guideline is that if you’re editing something with an input table and going to publish, clear all your filters first!

1 Like

Added Input-Tables

@aingold Thank you so much for sharing your knowledge! :clap:
The community appreciated it. :pray: