Thursday, September 25, 2014

Process to setup SAP Lumira Data Access Extensions

This is beginner's guide to Lumira Data Access Extensions

What are Data Access Extensions (DAE) for SAP’s Lumira?

Simply they are self-contained console applications that present Lumira data from data sources that Lumira currently cannot connect to. Though Lumira can connect to many different databases right-out-of-the-box there are other data sources out there that it currently does not natively connect to. For example you may have a proprietary in-house database, open source system, online service, plain text data or something unique that it would be useful to have Lumira connect to.

What does the DAE have to do?
As mentioned it is a console application. Unlike other types of data connectors or plug-ins they are not loaded and kept in session. They are executed each and every time they are needed. The DAE at minimum has to:
  1. Return a block of data that describes the format of the data being returned.
  2. Append to the data format block any information or variables that have to be persisted if needed. Remember DAE are executed every time, so variables, like a username or password would be lost between data refreshes. This block is used by Lumira to send these variables back to the DAE so user does not need to be prompted for this information again.
  3. Return a block of CSV data.
  4. Respect the command line parameters sent to it by Lumira such as the action required and max row count requested.

How to enable Lumira to make use of DAE:

Lumira will not make use of DAE, you will need to enable this functionality by:

  1. In C:\Program Files\SAP Lumira\Desktop, open the SAPLumira.ini file.
  2. Add the following entries to this file and save it:

    -Dhilo.externalds.folder=C:\Program Files\SAP Lumira\Desktop\daextensions
    -Dactivate.externaldatasource.ds=true
  3. Create the folder "C:\Program Files\SAP Lumira\Desktop\daextensions"

The next time Lumira is opened it will search the daextensions directory for subdirectories containing DAE executables and present them to you under the item External Datasource in the New Dataset dialog.

 Parameters that Lumira sends to the DAE?

  • mode : This will either be preview, refresh or edit. Preview is used when first obtaining the data, before designing visualizations. Refresh is for
    obtaining the full dataset and edit is when the user selects Edit from the Data menu.
  • size : The max number of rows to return back. Typically this is used for the preview and edit. A value of 0 means to return the whole data set.
  • locale : The language locale being used.
  • params : A semicolon delimited line that contains name value pairs describing the format of the CSV data and any other data you wish Lumira to persist. For example:
csv_separator=,;csv_first_row_has_column_names=true;csv_trim=true;row_limit=0;csv_encoding=windows-1252;csv_date_format=yyyy-m-d;csv_number_grouping=,;csv_number_decimal=.;


Actual work flow

The first and most important workflow is adding a new dataset. This happens when the user creates a new document or adds a data set to an open document.

workflow 1.PNG
When the user selects to refresh from the data menu Lumira starts on step 3 in the above diagram. When the user selects Edit from the data menu the
process is the same as the above diagram except that the mode in step 1 is now edit, and the params are populated:

workflow 2.PNG
  Note: Process flow diagrams are not my strong suite

The DAE is only open until it is finished returning the data to Lumira, simply if your DAE does not stop executing, Lumira will wait until it deems a database time out has occurred and the connection will fail. This means that best practices would be to open your connection be it to a server or a stream, retrieve the data, output the data and close your connections and then your application.


CreatingData Access Extension For Lumira


Please follow the link below

http://scn.sap.com/community/lumira/blog/2014/09/12/creating-my-first-data-access-extension-for-lumira

No comments:

Post a Comment