IBM Cloud Docs
Connecting with third-party tools

Connecting with third-party tools

You can connect third-party command-line interfaces, applications, and tools to your Db2 Warehouse on Cloud database.

Data integration

Informatica

You can connect Informatica to Db2 Warehouse on Cloud to help you manage your data.

Watch this video to see how to integrate Db2 Warehouse on Cloud with Informatica Cloud.

Segment

You can integrate Segment with a Db2 Warehouse on Cloud database. Segment is a single platform that collects, stores, and routes your user data to hundreds of tools.

Segment

Aginity Workbench

These instructions explain how to connect Aginity Workbench to a Db2 Warehouse on Cloud database. You can use Aginity Workbench to migrate IBM PureData for Analytics (Netezza) data models and data to Db2 Warehouse on Cloud.

Prerequisites

Before attempting to connect to your Db2 Warehouse on Cloud database, verify that you have the prerequisites.

Procedure

  1. Download and install Aginity Workbench.
  2. Determine your ODBC DSN from the connection information that you noted earlier.
  3. Launch Aginity Workbench. If the database connection dialog box does not open automatically, open it by clicking Connect on the toolbar.
  4. Establish a database connection. Use the host name, user ID, and password from the connection information that you noted earlier.

Data visualization & BI

Looker

You can connect Looker to a Db2 Warehouse on Cloud database. Looker is a business intelligence app and big data analytics platform with which you can explore, analyze, and share real-time business analytics.

Connecting Looker

Tableau

These instructions explain how to connect Tableau to a Db2 Warehouse on Cloud database and apply to Tableau Desktop , but you can use similar steps for other Tableau tools.

Prerequisites

Before attempting to connect to your Db2 Warehouse on Cloud database, verify that you have the prerequisites.

Procedure

  1. In Tableau Desktop, open the window or page in your tool that is used to define a database connection.
  2. From the start page, click Connect to data.
  3. From the Data Sources list, select the data source or driver to use for your database connection. In the On a server section of the list, select IBM Db2.
  4. From the IBM DB2 Connection window, enter the connection information by using the definitions in Table 1.
  5. Click Connect to establish the connection. Tableau offers several options for connecting to your data. To make full use of your Db2 Warehouse on Cloud database, choose the Connect Live option.
Table 1. Fields in Tableau for connection information
Tableau field Db2 connections information field
Step 1: Enter a server name Host name
Step 2: Port Port number
Step 3: Enter a database on the server Database name
Username User ID
Password Password

Microsoft Excel

These instructions explain how to connect Microsoft Excel to a Db2 Warehouse on Cloud database.

Prerequisites

Before attempting to connect to your Db2 Warehouse on Cloud database, verify that you have the prerequisites.

You must have the Db2 driver package or the IBM® Data Server Driver Package installed on your local computer.

Restriction: Connections between Excel and Db2 Warehouse on Cloud are supported on only the Windows operating system.

Procedure

  1. In the web console, go to the Run SQL page.
  2. Type one or more SELECT statements in the editor text box.
  3. Click one of the Run options.
  4. Click Excel ODC File.
  5. Download and open the BLUExcel.odc file in Excel. If a security notice is displayed, click Enable.
  6. Click Open to connect to the Db2 Warehouse on Cloud database. The Connect To DB2 Database dialog box opens.
  7. Type the user ID and password that you use to log in to Db2 Warehouse on Cloud. To obtain the user ID and password, click Connect in the web console or Connect > Connection Information in the web console.
  8. Ensure that the connection mode is Share, and then click OK.

Results

The query results are displayed in an Excel spreadsheet. These are the same results that are displayed in the Results viewer. Now you can generate charts and reports and analyze your data by using Excel. For more information about how to do this and how to run SQL queries on your data from the web console, see:

Esri ArcGIS for Desktop

You can connect Esri ArcGIS for Desktop to a Db2 Warehouse on Cloud database and then use it to analyze and visualize geospatial data.

Prerequisites

Before attempting to connect to your Db2 Warehouse on Cloud database, verify that you have the prerequisites.

You must have the Db2 driver package or the IBM® Data Server Driver Package installed on your computer.

