Launch BI Connector
Overview
mongosqld
is the BI Connector program which connects
your MongoDB instance to your BI tool. mongosqld
requires a data schema which maps to your MongoDB collections and
databases. You have several options for creating a schema and
launching mongosqld
. This guide will help you choose
the best option for your needs.
By default, mongosqld
generates a default data schema and stores it in memory. Alternatively, if you prefer
to create a custom schema and edit it manually, use one of these two methods:
Use the
mongodrdl
program to create a custom.drdl
schema file and then startmongosqld
with the--schema
option to point to this file.If you previously uploaded a custom schema with the
upload
command, you must use thename-schema
command to store the schema internally under the provided custom name. Then you can startmongosqld
with--schemaSource
,--schemaMode
, and--schemaName
options.
To learn more about creating a schema and data sampling, see Map Relational Schemas to MongoDB.
Prerequisites
Install BI Connector
Launching mongosqld
There are three options for launching and running
mongosqld
. You can:
Run
mongosqld
as a hosted service with MongoDB AtlasStart
mongosqld
from the command lineInstall
mongosqld
as a system service
Run BI Connector as a Hosted Service with MongoDB Atlas
You can host the MongoDB Connector for Business Intelligence in MongoDB Atlas. To learn how to enable and connect to an Atlas-hosted BI Connector, see Connect via BI Connector for Atlas.
Start mongosqld
From the Command Line
You can use command line options to specify collections and databases to sample, user credentials, and other configuration options. For a complete list of command line options, see Command Line Options.
To start mongosqld
from the command line, run the
mongosqld
executable in the BI Connector program directory with any
necessary command line options.
The following example uses the --sampleNamespaces
option to specify the books
collection in the
test
database.
"C:\Program Files\MongoDB\Connector for BI\2.4\bin\mongosqld.exe" --sampleNamespaces test.books
The following example uses the --sampleNamespaces
option to specify the books
collection in the
test
database.
mongosqld --sampleNamespaces test.books
The following example uses the --sampleNamespaces
option to specify the books
collection in the
test
database.
mongosqld --sampleNamespaces test.books
The following example uses the --sampleNamespaces
option to specify the books
collection in the
test
database.
mongosqld --sampleNamespaces test.books
mongosqld
with a Configuration File
You can use a configuration file to hold all your
mongosqld
configuration options. Start mongosqld
with the
--config
option to specify a
configuration file.
"C:\Program Files\MongoDB\Connector for BI\2.4\bin\mongosqld.exe" --config <pathToConfigFile>\mongosqld.conf
mongosqld --config <pathToConfigFile>/mongosqld.conf
mongosqld --config <pathToConfigFile>/mongosqld.conf
mongosqld --config <pathToConfigFile>/mongosqld.conf
Install mongosqld
as a System Service
BI Connector requires a configuration file with the
mongosqld.systemLog.path
setting specified when running as a
system service. Using your preferred text editor, create a
mongosqld.conf
file. To review the configuration file options,
see Configuration File. For example:
systemLog: path: 'C:\logs\mongosqld.log' net: bindIp: '127.0.0.1' port: 3307
Note
All the file paths in your configuration file must be absolute and wrapped in single quotes. For example:
systemLog: path: 'C:\logs\mongosqld.log'
To install and run mongosqld
as a system service, run the
following commands:
"C:\Program Files\MongoDB\Connector for BI\2.4\bin\mongosqld.exe" install --config "<pathToConfigFile>\mongosqld.conf" net start mongosql
Windows returns mongosql service installed
if your installation
succeeded.
systemLog: path: '/logs/mongosqld.log' net: bindIp: '127.0.0.1' port: 3307
To install and run mongosqld
as a system service, run the
following commands:
mongosqld install --config <pathToConfigFile>/mongosqld.conf launchctl load -w /Library/LaunchDaemons/mongosql.plist
systemLog: path: '/logs/mongosqld.log' net: bindIp: '127.0.0.1' port: 3307
To install and run mongosqld
as a system service, run the
following commands:
sudo mongosqld install --config <pathToConfigFile>/mongosqld.conf sudo systemctl start mongosql.service
To enable the service so it starts automatically at boot time, run the following:
systemctl enable mongosql.service
systemLog: path: '/logs/mongosqld.log' net: bindIp: '127.0.0.1' port: 3307
To install and run mongosqld
as a system service, run the
following commands:
sudo mongosqld install --config <pathToConfigFile>/mongosqld.conf sudo systemctl start mongosql.service
To enable the service so it starts automatically at boot time, run the following:
systemctl enable mongosql.service
Next Steps
Once BI Connector is up and running, you are ready to begin using it with your preferred BI tool. See Connect BI Tools for a selected list of connection tutorials.