How do I activate debug logs in my Athena JDBC/ODBC driver?

5 minute read
0

I want to activate debug logs in my Amazon Athena Java Database Connectivity (JDBC)/Open Database Connectivity (ODBC) driver to help me troubleshoot issues.

Resolution

Important: Activate debug logs only for the required amount of time to capture an issue. Logging decreases performance, and might use a large quantity of disk space.

JDBC drivers

You can use JDBC driver versions 2.x and 3.x to connect to Athena. For information about the different parameters for JDBC versions 2.x and 3.x, see Log level.

Activate debug logs for Athena JDBC version 2.x

To activate the debug logs, configure the following properties in your Athena JDBC 2.x driver:

  • For LogLevel, select 5.
  • For UseAwsLogger, select 1.
    Note: With this property, the JDBC driver also logs information from AWS API calls.
  • For LogPath, enter a location on your host machine where you want the driver logs to be captured.

Note: You can also configure similar options in your business intelligence tool to activate debug logs.

Make sure that you restart your JDBC application and then reconnect to the server.

For more information on to log files that are activated, see Configuring logging on the insightsoftware website.

Activate debug logs for Athena JDBC version 3.x

To activate the debug logs, configure the following properties in your Athena JDBC 3.x driver:

  • For LogLevel, select DEBUG.
  • For LogPath, enter a location on your host machine where you want the driver logs to be captured.

Note: You can also configure similar options in your business intelligence tool to activate debug logs.

To make sure that the new settings take effect, restart your JDBC application, and then reconnect to the server.

The Athena JDBC 3.x driver generates log files in the location that's specified in the LogPath property.

ODBC drivers

You can use ODBC driver versions 1.x and 2.x to connect to Athena. For more information and to download ODBC drivers, see Connecting to Amazon Athena with ODBC.

Activate debug logs for Athena ODBC 1.x driver

Download the Athena ODBC 1.x driver for your Windows, Linux, or macOS for your machine.

To activate debug logs for your Windows machine, complete the following steps:

  1. From the Windows Start menu, choose ODBC Data Sources.
  2. In the ODBC Data Source Administrator, choose the System DSN tab.
  3. Choose Add.
  4. From the list of drivers, choose Simba Athena ODBC Driver.
  5. Choose Finish.
    Note: A new wizard opens where you can add information, such as AWS Region, schema, workgroup, Amazon Simple Storage Service (Amazon S3) output location, and AWS Key Management Service (AWS KMS) key.
  6. Choose Logging Options.
    For Log Level, select INFO.
    For Log Path, select a path on your Windows machine.
    Choose OK.

The ODBC driver logs are generated in the log path that you selected.

To activate debug logs in the driver for your Linux or macOS machine, complete the following tasks:

Linux: Edit the /opt/simba/athenaodbc/lib/64/simba.athenaodbc.ini file, and then configure the following properties:

  • For LogLevel, select 5.
  • For LogPath, enter a path to your host.

macOS: Edit the /Library/simba/athenaodbc/lib/simba.athenaodbc.ini file, and then configure the following properties:

  • For LogLevel, select 5.
  • For LogPath, enter a path to your host.

Make sure that you restart your ODBC application and then reconnect to the server.

For more information on to log files that are activated, see Configuring logging options on the insightsoftware website.

Activate debug logs for Athena ODBC 2.x driver

Download the Athena ODBC 2.x driver for your Windows, Linux, or macOS machine. Then, create a data source for your operating system (OS).

To activate debug logs for your Windows machine, complete the following steps:

  1. From the Windows Start menu, choose ODBC Data Sources.
  2. In the ODBC Data Source Administrator, choose your data source name.
  3. Choose Configure, and then choose Logging Options.
  4. Update the following parameters:
    For Log Level, choose log level: 1.
    For Log Path, select a path on your Windows machine.
    (Optional) To activate AWS SDK logs, choose Enable AWS Logger.
  5. Choose OK.

To activate debug logs for your macOS machine, complete the following steps:

  1. Install the ODBC data connector on macOS.
  2. Open the odbc.ini in following location for your processor:
    Intel processor: /opt/athena/odbc/x86_64/ini/
    ARM processor: /opt/athena/odbc/arm64/ini/
  3. Update the following parameters:
    For LogLevel, select 1.
    (Optional) For UseAwsLogger, select 1.
    For LogPath, enter a path to your host.
  4. Use the iodbctest command line tool to verify the connection.

To activate debug logs for Linux machine, complete the following steps:

  1. Install the ODBC data connector on Linux.
  2. Open the /opt/athena/odbc/ini/odbc.ini file.
  3. Update the following parameters:
    For LogLevel, select 1.
    (Optional) For UseAwsLogger, select 1.
    For LogPath, enter a path to your host.
  4. Use the unixODBC isql command line tool to verify the connection.

The ODBC driver logs are generated in the log path that you selected.

Related information

Connecting to Amazon Athena with ODBC and JDBC Drivers

Athena ODBC & JDBC driver on the insightsoftware website

AWS OFFICIAL
AWS OFFICIALUpdated 24 days ago
No comments