Query timeout with JDBC connector

Problem

You are attempting a query over a JDBC connector when you get a timeout error.

DROP TABLE IF EXISTS `la_ods`.`zau1pf`
Handling new table 'la_ods'.'ZAU1PF' failed
Failed to drop table la_ods.ZAU1PF.
RetCode: SQL_ERROR SqlState: HYT00 NativeError: 72 Message: [Simba][Hardy] (72) Query execution timeout expired.
Failed (retcode -1) to execute statement: 'DROP TABLE IF EXISTS `la_ods`.`zau1pf` '

Cause

The operation is processing a large amount of data and it does not complete before the JDBC connection times out.

Solution

You can set the ConnectionTimeout option in the JDBC URL configuration to a value that is large enough for the operation to complete.

ConnectionTimeout is measured in seconds.

In this example, the timeout is set to 90 seconds.

jdbc:spark://<server-hostname>:443/default;transportMode=http;ssl=1;httpPath=sql/protocolv1/o/0/xxxx-xxxxxx-xxxxxxxx;AuthMech=3;UID=token;PWD=<personal-access-token>;ConnectionTimeout=90