This post explains how to install and configure the post plugin for exporting tables into CSVs
This plugin enables the user to define which tables will be exported into CSVs during the build finalization process.
Main uses for the plugin:
Reduce build time, for example, the user can store historical data in a CSV file and just union it with the new data on every new build (handy when pulling data from web services)
One repository cube, in cases when several cubes need to use the same data table, the user can define one cube which create the data table, all other cubes will use the CSV extracted from it
Pushing the data into other reporting systems. Some customers also use the Elasticube manager as an ETL tool, and wish transfer the data forward.
Important - build will not end until the post plugin has finished. Exporting millions of rows to CSV files may take a considerable amount of time and thus will result with a longer ElastiCube build process.
Getting the necessary files - Download the contents of this folder in Gdrive (updated version 22/02/2017).
Installing Python -
- In order to run the plugin, an installation of Python x64 is required. Find the installation's MSI in the Gdrive folder and install Python with default settings at C:\Python27
- Define Python as environment variable in Windows -
In windows search bar, search for Edit the system environment variable and click on it.
Under Advanced, click on the Environment Variables button.
In the System Variables pane look for the Path variable. Check it and click on Edit.
In the Variable value field, add ;C:\Python27 (with the semi-colon at the beginning) to the existing path (do not replace the existing path). Apply these changes.
Placing the script in the right place -
- Extract the contents of the ectools.zip into C:\Program Files\Sisense\Prism.
- Allowing the DLL to run:
Download the dll to a folder of your choosing
Right Click the DLL file, and choose Properties.
In the General pane, if a button with a Unblock caption exists, click on it (now Windows allows executing the DLL). See image below:
In C:\Program Files\Sisense\Prism, (in versions 5.8 and above, path should be C:\Program Files\Sisense\Prism\Server) create a new directory and name it Plugins.
Inside Plugins, place EC_export_dll.
- Restart the ElastiCube server (only after restart the plugin is recognized by the server).
4. Executing the plugin
- Once in ElastiCube Manager, open ElastiCube ==> Pre & Post Execution Plugins.
- Add to the post plugin section a new plugin called EC_export.
- Click on Add to configure how the plugin will behave:
<Attributes path="c:\data" csv="true" tables="brand,categorypath" pythonPath="C:\Python27\python.exe" timestamp="true"> </Attributes>
- These are the attributes we can add:
path - the directory where the TDE/CSV files will be created at. (e.g - path="C:\TDE")
row_limit (optional) - limit the number of rows imported from each table in the Elasticube. (e.g - row_limit="1000" , only 1000 rows will be imported from each table).
csv (optional) - determines if TDE files will be created, or CSV files instead. TDE files are automatically created if this attribute is not found. (e.g - csv="true", CSV files will be created).
tables (optional) - determines which tables will be imported from the ElastiCube. Tables are separated by comma. If this attribute isn't found, all the tables will be imported. (e.g - tables="brand,categorypath" , "brand" and "categorypath" tables will be the only ones imported.)
- pythonPath (optional) - direct path to Python.exe (if PATH variable is not working on your environment)
- timestamp (optional) - adds timestamp to CSV filename
5. Run build. In the build's finalizing step the plugin execution will appear in ElastiCube manager log window.
*UPDATE 05/04/2016 (plugin ver 03/18/2016 )
Updated plugin DLL, added python path and timestamp option for CSV filenames.
*UPDATE 10/03/2016 (plugin ver 10/03/2016 ) - Available in this Google Drive folder
Fixed issue for Sisense > 6.4, added one extra step - converting *.ecube to *.xml file for CSV export.
*UPDATE 22/02/2017 (plugin ver 22/02/2017 ) - Available in this Google Drive folder
Fixed issue for CSV export for ecube* files with spaces in path .
In the ElastiCube Manager console: