Package io.squashql

Class BigQueryUtil

java.lang.Object
io.squashql.BigQueryUtil

public final class BigQueryUtil extends Object
  • Field Details

    • OBJECT_NULL_VALUE

      public static final String OBJECT_NULL_VALUE
      See usage to understand why it exists, but basically it is due to the lack of grouping function.
      See Also:
    • INTEGER_NULL_VALUE

      public static final int INTEGER_NULL_VALUE
      See Also:
    • LONG_NULL_VALUE

      public static final long LONG_NULL_VALUE
      See Also:
  • Method Details

    • bigQueryTypeToClass

      public static Class<?> bigQueryTypeToClass(com.google.cloud.bigquery.LegacySQLTypeName dataType)
    • classToBigQueryType

      public static com.google.cloud.bigquery.StandardSQLTypeName classToBigQueryType(Class<?> clazz)
    • getNullValue

      public static Object getNullValue(Class<?> fieldType)
    • createCredentialsFromFile

      public static com.google.auth.oauth2.ServiceAccountCredentials createCredentialsFromFile(String path)
      Creates ServiceAccountCredentials from a file. See https://cloud.google.com/bigquery/docs/authentication/service-account-file
      Parameters:
      path - path to the service account key file.
      Returns:
      the ServiceAccountCredentials
    • createCredentialsFromFileContent

      public static com.google.auth.oauth2.ServiceAccountCredentials createCredentialsFromFileContent(String jsonKey)