Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide...

32
Simba MongoDB ODBC Driver Quickstart Guide Revised: October 8, 2013

Transcript of Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide...

Page 1: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Simba MongoDB ODBC Driver Quickstart Guide

Revised: October 8, 2013

Page 2: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 2

Simba MongoDB ODBC Driver Quickstart Guide

Contents Purpose ......................................................................................................................................................... 3

Do you need MongoDB? ............................................................................................................................... 4

Do you need sample data in MongoDB? ...................................................................................................... 6

Install the Simba MongoDB ODBC Driver ................................................................................................... 11

Connect from Excel ..................................................................................................................................... 16

Connect from Tableau ................................................................................................................................ 21

Troubleshooting .......................................................................................................................................... 28

Architecture Mismatch Problems ........................................................................................................... 28

For assistance at any point in this installation process, please contact Simba for free Engineering Level Support at: [email protected].

Page 3: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 3

Simba MongoDB ODBC Driver Quickstart Guide

Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver. The following sections will outline how to get your Windows environment quickly set up to allow for evaluation and use of the driver.

Use the following flow-chart to determine what page of the guide to start on.

Page 4: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 4

Simba MongoDB ODBC Driver Quickstart Guide

Do you need MongoDB? How to Download MongoDB for free:

a. Visit http://www.mongodb.org/downloads. b. Install guides at: http://docs.mongodb.org/manual/installation/

Confirm MongoDB is installed and running:

STEP 1: Start MongoDB by first opening the command prompt by going to the Start Menu and typing “cmd”, then press Enter.

STEP 2: Navigate to the “bin” directory of your MongoDB installation.

Page 5: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 5

Simba MongoDB ODBC Driver Quickstart Guide

STEP 3:

Start your MongoDB instance with the following command:

mongod --dbpath <data_path>

where <data_path> is the path to your data directory.

If MongoDB is working correctly, you should see the last line which says: admin web console waiting for connections on port <port> where <port> is the port that MongoDB started on. By default, this is 27017.

Page 6: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 6

Simba MongoDB ODBC Driver Quickstart Guide

Do you need sample data in MongoDB? How to get a sample data set for MongoDB?

Step 1: Download the sample data set from: http://www.simba.com/wp-content/uploads/2013/10/FAA_Mongo.zip Note: This is a modified version of the FAA data set, the original which is available here: http://www.transtats.bts.gov/DL_SelectFields.asp?Table_ID=236&DB_Short_Name=On-Time

Step 2: Extract the zip file that was downloaded.

Page 7: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 7

Simba MongoDB ODBC Driver Quickstart Guide

Step 3: Start MongoDB by first opening the command prompt by going to the Start Menu and typing “cmd”, then press Enter.

Step 4: Navigate to the “bin” directory of your MongoDB installation.

Page 8: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 8

Simba MongoDB ODBC Driver Quickstart Guide

Step 5: Start your MongoDB instance. This can be done with the following command:

mongod --dbpath <data_path>

where <data_path> is the path to your data directory.

Step 6: Open another command prompt and navigate again to the “bin” directory of your MongoDB installation. Step 7: Import the data in the Airline.csv file that you downloaded using the following command:

mongoimport -d faa -collection airline --file <file_path>\Airline.csv –headerline

where <file_path> is the path to the Airline.csv file that was downloaded. At the end of the import, a message should be displayed indicating 509,519 objects were imported.

Page 9: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 9

Simba MongoDB ODBC Driver Quickstart Guide

Step 8: To confirm that the data has been imported correctly, run the mongo shell using the following command:

mongo

Step 9: Choose the “faa” database using the following command:

use faa;

Page 10: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 10

Simba MongoDB ODBC Driver Quickstart Guide

Step 10: Show the data in the “airline” collection that was just imported using the following command:

db.airline.find();

Page 11: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 11

Simba MongoDB ODBC Driver Quickstart Guide

Install the Simba MongoDB ODBC Driver How to Get the Simba MongoDB Driver?

Step 1: Download from: http://www.simba.com/connectors/mongodb-odbc

