Setting up the Looker host for connections
All Oracle ADWC connections require SSL and certificate authentication. In order for Looker to connect to your Oracle ADWC instance, it is necessary to download your Oracle wallet files and install them on the Looker server. If you are a customer-hosted Looker user, you will need a system administrator with access to the Looker server to do this. If you are a Looker-hosted user, reach out to Looker Support.
To install your Oracle wallet on the Looker server:
Download your Oracle wallet to your local computer. You will have a zip file named something like
Wallet_databasename.zip
.On the Looker server, make a directory to hold the wallet zip file:
mkdir /home/looker/looker/credentialsCopy the wallet zip file from your local computer to the Looker server. This example uses
scp
and places the file in/home/looker/looker/credentials
:scp Wallet_databasename.zip username@remotehost:/home/looker/looker/credentialsUnzip the wallet zip file. This example uses the command
unzip
:cd /home/looker/looker/credentials unzip Wallet_databasename.zipVerify the contents of the wallet with the
ls
command. These are the files you should have:ls cwallet.sso keystore.jks sqlnet.ora truststore.jks ewallet.p12 ojdbc.properties tnsnames.ora
Looker connects to Oracle ADWC using Oracle Wallets with the JDBC Thin Driver 18.3. For this, you will need the Transparent Network Substrate (TNS) Alias of the Oracle ADWC Service level for your database and the PATH to your Oracle wallet files.
To get the TNS Alias of your database, run this command:
cat tnsnames.oraThere will be three TNS aliases to choose from:
dbname_high
,dbname_medium
, anddbname_low
. These aliases correspond to different levels of service. The protocol, host, port, service name, and SSL information is included in this file. For this example, we will usedbname_medium
.
Creating a Looker user
First, create a designated Looker user:
Next, give the new Looker user the ability to create sessions:
Finally, give the Looker user the appropriate SELECT
permissions for the data tables you plan to access from Looker. If you want to access additional tables in the future, you will need to grant SELECT
on those new tables as well.
Ensuring Looker can see all tables
Looker may not be able to identify tables (especially empty tables) without first collecting statistics in Oracle. If tables you need do not appear in generated LookML or SQL Runner, execute this command:
For alternative methods, consult your Oracle documentation.
Setting up main database objects
Your Oracle DBA must set up the following objects and permissions on Oracle. The following commands create LOOKER_SESSION
and LOOKER_SQL
as synonyms for V$SESSION
and V$SQL
.
Run the following commands as the root user to complete this setup. These examples assume that the Looker user’s name is LOOKER
.
Setting up symmetric aggregates
Your Oracle DBA must set up the LOOKER_HASH
function to enable symmetric aggregates. The LOOKER_HASH
function is a synonym for the Oracle dbms_crypto.hash
function. The DBA must also create the associated synonym and privileges. The following commands assume that the Looker user’s name is LOOKER
:
Depending on your Oracle database configuration, the
SYS
prefix may beSYSDBA
,ADMIN
, or unnecessary.
Setting up persistent derived tables
In order to enable Persistent Derived Tables, give the Looker user the UNLIMITED TABLESPACE
and CREATE TABLE
permissions. The following commands assume that the Looker user’s name is LOOKER
:
Setting up query killing
To set up query killing, the Oracle DBA must create the LOOKER_KILL_QUERY
procedure as a synonym of ALTER SYSTEM KILL SESSION
. To do this, execute the following command:
The DBA will also need to run these related commands:
Depending on your Oracle database configuration, the
SYS
prefix may beSYSDBA
,ADMIN
, or unnecessary.
Adding the connection
In the Admin section of Looker, select Connections, and then select New Connection.
Fill out the connection details. The majority of these settings are common to most database dialects, and are described on the Connecting Looker to your database documentation page. The following settings are specific to Oracle ADWC or to the example Connections Settings page shown above:
- Dialect: Oracle ADWC.
- Use TNS: Enable Transparent Network Substrate (TNS) connections.
- Host: Hostname or TNS alias. For this example,
dbname_medium
. - Port: Leave as default; Looker will find the port from the
tnsnames.ora
file. - Service Name: Leave blank; Looker will find the service name from the
tnsnames.ora
file. - Username: Database username or Temp Database if PDTs are enabled.
- Password: Database user password.
- Persistent Derived Tables: Check this box to enable persistent derived tables. This reveals additional PDT fields and the PDT Overrides column.
- Temp Database: In Oracle a user is a schema, so this should be specified as the name of the database user. For this example, we would use the temp schema value
LOOKER
. - Additional Params: The PATH to your Oracle wallet on the Looker server. For this example it is
/home/looker/looker/credentials
.- On a Looker-hosted legacy deployment, this value will be
/home/lookerops/looker/credentials
. - On a Looker-hosted deployment in next-generation hosting, this value will be
/app/credentials
.
- On a Looker-hosted legacy deployment, this value will be
- SSL and Verify SSL Cert: You can ignore these fields; Looker will always use SSL with Oracle ADWC.
When you click Test These Settings, Looker will build a JDBC string like this:
jdbc:oracle:thin:@dbname_medium?TNS_ADMIN=/home/looker/looker/credentials
Feature support
For Looker to support some features, your database dialect must also support them.
In Looker 22.6, Oracle Autonomous Data Warehouse on Cloud supports the following Looker features:
Next steps
After you have completed the database configuration, connect to the database from Looker.