Mongo Power BI Connector

I am trying to connect to Mongo from Power BI using connector-for-bi (version 2014). On executing the mongosqld command, it displays a message saying “waiting for connections” in the console window and the message “sampling MongoDB for schema…” continuously in the logs. Any ideas on what could be causing this?

Logs:

2021-11-22T10:47:41.185-0500 I CONTROL    [initandlisten] mongosqld starting: version=v2.14.4 pid=5164 host=mad-abc-dpabcd1
2021-11-22T10:47:41.185-0500 I CONTROL    [initandlisten] git version: df0cf0b57e9aac0ab6d545eee0d4451d11d0c6e9
2021-11-22T10:47:41.185-0500 I CONTROL    [initandlisten] OpenSSL version OpenSSL 1.0.2n-fips  7 Dec 2017 (built with OpenSSL 1.0.2s  28 May 2019)
2021-11-22T10:47:41.185-0500 I CONTROL    [initandlisten] options: {config: "C:\\Program Files\\MongoDB\\Connector for BI\\2.14\\mongosqld.conf", systemLog: {path: "C:\\logs\\mongosqld.log"}, security: {enabled: true}, mongodb: {net: {uri: "mongodb://mad-abc-dpabcd1:27027", auth: {username: "abcuser", password: "<protected>", source: "abc123"}}}}
2021-11-22T10:47:41.192-0500 I NETWORK    [initandlisten] waiting for connections at 127.0.0.1:3307
2021-11-22T10:47:41.813-0500 I SCHEMA     [sampler] sampling MongoDB for schema...
2021-11-22T10:47:46.821-0500 I SCHEMA     [sampler] sampling MongoDB for schema...
2021-11-22T10:47:51.829-0500 I SCHEMA     [sampler] sampling MongoDB for schema...
2021-11-22T10:47:56.837-0500 I SCHEMA     [sampler] sampling MongoDB for schema...

Depending on the parameters you passed to mongosqld, it samples your collections periodically.

You can either reduce the sampling period using --schemaRefreshIntervalSecs argument, or provide the path to a fixed schema to avoid sampling using the --schema argument. However, if you didn’t provide the argument, default value is 0 meaning no resampling should ever occur. It seems you provided a value of 5 ?

Further details on https://docs.mongodb.com/bi-connector/current/reference/mongosqld/

1 Like