mstr-kafka-sink is a Kafka Connect plugin for sending data from Kafka to a MicroStrategy server. The data residing in MicroStrategy is stored in memory, optimized for Dashboard creation and fast access to the real time data stream.
The information below assumes you have at least MicroStrategy 10.9, Kafka and Kafka Connect deployed.
Configuring the connector requires at least the following information:
This connector only supports pushing a JSON topic to a MicroStrategy Cube. Other formats (TXT, CSV, etc.) need to be transformed in Kafka prior to be pushed to MicroStrategy. KSQL can help you do this
Clone this repository, open the project in eclipse and compile the connector:
The resulting jar file should go in the Plugins folder of Kafka Connect.
If you're using Docker to run it, make sure to have a Shared folder with your server that contains the Jar and is properly mapped to the CONNECT_PLUGIN_PATH
parameter
You should be good to go, just restart Kafka Connect and let's configure the Sink
2 options are available to configure the Sink. You can either create it using a REST API Call on Kafka Connect, or if you are using Confluent.io, use the Control Center to create it from a user friendly web portal.
Go to Kafka Connect and click on the Sink tab
Select the Kafka Topic you need to push to MicroStrategy
Select the MicroStrategy Sink connector and give a name to this instance
Scroll all the way down to the MicroStrategy section of the Sink configuration and fill in the information collected in prerequisites
Hit Continue and review all the information summarized as a JSON payload
If all is Ok, click Save & Finish. You should get redirected to the global Kafka Connect page, that should display your newly created Sink
Currently, all cubes go the the Shared Reports of the project. Custom folders support will probably be considered in a near future
Update bold parameters
curl -XPOST -H 'Accept: application/json' -H "Content-type: application/json" -d '{"name": "MicroStrategySinkTest","config": {"connector.class": "com.microstrategy.se.kafka.pushapi.MicroStrategySink", "topics": "users","CONFIG_LIBRARY_URL": "yourserver-url/MicroStrategyLibrary","CONFIG_USER": "mstr","CONFIG_PASSWORD": "yourpassword", "CONFIG_PROJECT": "MicroStrategy Tutorial","CONFIG_CUBE": "MicroStrategy & Kafka","CONFIG_UPDATEPOLICY": "Replace"}}' 'kafka-machine:8083/connectors'
SINKS
and click the + New Sink
buttonWhat data volume can be processed ?
This has been successfully tested with a stream of few hundred events per second, resulting in about 500K rows in MicroStrategy streamed in less than an hour. It can scale beyond that but hasn't been extensively tested yet
This is a very first implementation of such connector. We took a lot of shortcuts to make it work. Feel free to enhance it and share code updates as you use it.
First items in the list would be:
To Alex Fernandes, who implemented this first and passed along the knowledge so we could reuse it