BigQuery Java client throws error message

Problem

BigQuery Java client throws the following error:

java.lang.IllegalArgumentException:No enum constant com.google.cloud.bigquery.TimePartitioning.Type.MONTH

Environment

  • BigQuery
  • Java Client version below 1.119.0

Solution

You must upgrade the client version to at least 1.119.0.

Cause

Helpful resources:
The MONTH partitioning enum is available starting from version 1.119.0, of the BigQuery client library: