1
votes

I'm attempting to connect Tableau desktop to our CosmosDB using the MongoDB API. Looks like the Azure Cosmos ODBC driver only supports CosmosDB using the SQL API, not using the MongoDB API. Are there any other ODBC drivers that will work with Cosmos DB Mongo API to get data into Tableau?

We've tried a third party driver by Cdata and this seems to work but we would like to use something free and officially supported by Microsoft.

Thanks, Chris

2
Just curious what you're trying to achieve. If Tableau natively supports MongoDB, why not try connecting via native MongoDB drivers/sdk's? The Cosmos DB ODBC driver serves a specific purpose (for normalizing data to look like tables & rows, vs native document store). - David Makogon
We have all of our data stored in CosmosDB which was set up by a vendor. We've asked if we can switch out to using the SQL API, but the vendor said there would be write block issues using the SQL API. Ultimately we would like a live dashboard in Tableau to display metrics coming from this CosmosDB. The Cdata driver does what you said the Cosmos DB ODBC does, it normalizes the data for our Tableau developers to work with. However, I was hoping there was a free solution. - Chris Martin

2 Answers

0
votes

Yes, the ODBC driver only supports SQL API. There is a driver for this, MongoDB Connector for BI. I would try this.

0
votes

Was able to get the MongoDB Bi Connector to work.

Instructions:

Connecting to Tableau requires the installation of "MongoDB BI connector" suite and starting the mongosqld daemon.

The set of instructions to install and configure mongosqld deamon are described at https://www.mongodb.com/tableau?jmp=tbl.

To connect mongosqld to a CosmosDB account, use the following command line instead of the one mentioned in the above documentation

mongosqld.exe /mongo-uri:"mongodb://.documents.azure.com:10255" /mongo-username: /mongo-password:"" /mongo-ssl /mongo-sslAllowInvalidCertificates /mongo-minimumTLSVersion:TLS1_2 /auth /mongo-authenticationMechanism:PLAIN /sslPEMKeyFile:https://www.mongodb.com/tableau?jmp=tbl> /sslMode:requireSSL /defaultAuthMechanism:PLAIN

All the variables marked as <> (with the exception of sslPEMKeyFile) are listed in the Connection String page for your account in the Azure Portal Once the MongoSQLD instance is started, start your Tableau client, select "MongoDB BI connector" and configure the USERNAME/PASSWORD as follows:

[1]: https://i.stack.imgur.com/lpyPK.png

(replace the location to ca.crt as generated using the key_cert_gen.sh script in https://www.mongodb.com/tableau?jmp=tbl ) Click on OK and "Sign In" and you should be able to access your MongoDB collections.