About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Question & Answer
Question
How to query Impala using Db2 Federation through ODBC driver?
Answer
Before You Begin
Enable Federation feature and restart Db2 to make it effective.
$ db2 update dbm cfg using federated YES
Pre-Configuration
1. Make sure the required ODBC drivers are installed correctly.
ls ~/sqllib/federation/odbc/lib/FOimpala*.so
2. Make sure the data source is accessible to Federation server.
$ telnet matters1.fyre.ibm.com 21050
Trying 9.30.0.189...
Connected to matters1.fyre.ibm.com.
Escape character is '^]'.
3. Create server, user mapping, nickname, and query the nickname.
$ create server SERVER1 type impala version 6.0 OPTIONS(host 'matters1.fyre.ibm.com',port '21050', dbname 'default')
$ create user mapping for user server SERVER1 options(REMOTE_AUTHID 'cloudera',REMOTE_PASSWORD 'cloudera')
$ create nickname n1 for server1."alltype_test"
$ select count(*) from n1
1
-----------
2
1 record(s) selected.
[{"Type":"SW","Line of Business":{"code":"","label":""},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCAVPX","label":"Federated Server"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]
Was this topic helpful?
Document Information
More support for:
Federated Server
Software version:
All Version(s)
Document number:
6447049
Modified date:
07 May 2021
UID
ibm16447049
Manage My Notification Subscriptions