07/11/2015

[TIBCO Spotfire] OSI PI data source template

Here is a sample connection template to add OSI PI as Data Source in the Spotfire Server:

 <!-- WARNING!!!! Old PI JDBC driver versions have .NET dependencies (RDSAWrapper.dll) - https://techsupport.osisoft.com/Troubleshooting/KB/KB00494 -->  
 <jdbc-type-settings>  
 <type-name>PI</type-name>   
 <driver>com.osisoft.jdbc.Driver</driver>   
 <!-- SQLDASServer is the OSI component we should connect to, PIServer is the name of the PI Server we want to access AS REGISTERED ON THE DAS server -->  
 <connection-url-pattern>jdbc:pisql://SQLDASServer/Data Source=PIServer;Integrated Security=SSPI</connection-url-pattern>  
 <!-- to use PI authentication instead of Windows Integrated Authentication, use this url:  
 <connection-url-pattern>jdbc:pisql://SQLDASServer/Data Source=PIServer;User ID=Username;Password=Password</connection-url-pattern>  
 -->  
 <supports-catalogs>true</supports-catalogs>  
 <supports-schemas>false</supports-schemas>  
 <supports-procedures>false</supports-procedures>  
 <use-ansii-style-outer-join>true</use-ansii-style-outer-join>  
 </jdbc-type-settings>  


NOTE: Depending on your connection needs (using Windows Integrated Authentication OR Username/Password), you need to change the connection url pattern accordingly. This means that you CANNOT leave both connection-url-pattern sections from the sample above when you add the template, BUT nonetheless, the user CAN change the connection URL to either one of those values as per his needs when he sets up the connection

Remember to read the Spotfire documentation (chapter 11.5) on how to set it up correctly!

[TIBCO Spotfire] SAP HANA data source template

Here is a sample connection template to add SAP HANA as Data Source in the Spotfire Server:

 <jdbc-type-settings>  
  <type-name>hana</type-name>  
  <driver>com.sap.db.jdbc.Driver</driver>  
  <connection-url-pattern>jdbc:sap://host:port?reconnect=true;</connection-url-pattern>  
  <ping-command>select 1 from dummy</ping-command>  
  <supports-catalogs>true</supports-catalogs>  
  <supports-schemas>true</supports-schemas>  
  <supports-procedures>true</supports-procedures>  
  <table-types>TABLE, CALC VIEW, OLAP VIEW, JOIN VIEW, HIERARCHY VIEW, VIEW</table-types>  
 </jdbc-type-settings>  


Remember to read the Spotfire documentation (chapter 11.5) on how to set it up correctly!

[TIBCO Spotfire] Excel JDBC data source template

If you want to take full advantage of the Information Designer capabilities when connecting to non-default data sources, and your analysis can't be fully developed using only Connectors and/or ADS, you might want to create your own data source template. [1]

The idea is simple: as long as you have a proper JDBC driver and can supply basic details on how to connect and handle operations, Spotfire Server allows you to add a custom connection template that end users will be able to select when creating a new Data Source. [2]

Here is a sample connection template for Excel. Note that in this case you will need the ODBC driver as well.

 <jdbc-type-settings>   
  <!-- Informative name and display-name -->   
  <type-name>ODBC-EXCEL</type-name>   
  <!-- point out the JDBC-ODBC bridge -->   
  <driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>   
  <!-- Pattern displayed to administrator when setting up the Datasource -->   
  <connection-url-pattern>jdbc:odbc:excel-odbc-source</connection-url-pattern>   
  <!-- Table types allowed for EXCEL is TABLE and SYSTEM TABLE -->   
  <table-types>TABLE, SYSTEM TABLE</table-types>   
  <!-- As ping command we will use the integer constant 1. Could really be any pseudo function. -->   
  <ping-command>SELECT 1</ping-command>   
  <connection-properties />   
  <!-- Excel does not support catalogs nor schemas -->   
  <supports-catalogs>false</supports-catalogs>   
  <supports-schemas>false</supports-schemas>   
  <!-- Found an error in excel not allowing Distinct in combination with order-by on all columns. -->   
  <!-- Choice between supporting order by and distinct in favor for distinct -->   
  <!-- to make prompt without duplicates and support distinct conditioning. -->   
  <supports-order-by>false</supports-order-by>   
  <!-- Format pattern for date, time and datetime (same as timestamp). -->   
  <date-literal-format-expression>{d '$$value$$'}</date-literal-format-expression>   
  <time-literal-format-expression>{t '$$value$$'}</time-literal-format-expression>   
  <date-time-literal-format-expression>{ts '$$value$$'}</date-time-literal-format-expression>   
  </jdbc-type-settings>   


[1] Data source template documentation - Chapter 11.5
[2] Sample guidelines to add Attivio as data source

01/11/2015

[Java Spring] Plan my Groove

Plan my Groove is a simple Java7+ application to expose a REST API to let users remotely execute Groovy scripts

It was tested on both JDK7 and JDK8 and as of now it exposes functionality to:


  • submit a job
  • list and search for jobs
  • retrieve the result of a job
  • delete a job


Where a job is a simple Groovy script. It's possible to submit multiple jobs simultaneously and also run them at the same time.

It relies heavily on the RepositoryRestResource functionality offered by the Spring framework to provide a set of RESTful services.

Find the source code at https://github.com/steghio/PlanMyGroove and for more information, read the documentation at https://github.com/steghio/PlanMyGroove/blob/master/plan_my_groove_manual.pdf