ODBC Connector Configuration

28
ODBC CONNECTOR CONFIGURATION Installing and Configuring ODBC Client Connector Version 1.1 ABSTRACT Install and configure the ODBC Client Connector and setup connection with Tableau, Power Bi, Excel July 3, 2019

Transcript of ODBC Connector Configuration

Page 1: ODBC Connector Configuration

ODBC CONNECTOR

CONFIGURATION Installing and Configuring ODBC Client Connector

Version 1.1

ABSTRACT Install and configure the ODBC Client Connector

and setup connection with Tableau, Power Bi, Excel

July 3, 2019

Page 2: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 1

This document provides instructions on how to install the ODBC client driver on your Linux server or Windows

desktop. Included are examples of how to connect to the BlackLynx server using the ODBC connector with

Tableau, Power Bi, Microsoft Excel, and ISQL.

Table of Contents Install the ODBC Driver on Windows Desktop ...........................................................................................................2

Upgrade Windows Client ........................................................................................................................................7

Sample Server Connections with Windows Clients ................................................................................................8

Example 1: Connect Using Tableau ....................................................................................................................8

Example 2: Connect Using Power BI ................................................................................................................ 10

Example 3: Connect Using Microsoft Excel ..................................................................................................... 12

Install and Run the ODBC Driver on Ubuntu Linux .................................................................................................. 15

README File ........................................................................................................................................................ 16

Run the Installation File ....................................................................................................................................... 16

Example ODBC connections with Linux clients ................................................................................................... 18

Sample Connect with ISQL ............................................................................................................................... 18

Sample Connect with LibreOffice .................................................................................................................... 18

Install and Run the ODBC Driver on Mac OS ........................................................................................................... 23

Install the ODBC Driver on Mac OS Desktop ....................................................................................................... 24

Example Mac OS installation ............................................................................................................................... 26

Sample SQL queries ................................................................................................................................................. 27

Raw pcap data set 16GB ...................................................................................................................................... 27

Other datasets ..................................................................................................................................................... 27

XML Dataset .................................................................................................................................................... 27

Fuzzy search ..................................................................................................................................................... 27

Log files 21GB .................................................................................................................................................. 27

Unstructured text with regular expression 22GB ............................................................................................ 27

Leading wildcard search on 65GB ................................................................................................................... 27

Page 3: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 2

Install the ODBC Driver on Windows Desktop

1. Download the installer from: https://s3.amazonaws.com/ryft-public-sample-

data/ODBC/blacklynx_odbc_client_win_64-2.1.20.0.msi

2. The Setup wizard displays to guide you through installing the BlackLynx ODBC Driver (64-bit).

Click Next.

3. The End User License Agreement window displays. Ensure you read the agreement.

Page 4: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 3

4. Select the I accept the terms in the License Agreement checkbox and click Next.

5. Specify or accept the default destination folder. Click Next.

6. Click Install and the installation starts.

7. Allow the program to update your system.

Page 5: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 4

8. Once installation is complete, click Finish.

9. On your desktop, click Programs. You can now see the BlackLynx ODBC Driver X.X (64-bit) folder

and its files. Select 64-bit ODBC Administrator.

**In Windows 10 environment it is located under Windows Administrative Tools -> ODBC Data Source

Administrator (64-bit).

Page 6: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 5

10. The ODBC Data Source Administrator pop-up window displays. On the User DSN tab, click Add to

create a new data source.

11. On the Create New Data Source window ensure BlackLynx ODBC Driver is selected. Click Finish.

Page 7: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 6

12. The Configure BlackLynx window displays. Enter a Name and Description for data source. Enter the

User name and Password for the server, and specify the IP address of the server. By default, the Port

is 7409, but should be changed to match your environment.

13. Click Test Connection to verify connectivity to the BlackLynx server.

If the test is successful, this message displays.

If the IP address or the Port is bad, this message displays.

Page 8: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 7

14. After a successful test, click OK to close the Connection Test pop-up. Click OK to close the Configure

BlackLynx pop-up.

15. You’re back on the ODBC Data Source Administrator window. Notice that the data source named

has been added. In our example capture it is BlackLynx – 0310.

16. Click OK to close this window.

