Tim's avatar
Tim
Data Integration
03-26-2024
Status:
Needs Info

Refresh schema for all tables

Can we get a "refresh schema for all tables" button?

Reason:
Our tables are usually "Select * From AnalyticsSchema.ViewName". We control which fields to return by editing the view, not the Sisense table definition. When a field gets added/removed/changed, we need to refresh schema. That's fine to do manually as you're working on that datamodel+views, but we need to refresh all when:

  • We copy a datamodel to a different server. We need to refresh schema at least to double-check that the views are as expected on the new server. (If any fields have changed, then I'll need to go fix any widgets using those fields, or, more likely, update the view to include them.)
  • A view gets edited, perhaps for a different datamodel, and my datamodel hasn't been updated. 
  • I edit several views and want to refresh schema for all those Sisense tables. If I've changed used fields then I'll need to go into each table manually anyway so it doesn't matter, but I've had a case where I've removed unused fields from several views and now I need to click refresh schema on every table individually.

18 Comments

  • DRay's avatar
    DRay
    Sisense Employee

    Hello Tim,

    Can you look at the option provided by Oleksandr_K and let us know it addresses your request?

    Thank you.

  • Oleksandr_K's avatar
    Oleksandr_K
    Sisense Employee

     Hi, 

    I would like to inform that since L2024.3 there is ability to refresh scheme for all tables of data model in 1 action. Feel free to try it out through 3 dots context menu in the top right corner of the data model. 

  • Tim's avatar
    Tim
    Data Integration

    Hi DRay,

    No luck, I'm afraid.

    The post you mention describes how to change connection information, but not the table's schema. It mentions an "autoRefresh" property, but that's about whether the LiveModel re-loads data at regular intervals or on-demand, nothing to do with refresh schema.

    Sounds like the API can edit a table's schema, but there isn't a "refresh schema" endpoint. So, we could build our own tool that uses the API, but it would need to connect to the database to find column names and datatypes, and then update tables with those. That's doable, but quite a bit of work.  Found this post that discusses that: https://community.sisense.com/t5/build-analytics/refresh-the-schema-to-a-table-through-the-api/m-p/5163

  • Our data model changes pretty frequently by design, and currently the nightly cube builds do not pick up on these changes.  We have to go in and manually refresh the schema in the UI.  Originally it was fine, but now as we approach hundreds of cubes deployed, manually updating the UI is not ideal...

    Would love an option to allow the rebuild to also refresh the schema so we didn't have to continue to manually update the schemas.  Understand the risk associated with automated schema refreshes, but again this is by design for us so there would be no risk.

    Thanks.