SpagoBI report deployment via SDK

Below are my thoughts on approach, capabilities, and limitations on doing automated deployments of SpagoBI reports through the SDK. I welcome your comments and suggestions. If you’re doing something differently, please share.

As I now have 12 SpagoBI instances, keeping the reports in Sync on all environments has become a challenge. As a proof of concept, I’ve created a groovy script that can import an Exported-SpagoBI document to a list of SpagoBI servers. (Happy to share that if anyone is interested).

    Question to the world:

  • Is there an SDK call to “exportDocuments”, similar to the “importDocuments” method?
  • What does Engineering Group recommend as a best practice for 1) report revision control and 2) automatic deployment of reports to multiple SpagoBI servers?

SpagoBI report deployment via SDK

  1. Check out the report template from revision control into your SpagoBI project (in SpagoBI Studio)
  2. Make the necessary revisions and test them locally
  3. Deploy those revisions (via SpagoBI Studio) into Dev3
  4. Test the report revisions in SpagoBI
  5. Via SpagoBI Server web UI
  6. Via Web-site portals (if appropriate)
  7. In SpagoBI Server web UI
  8. Export screen
  9. Select the report to export
  10. Name the file for the export
  11. TODO: File Naming convention
  12. Export the report
  13. download the resulting zip file
  14. TODO: Add details – Capture the ZIP file and put it in Artifactory as a deliverable

When ready to deploy to the next SpagoBI Server

  1. TODO: Add details – Run the automatic deployment program, (via pipeline or manual run)
  2. Specify SpagoBI Server
  3. Specify the Exported zip file and location (from Artifactory)
  4. Specify the Associations map
  5. TODO: Add detail on Associations map and editing / creating
  6. TODO: Add detail – Capture the log
  7. Test the report revisions in SpagoBI instance
  8. Via SpagoBI Server web UI
  9. Via Web-site portals (if appropriate)
    SpagoBI API call

  • importDocuments :


  1. Associations file can be used to provide exact mapping between Source and Target system. This takes care of all but one prompted value
  2. “Overwrite” can be specified on the API call. This should be true in the cases I can envision..


  1. LOVs used by the report will be updated in the Target SpagoBI Instance.
  2. Be sure that the LOVs, as they are in the source tenant, are what you want to move forward.
  3. The Deployment zip does not contain a mapping of secondary Functional Hierarchy folders where the report should be accessible.
  4. Consequences:
  5. If you delete the report in the target system, before import, you’ll need to manually add the hierarchy folder permissions back in the Target SpagoBI web UI
  6. If you deploy report for the first time in the target system, you’ll need to to manually add the hierarchy folder permissions back in the Target SpagoBI web UI


  • telmo

    I David
    I have a similar question in my hands.
    However, my question is: All your instances are in the same SpaboBI Server version?

    • dbh

      I’m using SpagoBI 5.0. I created a software utility that allows deployment of Document (a zip file exported from SpagoBI Server) to multiple instances of SpagoBI servers, in one shot. However, I have not tried exporting and importing across different versions of SpagoBI

      Please see the github project SpagoBIInteg and give it a try. I’ll try to answer questions and I’m open to your contributions.

    • dbh

      So far, yes they spagobi instances are all the same version. I hope to try 5.0 to 5.1 or 5.2, as I’m interesting in running SpagoBI in docker.

  • Raj

    Hi ,

    How can I run above SpagoBIInteg . Could you please give step by step example to run above code successfully.

    You given below information but I am not able to understand clearly.Could you please explain detail

    For example, the below command will deploy a report document (extracted from SpagoBI as a zip file) to other SpagoBI environments, eliminating the need to log into SpagoBI Web user-interface in carefully perform a series of import steps.

    DeploySpagoBIReport dev2,dev3,qa1


    • dbh


      In DeploySpagoBIReport.jar, you’ll probably want to change the baseDir (base directory) path..
      Then, you’ll need to build the fat-jar, using maven package. You may have to fix a dependency which has changed since I worked on the code originally.

      Place a copy of the files associations and config.json in that directory. Customer config.json to describe your environments.

      Then, you can run the Deployment program via something like this:

      java -jar SpagoBIInteg-YOUR-FAT-JAR-NAME.jar com.psionline.spagobi.DeploySpagoBIReport dev2,dev3,qa1


Leave a Reply

Your email address will not be published.