Upgrade Windows Client When a new release of the Windows client is released, you need to run the new windows installer on your

desktop and set up the connections to your BlackLynx servers. You can install the new version without

uninstalling/deleting the old version, but the SDK does not allow BlackLynx to automatically recreate existing

connections to the BlackLynx server. You must manually re-establish these connections.

Follow the same steps for installation, as covered in the beginning of this chapter. Ensure you complete the

Configure window for each BlackLynx server connection.

Page 9: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 8

Sample Server Connections with Windows Clients

Example 1: Connect Using Tableau You can connect a business intelligence tool, like Tableau, to the BlackLynx server to view datasets stored on the

server. From using pre-defined views to creating custom views using SQL, you can easily connect to your

datasets from a BI tool, like Tableau, by using the BlackLynx Connector.

1. Open Tableau. From the left-hand menu, click More Servers… and then select Other Databases (ODBC)

2. The Server Connection window displays. Select your named datasource from the DSN drop-down list,

and click Connect.

Page 10: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 9

3. After successfully connecting to the BlackLynx server, then click Sign-in at the bottom of the window.

4. Tableau displays and shows that you are now connected to the BlackLynx server (ODBC).

5. Click on the New Custom SQL to execute a search.

Page 11: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 10

Example 2: Connect Using Power BI Power BI can connect to the to the BlackLynx server using the connector.

1. Open the Power BI and select Get data.

2. Select Other -> ODBC and then hit the Connect button.

Page 12: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 11

3. Select the immuta-blacklynx DSN and expand Advance options to enter a custom SQL statement:

4. Hit OK and the query will preview. Then you can Load.

Page 13: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 12

Example 3: Connect Using Microsoft Excel Microsoft Excel can connect to the BlackLynx server using the connector. Please note that only the 64-bit version

of Excel works with the Connector.

Open Microsoft Excel and follow these steps:

1. From the Data ribbon, select From Other Sources and then From ODBC.

Page 14: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 13

2. The window displays. Select ODBC DSN and then click Next.

3. Select BlackLynx as your ODBC data source and click Next.

Page 15: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 14

4. The Connect to BlackLynx dialog box displays. Enter the information for the server and click Connect.

5. The Navigator will allow you to enter the custom SQL command.

Page 16: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 15

6. Execute the Load button.

Install and Run the ODBC Driver on Ubuntu Linux

The BlackLynx Connector can be run in a Linux/Ubuntu operating system enabling clients like LibreOffice and

ISQL to connect with the BlackLynx ODBC/JDBC server using the Linux driver.

The installation file, blacklynx_odbc_client_linux_64-x.x-y.y.tar.gz, is stored in the “~/install” directory on the

BlackLynx server. Install it in Ubuntu, and then follow the instructions in the README file to install the BlackLynx

ODBC connector.

Page 17: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 16

README File The README file contains the steps to install the driver in Linux. As stated in the file, this installation assumes

OpenSSL components are already installed in your Linux distribution. If not, run sudo apt-get install

libssl1.0.0 command.

This directory contains the installation of the BlackLynx ODBC driver.

/bin/x8664 - contains the binary.

/lib/x8664 - contains all of the libraries referenced by the Ryft ODBC

driver components.

/errormessages - contains the XML error message source for all error

messages issued by the Ryft ODBC driver.

1. Run 'sudo apt-get install unixodbc-dev unixodbc-bin unixodbc' to install

the unixODBC components if you have not already done so.

2. Untar the Ryft ODBC Linux Client tarball using

'tar -xzf blacklynx_odbc_client_linux-x.x-x.x.tar.gz'

3. Navigate to the blacklynx_odbc_client_64 directory and run './install.sh'

or optionally 'sudo ./install.sh'. If install is run as root, the BlackLynx ODBC

Linux Client files will be installed in the /usr/local/ryft directory. If

you are not running as root at the time of the install, the BlackLynx ODBC Linux

Client files will instead be installed in the ~/ryft directory. If you did

not run ./install.sh as root, you will have to update LD_LIBRARY_PATH to

include the [INSTALL_DIR]/lib/x8664 directory.

4. During the installation the odbc.ini and odbcinst.ini files were created

for you. If you previously had ODBC drivers and DSNs installed, you must

