Connecting to SDS in HCP: quick reference
To connect to SAP HANA Cloud Platform Smart Data Streaming (SDS), you connect through one of the two SDS web servers: either the Web Service Provider (WSP) or the Streaming Web Service (SWS). Both provide REST and WebSocket interfaces for connecting to SDS projects, and the WSP also provides REST calls for project lifecycle management. The SWS interface is higher performance, however, for publishing and subscribing.
The APIs for WSP and SWS in HCP are the same as for the on-premises versions, but the URLs are different since they sit behind the HCP “load balancer”. How to connect to SDS in HCP is covered in the HCP documentation here. But since a lot of people struggle with this, here’s a “cheat sheet”:
For the two examples below:
- the HCP account name is: xyz123
- in HCP landscape us1
- SDS is installed on the HANA database called: hdb1
The URL for the Streaming Web Service is:
https://hana-database-nameswshcp-account-name.landscape.hana.ondemand.com
Example – using the values above:
https://hdb1swsxyz123.us1.hana.ondemand.com
The URL for the Web Services Provider is:
https://hana-database-namewsphcp-account-name.landscape.hana.ondemand.com
Example – using the values above:
https://hdb1wspxyz123.us1.hana.ondemand.com
A few other notes:
- use SWS wherever possible for publishing and subscribing – it’s faster
- use WSP for project lifecycle management
- the studio tools connect via WSP
- you don’t need to include a port number when connecting from most tools, but if you do, the port is 443 (for both sws and wsp)
If you aren’t sure about your HCP account name and the database name, you can get them from the HCP cockpit:
To connect from the SAP HANA Studio streaming plugin tools (or Eclipse with HANA and SDS plugins), follow the instructions here. Remember that Studio always connects via WSP.
Note that if you are connecting to the Internet via a proxy, you may need to change your Eclipse (HANA Studio) network settings (under Windows > Preferences):
To use the streamingclusteradmin command line tool (included in the SDS client download package), you need to specify the port. Also, if you are connecting to the Internet via a proxy, you will need to specify the proxy settings. Here’s an example:
streamingclusteradmin -D https.proxyHost=proxy -D https.proxyPort=8080 –uri=https://hdb1wspxyz123.us1.hana.ondemand.com:443 –username=SDSADMIN
great summary, Jeff. Thanks.
Hi Jeff,
How to subscribe real-time data from SAP HCP HANA database to an SDS project that runs on a monsoon server with a HANA installed, which input adapter can we used? Or any other method to implements?
If we use the generic DB input adapter, how to do the connection with HANA in SAP HCP to create the data services in HANA studio?
Best&Regards
Grady
I don't believe it's possible to define an SDS data service on an SDS cluser in Monsoon to connect to a HANA server in HCP, due to HCP security that blocks inbound TCP/IP connections.
For an SDS project to connect to a remote HANA database, the HANA ODBC client on the SDS server (in this case, in Monsoon) must be able to connect, via TCP/IP, to the remote HANA database (in this case, in HCP).
Thanks Jeff,
Do you have some sample for reference about the remote HANA DB connection about this scenario?