Here you’ll learn how to install and set up the project that contains the base driver code to enable a connection with MarkLogic through the ODBC Driver for Mac OSX. You can download the project on the ODBC Driver for Mac OSX tool page.

Support and Licensing Considerations

This project and its code and functionality is not representative of MarkLogic Server and is not supported by MarkLogic. This is not a MarkLogic product, but an unsupported, unofficial tool developed by MarkLogic engineering. You should test it in a development environment thoroughly before depending on it in production.

Setup and Configuration

1. Install homebrew

Using terminal, install homebrew if you don’t already have it:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2. Install unixodbc

Using terminal, brew install unixodbc. Make sure that directory ownership is changed to your user and that your user has write permission (if not, use the provided commands).

3. Install openssl

Using terminal, brew install openssl.

4. Download the Mac OSX ODBC Driver

Download the 64-bit Mac OSX ODBC driver, available on the ODBC Driver for Mac OSX tool page.

5. Follow the installation instructions

Open the mlsqlodbc .dmg file, and the subsequent .pkg file. This is the MarkLogic ODBC Installer. Follow the installation instructions. Install in default location. Use Touch ID or enter your password to allow installation. Verify that installation was successful.

If you receive the error no mountable file systems, either install the .dmg file with the command hdiutil attach mlsqlodbc-1.4-1-x86_64.dmg -shadow or use /sbin/fsck to repair the file system.

6. Edit the ~/.odbc.inifile

In terminal, use the vi command to edit the file ~/.odbc.ini. Paste in the following and edit the fields for your respective Servername, Username, Password, and Port of your MarkLogic instance:

[MarkLogicSQL]
Description      = MarkLogicSQL
Driver           = MarkLogicSQL
Trace            = No
TraceFile        =
Database         = marklogic
Servername       = localhost
Username         = admin
Password         = U0*hV0%bB*VNhb
Port             = 5432
Protocol         = 7.4
ReadOnly         = Yes
SSLMode          = disable
UseServerSidePrepare  = Yes
ShowSystemTables      = No
ConnSettings          =

7. Run isql -v MarkLogicSQL to connect

Congratulations! You can now select the rows and columns you need. You can also enter the same information into Tableau to establish a connection.

Using Tableau to Connect to MarkLogic on Mac OSX

The MarkLogic ODBC Driver for MacOSX provides an option to establish a connection with Tableau. Before you can view your MarkLogic data in Tableau, you need to define the contents of the relational view using a template. See Creating Template Views in the SQL Data Modeling Guide.

1. Install Tableau for Mac OSX

2. Install ODBC Manager

Visit http://www.odbcmanager.net/ to install.

3. Follow above setup steps

Complete steps 1-5 in the Setup and Configuration section.

4. Open ODBC Manager

Open ODBC Manager and click on the Drivers tab. Add the following information:

  • Under Driver Name, type MarkLogicSQL
  • Driver File: /Users/[username]/Library/MarkLogic/lib/mlsqlodbcw.dylib
  • Setup File: /Users/[username]/Library/MarkLogic/lib/mlsqlodbcw.dylib
  • Define as: User

In the background, this writes to the file /Users/[username]/Library/ODBC/odbcinst.ini

If you would not like to use the ODBC Manager UI, you may change the configuration here.

5. Navigate to the User DSN tab

Add the following information:

  • Under Data Source Name, type MarkLogicSQLDSN
  • Description: [anything to remind you what’s here!]

Add each key/value pair listed below:

  • Driver = MarkLogicSQL (same as driver name you wrote in Step 4)
  • Servername = [your MarkLogic hostname]
  • Username = [username]
  • Password = [password]
  • Port = [your MarkLogic ODBC server port number]
  • Protocol = 7.4
  • ReadOnly = Yes
  • SSLMode = your SSL setting [disable/allow/prefer/require]

In the background, this writes to the file /Users/[username]/Library/ODBC/odbcinst.ini

If you would not like to use the ODBC Manager UI, you may change the configuration here.

6. Open Tableau, Connect to Other Connection (ODBC)

Open Tableau and connect to Other Connection. You should have MarkLogicSQLDSN under DSN dropdown, and MarkLogicSQL under Driver dropdown.

7. Connect to Tableau with DSN or Driver

Connect using either DSN or Driver and use Tableau.

Learn More

ODBC Driver for Mac OSX

Download the base driver code to enable a connection with MarkLogic through the ODBC Driver for Mac OSX.

ODBC Driver for Linux and Windows

Download the supported ODBC Driver for Linux and Windows.

Download Center

Explore through MarkLogic’s main product offerings, as well as its APIs and Driver, connectors, tools, and libraries.

This website uses cookies.

By continuing to use this website you are giving consent to cookies being used in accordance with the MarkLogic Privacy Statement.