merge the contents of these files with the ~/.odbc.ini and ~/.odbcinst.ini

files. If you did not have a previous installation, you can copy these

files as ~/.odbc.ini and ~/.odbcinst.ini.

5. To use Libre Office Base on Ubuntu, you must also run

'sudo apt-get install libreoffice-base' if you have not already done so.

NOTE: This installation assumes that OpenSSL components are already installed

in your Linux distribution. If the OpenSSL libraries are not installed in your

distribution, run 'sudo apt-get install libssl1.0.0'.

Refer to the "BlackLynx Connectors: Installation and User Guide" for more

information on installing and configuring your RyftOne ODBC driver.

Run the Installation File 1. First, install the Unix ODBC components and update cache, if it hasn’t already been done.

$ sudo apt-get install unixodbc-dev unixodbc-bin unixodbc

2. Move the file to the HOME directory.

3. Open a terminal window and list the contents of the HOME directory.

4. Untar the installation file:

$ tar –xzf blacklynx_odbc_server_linux_64-x.x-x.x.tar.gz

5. Go to the blacklynx_odbc_client_64 directory and list the files.

6. As root, run the installation script. You need to enter the administrator password.

Page 18: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 17

$ sudo ./install.sh

o If you ran the command as Root, the BlackLynx ODBC Linux Client files are installed in the “/user/local/ryft” directory.

o If you are not Root when you run the command, the files are installed in the “~/ryft” directory. You must also update the LD_LIBRARY_PATH to include the "[INSTALL_DIR]/lib/x8664" directory.

o Enter the IP address of the ODBC server (default is 127.0.0.1)

o Enter the port of the ODBC server (default is 7409)

7. Modify contents of the “odbc.ini” file, created during installation, using your preferred editor. Update

the IP address and port associated with Server to point to your BlackLynx server.

8. If you have multiple servers, copy and paste the text and update the name (e.g. BlackLynxODBC and

ImmutaODBC) and Server information, like this.

9. Save and close the file.

10. During the installation the odbc.ini and odbcinst.ini files were created for you. If you previously had

ODBC drivers and DSNs installed, you must merge the contents of these files with the odbc.ini and

odbcinst.ini files. If you did not have a previous installation, you must copy these files (as hidden files) to

the home directory as ~/.odbc.ini and ~/.odbcinst.ini.

Page 19: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 18

Example ODBC connections with Linux clients

Sample Connect with ISQL

Sample Connect with LibreOffice If you want to use the LibreOffice with the BlackLynx ODBC/JDBC connector, you need to install LibreOffice Base;

it is not part of the default Ubuntu distribution. Once installed you can then use Base Database component

(database wizard) to connect to the BlackLynx server using the BlackLynx Connector.

1. As root, install the libreoffice-base file to use LibreOffice Base on Ubuntu.

$ sudo apt-get install libreoffice-base

2. Start LibreOffice.

$ libreoffice

Page 20: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 19

3. In LibreOffice, select Base Database, and the Database Wizard window opens. Select ODBC in the

Connect to an existing database drop-down list.

4. Click Next. Browse the ODBC data sources and select BlackLynxODBC. Click OK, and then click Next.

Page 21: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 20

5. In the Set up the user authentication page, enter the “ryftuser” user name and select the Password

required checkbox. Click Test Connection.

6. The Authentication Required window displays. Enter the password for the BlackLynx server and click

OK.

If the connectivity test is successful, this message displays. Click OK to proceed.

Page 22: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 21

If the connectivity test fails, this message displays. Click OK and resolve the issue.

7. Click Finish to save the settings.

Page 23: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 22

8. Give the connection a name, “BlackLynx-001” in this example, and then click Save.

Page 24: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 23

9. Lastly, LibreOffice Base starts and shows the tables and views already established on the BlackLynx

server.

Install and Run the ODBC Driver on Mac OS

This section covers how to install the ODBC client driver on your Mac OS desktop. Once you download and untar

the installation file, review the README file.

This directory contains the installation of the BlackLynx ODBC driver.

Page 25: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 24

/lib - contains all of the libraries referenced by the Ryft ODBC driver

components.

/errormessages - contains the XML error message source for all error messages

issued by the Ryft ODBC driver.