Procedure

  1. Determine your ODBC DSN data from the connection information that you collected beforehand.

  2. Create a new connection:

    a. In the ArcCatalog Catalog tree, open the Database Connections node and click Add Database Connection.

    b. In the Database Connections wizard:

    • Select DB2 from the Database Platform drop-down list.

    • Enter the following string in the Data source field:

      HostName=<hostname>;Port=<port>;Database=<database>;
      CLIENTBUFFERSUNBOUNDLOBS=1;LOBCACHESIZE=50000000;
      FET_BUF_SIZE=256K  
      

      where <hostname>, <port>, and <database> are placeholders that represent the host name, port number, and database name that you noted earlier.

    • Select Database authentication as the authentication type.

    • Specify your user name and password (the user ID and password that you noted earlier) in the corresponding fields.

    • Press OK.

      Database Connections wizard
      Figure 1. Database Connections wizard

Results

The ArcCatalog component of Esri ArcGIS for Desktop is now connected to your Db2 Warehouse on Cloud database.

Data science

SAS

These instructions explain how to create a connection from SAS to a Db2 Warehouse on Cloud database.

Prerequisites

Before attempting to connect to your Db2 Warehouse on Cloud database, verify that you have the prerequisites.

Procedure

For steps on how to connect from SAS to a Db2 Warehouse on Cloud database, see the SAS documentation:

R development environment

Instead of using the RStudio® environment that is integrated within IBM Watson Studio, you might prefer to use your own, locally installed R development environment. For example, you might have your own RStudio installation, or you might prefer to use some other development tool such as Rcmdr or Rattle. These instructions explain how to connect an R development environment to a Db2 Warehouse on Cloud database.

Prerequisites

Before attempting to connect to your Db2 Warehouse on Cloud database, verify that you have the prerequisites.

Procedure

  1. In your local R environment, install the ibmdbR package by entering the following command:

    install.packages("ibmdbR")

    Your local R environment accesses the Comprehensive R Archive Network (CRAN) and automatically downloads and installs the ibmdbR package and any prerequisite packages that are not already installed.

  2. Create an ODBC driver connection between your R development environment and your Db2 Warehouse on Cloud database:

    a. Set up your database as an ODBC data source.

    b. Open your locally installed R development environment.

    c. At the R prompt, enter the following statements to create the connection. Replace the placeholders with the connection information that you collected beforehand.

    • If your locally installed R development environment runs in the Db2 Warehouse on Cloud database:

      library(ibmdbR)
      host.name <- "placeholderForYourHostName"
      port <-"placeholderForPortNumber" # 50000 if not using SSL or 50001 if using SSL
      user.name <-"placeholderForYourUserName"
      pwd <- "placeholderForYourPassword"
      con.text <- paste("placeholderForYourDSNName;DRIVER=BLUDB",
                        ";Database=BLUDB",
                        ";Hostname=",host.name,
                        ";Port=",port,
                        ";PROTOCOL=TCPIP",
                        ";UID=", user.name,
                        ";PWD=",pwd,sep="")
      # Connect to using a odbc Driver Connection string to a remote database
      con <- idaConnect(con.text)
      
    • If your locally installed R development environment does not run in the Db2 Warehouse on Cloud database:

      library(ibmdbR)
      driver.name <- "{placeholderForYourDriverName}"
      db.name <- "placeholderForYourDatabaseName"
      host.name <- "placeholderForYourHostName"
      port <-"placeholderForYourPort"
      user.name <-"placeholderForYourUserName"
      pwd <- "placeholderForYourPassword"
      con.text <- paste("placeholderForYourDSNName;DRIVER=",driver.name,
                        ";Database=",db.name,
                        ";Hostname=",host.name,
                        ";Port=",port,
                        ";PROTOCOL=TCPIP",
                        ";UID=", user.name,
                        ";PWD=",pwd,sep="")
      # Connect to using a odbc Driver Connection string to a remote database
      con <- idaConnect(con.text)
      

      The statement that is used to create the connection object uses the idaConnect() method, not the odbcConnect() or odbcDriverConnect() methods.

    d. Initialize the analytics package by issuing the following R command:

    idaInit(con)

    e. To test whether the connection is working, issue the following R command:

    idaShowTables()

    The console displays a list of all of the tables and views in the current schema.

Watch this video to see how to create a connection in RStudio and add connected data to a project: