Where to Place the Custom Adapter Files
Place the files we have created and edited for our Custom Adapter in the correct directory.
Overview
You will learn
- Where to place the Custom Adapter Files on the server
- Where to place the Custom Adapter Files on the client
- How to access your Custom Adapter in HANA Studio
Prerequisites
Prerequisites
- Tutorial: Editing Adapter Configuration Files
Steps
Next Steps
Time to Complete
15 Min
Intro
The files for the custom adapter include the:
mqtt-input.jarandorg.eclipse.paho.client.mqttv3-<version>.jarfilesadapter_config.xmlfilemqtt_input.cnxmlfile- edited versions of the
modulesdefine.xml,custommodulesdefine.xml, andparametersdefine.xsdfiles
The directory paths for these files will be relative to the STREAMING_HOME and STREAMING_CUSTOM_ADAPTERS_HOME environment variables. The streaming home environment variables are %STREAMING_HOME% and %STREAMING_CUSTOM_ADAPTERS_HOME% for Windows, and $STREAMING_HOME and $STREAMING_CUSTOM_ADAPTERS_HOME for Unix operating systems (please edit the below paths according to your intention). The rest of the directory path relative to the STREAMING_HOME environment variable is the same on both Linux and Windows.
Assuming you used the default install location, then the local Windows Streaming Analytics $STREAMING_HOME will be
and the<Hana Studio installation location>\plugins\com.sybase.cep.studio.native.bins_<version>.<timestamp>
$STREAMING_CUSTOM_ADAPTERS_HOME will be`<Hana Studio installation location>\plugins\com.sybase.cep.studio.native.bins_``<version>`.`<timestamp>``\adapters\framework`relative to your `IDE`'s directory.
| Files | New Path |
|---|---|
mqtt-input.jarorg.eclipse.paho.client.mqttv3-<version>.jar | $STREAMING_CUSTOM_ADAPTERS_HOME/libj |
adapter_config.xml | $STREAMING_HOME/adapters/framework/instances/mqtt_inputNote: You will need to create the mqtt_input folder |
mqtt_input.cnxml | $STREAMING_HOME/lib/adapters |
modulesdefine.xml | $STREAMING_HOME/adapters/framework/config |
custommodulesdefine.xmlparametersdefine.xsd | $STREAMING_CUSTOM_ADAPTERS_HOME /config |
To check the $STREAMING_HOME environment variable make sure that you’re connected as the <sidadm> user, and use the echo command “echo $STREAMING_HOME”.
IMPORTANT! Since you’re running a
multidbSAP HANA environment,$STREAMING_CUSTOM_ADAPTERS_HOMEwill refer toassuming you have used the default location of/hana/shared/<SID>/streaming/cluster/<tenant db>/adapters/hanaas the root directory for the installation.
| Files | New Path |
|---|---|
mqtt-input.jarorg.eclipse.paho.client.mqttv3-<version>.jar | $STREAMING_CUSTOM_ADAPTERS_HOME/libj |
adapter_config.xml | $STREAMING_HOME/adapters/framework/instances/mqtt_inputNote: You will need to create the mqtt_input folder |
mqtt_input.cnxml | $STREAMING_CUSTOM_ADAPTERS_HOME/cnxml |
modulesdefine.xml | $STREAMING_HOME/adapters/framework/config |
custommodulesdefine.xmlparametersdefine.xsd | $STREAMING_CUSTOM_ADAPTERS_HOME /config |
For the question below, select the correct answer, and click Validate.
If you have placed your mqtt_input.cnxml file in the correct location, you will be able to see your custom input adapter in the Input Adapters drawer in the palette.
Create a new Streaming Project using the Streaming Analytics plugin. Use the ccl code provided below for the project shown in the screenshot.

CREATE INPUT WINDOW InputWindow1 SCHEMA ( Message string )
PRIMARY KEY ( Message ) KEEP ALL ROWS ;
ATTACH INPUT ADAPTER MQTT_Input_Adapter1
TYPE mqtt_input TO InputWindow1
PROPERTIES mosquittoServerAddress = 'tcp://<your-ip-address>:1883' ,
topic = 'test' ;Click the Done button below once you have completed this tutorial.
Resources
Discussion
Share feedback on this tutorial or join the conversation in SAP Community.