MicroStrategy ONE
How to Connect to Druid
Druid is a column oriented, open source, distributed data store. For more details about Druid capabilities and design see the official Druid documentation.
See the following article on MicroStrategy Community for a Performance comparison between Druid data store and MicroStrategy Super Cubes.
How to Connect to Druid with MicroStrategy Developer
- Create a database instance. Select Generic Database for the Database connection type.
- Add a new database connection.
- In the database connection editor, click on the Advanced tab > Additional connection string parameters and add the following:
JDBC;MSTR_JDBC_JAR_FOLDER=/opt/mstr/MicroStrategy/install/JDBC;DRIVER=org.apache.calcite.avatica.remote.Driver;URL={jdbc:avatica:remote:url=http://34.227.151.55:8082/druid/v2/sql/avatica/};
- Download the Druid driver.
- Replace the ip address and port (34.227.151.55:8020) with the Druid's broker ip address and port.
- Replace
/opt/mstr/MicroStrategy/install/JDBC
with path where your Druid JDBC driver is located.
- Add a new database login.
- Click OK in the Database Login editor and in the Database Connection editor.
- Click OK in the two warning messages that appear.
- Click OK in the Database Instance editor.
- Make a backup of
DATABASE.PDS
file located inC:\Program Files (x86)\Common Files\MicroStrategy
- Edit the
DATABASE.PDS
file:- Search for the string
"<DSSOBJECT TYPE="DBMS" NAME="Generic DBMS" ID="@dbms38"
. - Then, search for the next tag
"<PROPERTY NAME="CatalogRetrievalMode" VALUE="2" />"
andChange
VALUE="2"
toVALUE="0"
. - Next, in the same
DSSOBJECT
tag context, add the following entry:<PROPTERYSET NAME="VLDB Syntax">
<PROPERTY NAME="Space In Tablename Pattern" VALUE= '"#0"' />
<PROPERTY NAME="Space In Columnname Pattern" VALUE= '"#0"' />
<PROPERTY NAME="Space In Columnalias Pattern" VALUE= '"#0"' />
</PROPERTYSET>
- Search for the string
- Save
DATABASE.PDS
file. - Go to MicroStrategy Developer, edit the database instance created earlier.
- Click Upgrade.
- Select the edited
DATABASE.PDS
file and click Load. - In the Available database types list, select Generic DBMS and move it to the Existing database types list.
- Click Yes when prompted to replace the existing Generic DBMS database type.
- Click OK multiple times.
- Restart the Intelligence Server.
Connecting a MicroStrategy Project to Druid
- Log into a project in Developer and open Schema > Warehouse Catalog.
- Open the Warehouse Catalog options and click Yes.
- Under Categories, choose Read Settings and select Use one or more SQL statements that query directly the database catalog tables. Click Settings.
-
Replace the top query with:
SELECT TABLE_SCHEMA NAME_SPACE, TABLE_NAME TAB_NAME FROM INFORMATION_SCHEMA.TABLES
-
Replace the bottom query with:
SELECT TABLE_SCHEMA NAME_SPACE,TABLE_NAME TAB_NAME,COLUMN_NAME COL_NAME,DATA_TYPE DATA_TYPE,CHARACTER_MAXIMUM_LENGTH DATA_LEN,NUMERIC_PRECISION DATA_PREC,NUMERIC_SCALE DATA_SCALE FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME in (#TABLE_LIST#)
ORDER BY 1, 2
- Click OK.
- Click the icon to Read the Warehouse Catalog and see the available tables from the Druid data store.