Choose either the 32 or 64 bit version as appropriate. Follow the steps in the install guide (http://www.simba.com/wp-content/uploads/2013/05/Simba-MongoDB-ODBC-Driver-User-Guide.pdf) to install on your machine.

Step 2: You should receive an email with a license key attached. This license key should be placed alongside the driver DLL in the installation directory. By default, the directories for the licenses are:

• C:\Program Files\Simba MongoDB ODBC Driver\lib • 32-bit driver on 64-bit Windows: C:\Program Files (x86)\Simba MongoDB ODBC Driver\lib

Note that if you use Outlook, you may need to save the license file locally before placing it in the above directory to avoid permission problems.

Page 12: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 12

Simba MongoDB ODBC Driver Quickstart Guide

How to Configure the DSN (Data Source Name)?

Step 1: Open the ODBC Administrator Note: Use the ODBC Administrator that matches the bitness of the driver you are using. See http://www.simba.com/wp-content/uploads/2010/10/HOW-TO-32-bit-vs-64-bit-ODBC-Data-Source-Administrator.pdf for information.

Page 13: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 13

Simba MongoDB ODBC Driver Quickstart Guide

Step 2: Choose the System DSN tab.

Step 3: Choose the “Sample Simba MongoDB DSN” and press “Configure…”

Page 14: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 14

Simba MongoDB ODBC Driver Quickstart Guide

Step 4:

• Change the Host to the IP or hostname of your MongoDB server.

• Change the port to the port that MongoDB is running on. Note: 27017 is the default port for MongoDB.

• Change the database to “faa” to access the “airline” table that was created earlier, or the name of the database that has your data in it. Username is only relevant if MongoDB is configured to use authentication. If it is configured to use Authentication, check “Enable authentication” under the “Advanced Options” section.

Page 15: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 15

Simba MongoDB ODBC Driver Quickstart Guide

Step 5: To test if your driver is configured properly, press the “Schema Definition…” button. You should see the “airline” table along with a preview of the columns and data.

Step 6: Press the “OK” button, and press “Yes” to following prompt.

Step 7: Press the “OK” button to save the configuration.

Page 16: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 16

Simba MongoDB ODBC Driver Quickstart Guide

Connect from Excel How do I connect and make a basic query with the Simba MongoDB Driver to Excel? Note: The version of Excel used is Excel 2010 32-bit, however the driver will work with any version and bitness of Excel.

Step 1: Open Excel Step 2: Choose the Data tab, then choose “From Other Data Sources” and select “From Data Connection Wizard”.

Page 17: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 17

Simba MongoDB ODBC Driver Quickstart Guide

Step 3: Choose “ODBC DSN” from the list and press “Next >”. DSN stands for Data Source Name, which is what was configured when installing and configuring the driver. Essentially, it’s a preconfigured and stored set of connection settings which allow you to easily connect a driver to the data source.

Step 4: Choose the “Sample Simba MongoDB DSN” (or the DSN that you have created and configured) from the list and press “Next >”.

Page 18: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 18

Simba MongoDB ODBC Driver Quickstart Guide

a. If you see the following image, the connection to the driver did not succeed.

b. If you press the “Test Connection” button will give you the following dialog.

c. Issue Diagnosis: Bitness is incorrectly matched. You must match the bitness of the application with the bitness of the driver to correctly connect such as use 32-bit Excel with a 32-bit driver, or 64-bit Excel with a 64-bit driver. See Architecture Mismatch Problems (page 28) for more information.

Page 19: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 19

Simba MongoDB ODBC Driver Quickstart Guide

Step 5: Choose the table that you wish to query and press the “Finish” button.

Step 6: Choose the location for your returned data. Leave it as “=$A$1” and press the “OK” button.

Page 20: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 20

Simba MongoDB ODBC Driver Quickstart Guide

Step 7: Wait while data is returned.

Congratulations, your data is now available from Excel.

Page 21: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 21

Simba MongoDB ODBC Driver Quickstart Guide

Connect from Tableau How do I connect and make a basic query with the Simba MongoDB Driver to Tableau? Note: The version of Tableau used is 8.0, however the driver should work without problems in Tableau 7 as well.

Step 1: A .tdc file was supplied with the driver download that allows Tableau to work better and helps configure Tableau with the driver. Save this file, “Simba MongoDB ODBC Driver.tdc”, in your “Documents\My Tableau Repository\DataSources” directory. Step 2: Open Tableau. Step 3: Select “Connect to data”

Page 22: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 22

Simba MongoDB ODBC Driver Quickstart Guide

Step 4: Choose “Other Databases (ODBC)” at the bottom of the list.

Page 23: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 23

Simba MongoDB ODBC Driver Quickstart Guide

Step 5: Select the “Sample Simba MongoDB DSN” (or the DSN that you have created and configured) from the DSN drop-down and press the “Connect” button.

a. You may see the following dialog if there is an error connecting to the driver.

Page 24: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 24

Simba MongoDB ODBC Driver Quickstart Guide

b. Issue Diagnosis: Bitness incorrect, using the 64-bit driver.

At the time of this writing, Tableau is only available as a 32-bit application, so you must use a 32-bit driver. You can confirm the bitness of the driver by pressing the “Show Details” button and ensuring that the driver DLL name is SimbaMongoDBODBC32.dll. See Architecture Mismatch Problems (page 28) for more information.

Step 6: Select the “Single Table” option and press the magnifying glass to open the list of tables.

Page 25: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 25

Simba MongoDB ODBC Driver Quickstart Guide

Step 7: Choose one of the tables to query and press the “Select” button.

Step 8: Press OK to load the selected table.

Page 26: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 26

Simba MongoDB ODBC Driver Quickstart Guide

Step 9: If a warning comes up, press OK as this will not affect operation of the driver. This warning is displayed because Tableau sees only a generic driver and attempts to determine what the capabilities are on its own. The warning does not affect how the driver will operate in Tableau.

Step 10: Choose to connect live so that Tableau does not import all of the data and you work on the data in MongoDB.

Page 27: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 27

Simba MongoDB ODBC Driver Quickstart Guide

Step 11: The table will be loaded into Tableau with the columns listed as dimensions and measures depending on data type. From here, you can create reports on the table you selected.

Congratulations, your data is now available for visualization in Tableau.

Page 28: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 28

Simba MongoDB ODBC Driver Quickstart Guide

Troubleshooting

Architecture Mismatch Problems If you encounter an error message similar to “The specified DSN contains an architecture mismatch between the Driver and Application”, then the bitness of the application does not match the bitness of the driver. You are likely connecting a 32-bit application to a 64-bit driver, or vice versa. Please ensure that the bitness of your application matches the bitness of driver that you are trying to use.

To determine the bitness of Excel: Excel 2007 and earlier These versions of Excel are strictly 32-bit.

Excel 2010 Step 1: Click on the “File” tab.

Page 29: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 29

Simba MongoDB ODBC Driver Quickstart Guide

Step 2:

Click on the “Help” item on the left-hand side.

Page 30: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 30

Simba MongoDB ODBC Driver Quickstart Guide

Step 3:

Look at the version that is displayed on the help page. If Excel is 32-bit it will show “(32-bit)” (as pictured) while if it is 64-bit it will show “(64-bit)”.

Excel 2013 Step 1:

Click on the “FILE” tab.

Page 31: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 31

Simba MongoDB ODBC Driver Quickstart Guide

Step 2:

Click on the “Account” item on the left-hand side.

Step 3: Click on the “About Excel” button on the right side.

Page 32: Simba MongoDB ODBC Driver Quickstart Guide · Page | 3 . Simba MongoDB ODBC Driver Quickstart Guide Purpose This document is targeted towards users of the Simba MongoDB ODBC Driver.

Page | 32

Simba MongoDB ODBC Driver Quickstart Guide

Step 4:

Check the version string in the pop-up dialog. If Excel is 32-bit, it will show “32-bit” in the string, if it is 64-bit then it will show “64-bit”.

To determine the bitness of Tableau:

At the time of writing, all versions of Tableau are 32-bit.