1. Download and install the iODBC Driver Manager for Mac OS X (www.iodbc.org).

2. Untar the Ryft ODBC Mac OS X Client tarball using 'tar -xzf

ryft1_odbc_client_macosx-x.x-x.x.tar.gz'.

3. Navigate to the ryft1_odbc_client_macosx directory and run './install.sh'

or optionally 'sudo ./install.sh'. If install is run as root, the Ryft ODBC

Mac OS X Client files will be installed in the /usr/local/lib and

/usr/local/ryft directories. If you are not running as root at the time of the

install, the Ryft ODBC Mac OS X Client files will instead be installed in

~/lib and ~/ryft.

4. During the installation the odbc.ini and odbcinst.ini files were created for

you. These files are iODBC configuration files. If you preiously had ODBC

drivers and DSNs installed, you must merge the contents of the odbc.ini and

odbcinst.ini files with the ~/.odbc.ini and ~/.odbcinst.ini files. If no

~/.odbc.ini or ~/.odbcinst.ini file were located at the time of installation,

these files were created for you.

Refer to the "Ryft Connector for ODBC Installation and User Guide" for more

information on installing and configuring your RyftOne ODBC driver.

Install the ODBC Driver on Mac OS Desktop 1. Download and install the iODBC Driver Manager for Mac OSX from www.iodbc.org.

2. Download the ODBC Client for Mac OS, ryft1_odbc_client_macosx-x.x-y.y.tar.gz.

3. Open Terminal and go to the “Downloads” directory.

4. Untar the file using this command:

$ tar –xzf ryft1_odbc_client_macosx-x.x-x.x.tar.gz

5. Navigate to the ryft1_odbc_client_macosx directory.

6. Run the installation script. BlackLynx recommends running the script as the system administrator so that

files are installed in the /usr/local/lib and /usr/local/ryft directories. Otherwise, the files will be installed

in ~/lib and ~ryft directories.

Page 26: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 25

$ sudo ./install.sh

7. Once you start the installation script, the system prompts you for the following, and once entered, the

system installs the BlackLynx ODBC client:

a. The directory in which to install. By default, it will install in the “/Users/<username>” directory. To accept the default, press Enter.

b. The IP Address of the BlackLynx ODBC server. c. The IP Port of the BlackLynx ODBC server (default is 7409)

8. Press Enter and the installation is complete.

Page 27: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 26

Example Mac OS installation

NOTE: During the installation the odbc.ini and odbcinst.ini files are automatically created for you. These files are

ODBC configuration files. If you previously had ODBC drivers and DSNs installed, you must merge the contents of

the odbc.ini and odbcinst.ini files with the ~/.odbc.ini and ~/.odbcinst.ini files.

Page 28: ODBC Connector Configuration

Installing and Configuring ODBC Client Connector

BlackLynx, Inc. ©2019 Page | 27

Sample SQL queries

Below is a list of sample SQL Queries to try out with the sample data on the BlackLynx server.

Raw pcap data set 16GB select ip_src, ip_dst, http_req_uri from PCAP where ip_dst = '34.238.50.30' and

http_req_method = 'GET'

select * from PCAP where ip_dst = '34.238.50.30' and payload like '-r(561-69-

\d{4})'

select ip_src, ip_dst, http_req_uri from PCAP where ip_dst = '34.238.50.30' and

http_req_method = 'GET'

select * from PCAP where ip_dst = '34.238.50.30' and payload like '-r(561-69-

\d{4})'

Other datasets There are other datasets available which can be installed on the server for demonstration purposes. A sample

list is outlined below.

XML Dataset select * from Chicago_Crime where Description LIKE '%ELECTRONIC%' and Block LIKE

'%INDIANA%'

Fuzzy search select * from Passengers where Name like '-E2(Michelle Jones)'

Log files 21GB select * from logs where Results like '-r(host:..(?!ip-172-31-.*)(ip[-0-9]*).)-w20'

Unstructured text with regular expression 22GB select * from wikipedia where Results like '-r(beautiful (\w+ ){0,5}world)-w20'

Leading wildcard search on 65GB select * from CDR where msisdn like '%%%%%%951354'

select * from CDR where msisdn like '-r((886682|8866271)\d{6})'