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.
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.
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.ini
file
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.
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:
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:
Add each key/value pair listed below:
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.
By continuing to use this website you are giving consent to cookies being used in accordance with the MarkLogic Privacy Statement.