Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Summary

With release 2.6.2, Squirro supports exporting a complete project including all the definitions (Smartfilters, dashboards, custom assets etc) in a compressed file format. This enables you to take a snapshot of your Squirro project, package it up and distribute it to easily recreate the original Squirro project.

Exporting a project

A Squirro project can be exported using the Export Project studio plugin situated under the settings section of the Squirro Admin interface as shown below.

You can select/deselect different Squirro objects that you want to export and then finally hit the Export button at the bottom of the page. It will give you a download prompt asking you to save the exported project on your local filesystem.

Furthermore, the Export Project studio plugin is backed by the Squirro server side APIs. So, alternatively, one can also use the SquirroClient to get an export of the project. Make sure to set the write_to_disk flag to True. This will ensure that the exported project will be directly written on your local file system in the current folder. Furthermore, which Squirro objects to export can be controlled by setting the corresponding boolean flags to True or False.

squirro_client.export_project(project_id=PROJECT_ID, write_to_disk=True)

Project Template

Although an exported project from above can be directly imported into a Squirro project, it is advisable to create a project template from the exported project for a more richer import experience. Having a project template allows you to decorate your exported project with extra meta-data like name of the project, a short description about the project, an image file for a visual representation of the project and most importantly a guide file for enriching the project with a guided import walk through for onboarding a new user trying your project out.

Creating a project template

A project template from an exported project can be created using a command line tool that is available as part of the standard Squirro Toolbox. The tool can be invoked as shown below

$> squirro_project_template --title "InvestmentBanking"  --description "Project for investment banking" --thumbnail-file /tmp/template_image.jpg --guide-file /tmp/test.js --sqproj-file /tmp/test.sqproj

Where

  • title – is the name of your project template.
  • description - is a short description describing your project.
  • thumbnail_file - is the location to an image file visually describing your project.
  • guide_file - is the location of your javascript guide file describing the import walkthrough.
  • sqproj-file - is the location of the exported project file which was downloaded using the Export Project studio plugin.

This will create a folder in your current directory containing all the assets necessary to describe a project template.

Uploading a project template

Once created, a project template can be uploaded to a Squirro server so that it is available for use by any other user on that server. The process is quite similar to how you would have uploaded a dataloader plugin, or a pipelet, or a custom widget which is available for use to all the users. You can upload a project template created in the step above using the squirro_asset utility. This utility is also part of our Squirro toolbox.

$> squirro_asset -vv project_template upload -t $TOKEN  -c $SQUIRRO_CLUSTER -f InvestmentBanking


Once uploaded, your project template would start showing up in the Create Project dialog box so that other users can just bootstrap their project with your pre-package Project Template. The titledescription, and other attributes that were supplied in the creation of the project template folder are used for the display purposes in the Create Project dialog box. So be sure to use informative title, description and image.

Importing a project

Squirro allows you to either import the sqproj file which was exported from the Export Project studio plugin or the Squirro Project Template which is a more enriched version of the sqproj file. Although, we recommend to use the Squirro Project Templates to distribute your projects around, the ability to directly import the exported sqproj file enables you to do one-off imports for your own experimentation without polluting the Create Project dialog box

Importing from an exported project

A project can be imported directly from a sqproj file by simply clicking on the Import Project button in the Create Project dialog box and uploading the sqproj file that was placed on your filesystem by the Export Project studio plugin.

Then give your project a name and click on the Create Project button at the bottom of the dialog.

Importing from an already uploaded project template

You can also choose to import from an already existing Project Template on the Squirro server. For that, you simply select the project template that you want to choose from the Create Project dialog box, give your project a name and click on the Create Project button at the bottom of the page.

  • No labels