Modify a dashboard chart containing an obsolete column name
Hello, let's say I create a Dashboard with a table chart in Immerse using a db table and a some column names. Later, the table change one of the column names, and the dashboard throws an error because cannot render the table:
Could not render chart SQL Error: From line 1, column 269 to line 1, column 281: Column 'xxxx' not found in any table
Now, it is very trivial to modify the table chart into the dashboard correcting the column name that is changed: but the chart cannot be saved. Why that? How can a simple action like that be performed on a dashboard/chart ? I think this is a very obvious and frequent situation in developing a new solution, where table structures changes in an iterative way.
My best guess is because of caching, so immerse doesn't know that the column name is changed.
let's try to reproduce
I have a simple table like that.
then un background, someone renames the column on the underlying table
alter table flights_sk_orig rename column arr_airport_fk to arr_airport_fk_new;
when I return to the dashboard, I will get this error
if I try to edit the charts, I cannot change the name of the column because the schema for the table is cached by immerse
But leaving the dashboard and returning to the dashboard, remove the caches so the dimension can be changed, because the metadata of the table is going to be re-read so it will reflect the new column name.
If someone renames the column while you are working on the dashboard, indeed, you can't directly change the dimension because of the caching, but you can
- use a Custom Dimension that will reflect the new name
- save and leave and re-enter the dashboard
Anyway, I will report this to the FE team, asking for this enhancement .
Thank you Candido, the problem is not in refreshing the cache to reflect the new name, but in saving the chart once the correction is applied: the "Apply" button on top/right corner of the table chart, is greyed out, not selectable, although the cache is already updated and the correction applied. I'm using Omnisci free 5.7.1
I have been able to apply the changes when I used a Custom Dimension (this is the only way to correct the chart without close and re-open the dashboard), and after a save -- leave and re-open of the dashboard.
Let me check with 5.7.1, because I tried out with a developer build (while the artifact of Immerse would be the same)
- Create a new dashboard with a pie chart using a field f1 for the dimension and a count for the measure
- Saved the chart
- Renamed the f1 field to f1_new
- Refreshed the charts and got the error
- Entered in edit mode on the charts, changed the dimension to a custom dimension, and entered the new field name f1_new; the chart now works, and the apply button is enabled.
Did the previous steps from 1-4 exited and re-entered the dashboard Entered in edit mode in the chart, selected the dimension, selected the f1_new field; the apply button is enabled, and the chart works.
So I guess I am missing the question, or you are doing some steps differently; could you please share your steps?
Here my test:
1) Create a new dashboard with a table chat 1 Dimension and 1 measure. Saving the dashboard. 2) Rename the table column used in the table chart. 3) Exit and re-enter the dashboard and get the error (Apply button is disabled) 3) Correct the column name in the chart : Now Apply button is enabled.
Therefore, in this way the behavior of my dashboard is not replied, and the differerence is my dashboard use more measures.
In fact, repling the above steps with two measures with the changed column name, instead of only one, still leds to the error where the Apply button is disabled (could you just try the same)?
From my tests, the Apply button is disabled when there are more then one measure (with the cache already updated and all the measures have been corrected). But, if you remove all the measures, and add them again with the right column name, the Apply button is enabled.
This is a problem when you have a number of custom measures with some complicated formulas ( my case) where is simple to change only the column name, but is time demanding recreating the measure from scratch for each chart using that column name.
P.S: I solved downloading the dashboard, editing with sed, and reauploading.
Please sign in to leave a comment.