17 Set Up Data Sources on Linux
Most repository development is performed on Windows, because the Model Administration Tool runs only on Windows. When you move to a production system, however, you can choose to run the Oracle BI Server on a Linux platform.
This chapter contains the following topics:
Settings for Data Source Connections Using Native Gateways
Learn about the environment variable settings that you must configure for Oracle Database using native gateways.
For Oracle Database:
-
The Oracle BI Server uses the Oracle Call Interface (OCI) to connect to the database. OCI is installed by default with Oracle Analytics Server. You must use the bundled version to connect.
-
In the
tnsnames.orafile, the Oracle Database alias, the defined entry name, must match the Data Source Name used in the repository connection pools of all physical Oracle databases.When connecting to an Oracle Database data source, you can include the entire connect string, or you can use the net service name defined in the
tnsnames.orafile. If you choose to enter only the net service name, you must set up atnsnames.orafile in the following location within the environment, so that the Oracle Analytics Server can locate the entry:BI_DOMAIN/bidata/components/core/serviceinstances/ssi/oracledb -
Edit the
obis.propertiesfile to set environment variables for the database client.
Sample obis.properties Entries for Oracle Database
This example shows sample entries in obis.properties for Oracle Database on various platforms.
The shell script excerpts shown are examples only and aren't recommendations for particular software platforms. See Configure Data Source Connections Using Native Gateways.
############################################################### # Linux: Oracle BI 32 bit mode ################################################################ #set +u # Oracle Parameters #--------------------------- # Make sure that Oracle DB 32 bit Client is installed #ORACLE_HOME=/export/home/oracle/12c #export ORACLE_HOME #TNS_ADMIN=$ORACLE_HOME/network/admin #export TNS_ADMIN #PATH=$ORACLE_HOME/bin:/opt/bin:$PATH #export PATH #LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH #export LD_LIBRARY_PATH # If you have Linux 64 bit Platform, and would like to run Oracle BI 32 bit # then you must install Oracle DB 64 bit client, and this client comes with # 32 bit libraries under $ORACLE_HOME/lib32. The LD_LIBRARY_PATH in this case # shall be like this: #LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$LD_LIBRARY_PATH #export LD_LIBRARY_PATH # Oracle Parameters #--------------------------- # Make sure to install Oracle DB 64 bit Client #ORACLE_HOME=/export/home/oracle/12c #export ORACLE_HOME #TNS_ADMIN=$ORACLE_HOME/network/admin #export TNS_ADMIN #PATH=$ORACLE_HOME/bin:/opt/bin:$PATH #export PATH #LD_LIBRARY_PATH_64=$ORACLE_HOME/lib:$LD_LIBRARY_PATH_64:/opt/j2se/jre/lib/sparc #export LD_LIBRARY_PATH_64 #--------------------------- # Oracle Parameters #--------------------------- #ORACLE_HOME=/export/home/oracle12c #export ORACLE_HOME #TNS_ADMIN=$ORACLE_HOME/network/admin #export TNS_ADMIN #PATH=$ORACLE_HOME/bin:/opt/bin:$PATH #export PATH #SHLIB_PATH=$ORACLE_HOME/lib:$SHLIB_PATH:/opt/j2se/jre/lib/hp700 #export SHLIB_PATH #--------------------------- ############################################################### # AIX: Oracle BI 64 bit mode ############################################################### #set +u # Oracle Parameters #--------------------------- #ORACLE_HOME=/export/home/oracle/12c #export ORACLE_HOME #TNS_ADMIN=$ORACLE_HOME/network/admin #export TNS_ADMIN #PATH=$ORACLE_HOME/bin:/opt/bin:$PATH #export PATH #LIBPATH=$ORACLE_HOME/lib:$LIBPATH:/opt/j2se/jre/lib/sparc #export LIBPATH #---------------------------
Use DataDirect Connect ODBC Drivers on Linux
Oracle Analytics Server provides DataDirect Connect ODBC drivers and driver managers for Linux operating systems for connectivity to MySQL, Sybase ASE, Informix, Hive, and Impala databases.
Amazon Redshift data sources are also supported. You need to use the Amazon Redshift ODBC driver available from Amazon Web Services. Configure the Amazon Redshift data source using the steps documented for other data sources.
The DataDirect drivers are installed in the Oracle Analytics Server installation process. You can find the DataDirect Connect ODBC drivers in the MW_HOME/bi/modules/oracle.bi.datadirect.odbc/7.1.6/lib directory.
You don't need to set the ODBCINI environment variable to set up the DataDirect Connect ODBC drivers. This variable is set automatically during installation.
Configure Oracle Analytics Server to Use DataDirect
When you install Oracle Analytics Server, the required DataDirect 7.1.6 drivers are installed and automatically configured.
You can define the default settings in the obis.properties and odbc.ini files.
You need to modify your existing database configurations to use the DataDirect drivers. For information about modifying your existing database configuration, see the following procedures:
- Configure the DataDirect Connect ODBC Driver for DB2 Database
-
Configure the DataDirect Connect ODBC Driver for MySQL Database
-
Configure the DataDirect Connect ODBC Driver for Sybase ASE Database
-
Configure the DataDirect Connect ODBC Driver for Informix Database
-
Configure the DataDirect Connect ODBC Driver for Cloudera Impala Database
-
Configure the DataDirect Connect ODBC Driver for Apache Hive Database
Configure the DataDirect Connect ODBC Driver for DB2 Database
Use these steps to connect to a DB2 database.
The name of the DataDirect ODBC driver file to connect to a MySQL database is ARdb227.so.
Configure the DataDirect Connect ODBC Driver for MySQL Database
Use these steps to connect to a MySQL database.
The name of the DataDirect ODBC driver file to connect to a MySQL database is ARmysql27.so.
Configure the DataDirect Connect ODBC Driver for Sybase ASE Database
The name of the DataDirect ODBC driver file to connect to a Sybase ASE database is ARase27.so.
Configure the DataDirect Connect ODBC Driver for Informix Database
Use these steps to configure the DataDirect ODBC driver file to connect to an Informix database. The file to use is ARifcl27.so.
Configure the DataDirect Connect ODBC Driver for Cloudera Impala Database
The DataDirect ODBC driver file name, to connect to a Cloudera Impala database is ARimpala27.so.
Configure Impala 1.3.x to Include a LIMIT Clause
Impala 1.3.x requires that queries with an ORDER BY clause contain a LIMIT clause.
There are three methods to specify this clause in the configuration. Oracle recommends using the Modify the Impala daemon's default query options method. For the second and third methods, see Modify the Impala DefaultOrderByLimit Alternate Methods.
Specifying a default order by limit using any of the following methods returns a maximum of 2,000,000 rows for queries with an ORDER by clause.
If you specify the LIMIT clause using the Modify the Impala daemon's default query options method, and your queries include an ORDER BY clause, then Impala returns a maximum of 2,000,000 rows. If this limit is exceeded, then Impala throws an exception.
For queries over 2,000,000 rows, specify a higher default_order_by_limit value.
You can also specify the Default Order By Limit by using the client instead of the Impala server.
Use this method if you don’t have rights to modify the Impala daemon using the previous methods. If you use this method, then Impala silently truncates your value to 2,000,000 rows.
Modify the Impala DefaultOrderByLimit Alternate Methods
Use the first DefaultOrderByLimit option if your Impala environment isn't managed by Cloudera Manager. Use the second DefaultOrderByLimit option if you don't have rights to modify the Impala daemon.
Modify the Impala Daemon's Default Query Options Without Cloudera Manager
If your environment is managed by Cloudera Manager and you've the required permissions, use DefaultOrderByLimit, the recommended method for updating the Impala daemon. See Configure Impala 1.3.x to Include a LIMIT Clause.
If your Impala environment isn't managed by Cloudera Manager, use the Impala product documentation to help you modify the LIMIT clause. See “Configuring Impala Startup Options Through the Command Line” in the CDH 5 Installation Guide.
If you specify the LIMIT clause using this method and your queries include an ORDER BY clause, then Impala returns a maximum of 2,000,000 rows. If this limit is exceeded, then Impala throws an exception.
-
After completing the steps in the Configuring Impala Startup Options Through the Command Line task, add the following entry in
IMPALA_SERVER_ARGS:-default_query_options 'default_order_by_limit=2000000;abort_on_default_limit_exceeded=true'
Modify the DefaultOrderByLimit Parameter in the odbc.ini Impala DSN Entry
Use this method if you don't have rights to modify the Impala daemon using the previous methods. If you use this method, then Impala silently truncates your value to 2,000,000 rows.
If you need your query to return more than 2,000,000 rows, then specify a higher DefaultOrderByLimit parameter value.
You can specify the Default Order By Limit using the client instead of the Impala server.
- Open the
odbc.inifile from theBI_DOMAIN/config/fmwconfig/bienv/coredirectory. - Locate the Impala_DB database entry, and then locate the
DefaultOrderByLimitparameter. - Update the value to 2000000, for example,
DefaultOrderByLimit=2000000. - Save and close the
odbc.inifile.