Show TOC

Procedure documentationCreating SAP MII Smart Data Integration (SDI) Adapter

Prerequisites

You have installed SAP HANA Studio and configured data provisioning (DP) agent. For more information, see the relevant topics at http://help.sap.com/hana_options_eimInformation published on SAP site.

Procedure

Configuring SAP MII SDI Adpater
  1. Choose MII SDI Adapter.zip from Start of the navigation path Content Management Next navigation step Tools and Archives End of the navigation path.

  2. Extract MII_SDI_Adapter_1.0.0.jar file to your local system and deploy the same using SAP HANA Data Provisioning Configuration Tool.

  3. Create a new remote resource in SAP HANA Studio. For more details, see the section Creating a New Remote Source in SAP HANA Studio.

Creating a New Remote Source in SAP HANA Studio
  1. Open SAP HANA Studio and expand the HANA system node.

  2. Choose New Remote Source from Start of the navigation path Provisioning Next navigation step Remote Sources End of the navigation path.

  3. Enter the following:

    • Source Name: Enter any name

    • Adapter Name: Choose MII_SDI_Adapter

    • Source Location: Choose the source agent by which the adapter has been deployed

    • Server Name: Enter MII server name

    • Port: Enter MII port

    • SSL Mode: Choose Enabled or Disabled

    • String Column Length: The column length of all the string columns needs to be specified as this information is not maintained in MII

    • User name and Password: Enter MII server credentials and password

  4. Choose Save the Editor icon

    A success message appears.

  5. To view all the MII projects, expand the above created remote source.

  6. Choose any PCo Query, right click and choose Add as Virtual Table.

  7. Select the schema and choose Create.

    The virtual tables are added to the selected schema.

  8. To display the virtual tables, go to Catalog and expand Tables node under the created schema.

You can provide WHERE clause to the SQL query to extract the columns that match the selected criterion.

Note Note

The WHERE clause works only on columns DateTime and Tag Name.

End of the note.

The operators supported for DateTime are >, >=, <, <= and BETWEEN and for Tag Name are = and IN.

Following is an example of WHERE clause:

Example Example

SELECT "MFB_PCoQuery_WithMetadata.tqpc"."Value" FROM "SYSTEM"."MFB_PCoQuery_WithMetadata.tqpc" where "MFB_PCoQuery_WithMetadata.tqpc"."DateTime" > '2016-04-01 00:00:00' AND "MFB_PCoQuery_WithMetadata.tqpc"."DateTime" < '2016-04-12 00:00:00' AND "MFB_PCoQuery_WithMetadata.tqpc"."TagName"IN ('BA:TEMP.1' , 'BA:PHASE.1')

End of the example.
Filtering on Query Parameters

You can filter on query parameters. For this, create a new virtual table. In the PARAMS column, enter the parameters you want to filter on. Change of the query parameter mode is not supported.

Here's an example of the filter clause:

Example Example

Select "WDF_PCoQuery.tqpc"."DateTime","WDF_PCoQuery.tqpc"."TagName","WDF_PCoQuery.tqpc"."Value" from "SYSTEM"."WDF_PCoQuery.tqpc" where "WDF_PCoQuery.tqpc"."PARAMS" IN ('StartDate=01/01/2016 00:00:00','EndDate=01/01/2016 01:00:00','RowCount=5','SelectedView=Interpolate')

End of the example.