· Mar 7, 2018

How to Export DeepSee Pivots And Dashboards Into Files With Every Save

Hi, Community!

I'm using Git with DeepSee and when I need to do a commit to the git repo I'm exporting ALL the pivots and dashboards from the namespace. But I can forget to do that) And it can take time for a large system.

What is the way to manage automatical export of DeepSee artefacts which we are editing in UI (Cubes, Pivots, Dashboards, Pivot Variables, Term lists, Shared Measures) into files every time when I push Save button?

Discussion (5)1
Log in or sign up to continue

Hi Evgeny,

class %DeepSee.UserPortal.DashboardViewer  has a property saveAction as %ZEN.Datatype.string;

Container for the current save mode for source control.


if you combine this with standard $system.OBJ.Export()  this may do it.

SAMPLES>s sc=$system.OBJ.Export("B*.DFI","DeepSee.xml")
Exporting to XML started on 03/07/2018 09:36:32
Exporting type : Basic Dashboard Demo.dashboard.DFI
Export finished successfully.


examining the source it turns out that this parameter didn't make it to call parameters (ZENURL) nor to settings.
though I found a bunch of comments  // +DTB103 - source control
with no hint how to use it.
It might be necessary to build a private copy.
Attention on line +7 says:
/// This class should be considered as *internal*; subclassing is not supported. 

Customizing DashboardViewer may take a lot of time for testing with questionable success.

Alternate approach: Trigger your source control manually.

- create a method to export your changes. example:

#; find actual changes
   &SQL(select List(documentname) into :list 
          from  %DeepSee_Dashboard.Definition 
         where timemodified-now()+1>0 )
   set  sc=$system.OBJ.Export(list,"DeepSee.xml")

- next define an Action (in a KPI) that calls you method

- next define a Control "button" to your main Widget and add this Action to activate your source management.

I admit. It's no an automatic & generic solution as directly inside DashboardViewer  (engineering may have a hint howto use it)  
but you get the advantage to decide which dashboard you want to manage and when
since not every change in dashboards may need to go immediately to source control
And it's definitely simpler than to do it our of Studio.