Database views

I’m using Snowflake DW & I have views created in production. In the quicksight, I use this views to create a dataset and build analysis. However, I’m noticing that whenever there is a change in the SF views for eg: column name changes or the alias name changes like ‘order’ changed to ‘order details’, the refresh of this dataset fails in Quicksight. Can somebody help on this?

This is the error I’m seeing: SQL compilation error: error line 1 at position 24 invalid identifier ‘xxxxx’ (column name that is changed)
Error type: 904


You have to be very careful when changing datasets as you seem to have found out. If you add new fields always add them at the end of the columns. If you change names you have two ways of dealing with it:

  1. Create a new dataset leaving the original completely alone.
    a) Make a copy of your Analysis.
    b) Change the dataset to your new dataset. What will happen is QuickSight will tell you what it sees as being wrong - when it does that, make a note of what it says and Cancel the change. You then remove those fields from the Visuals and try changing datasets again.
    c) Put back the fields you removed with the new ones.

  2. Remove the fields you intend to change from the Analysis ie. from all visuals. Change the dataset. Put the new fields onto the visuals as previously.

I’ve found this out from trial and error. There may be simpler ways but these are the only two approaches I have found that work.


Be aware that when you change the dataset and it breaks the visual it will possibly break every visual that relies on that dataset. This is why I always make a new dataset and link the visuals I’m changing to it. I then work through all the other visuals until nothing uses the dataset. At that point I delete the old dataset.


1 Like

thank you :slight_smile: Will keep in mind