com.pulumi.gcp.bigquery.kotlin.outputs.TableExternalDataConfigurationHivePartitioningOptions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.bigquery.kotlin.outputs
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
/**
*
* @property mode When set, what mode of hive partitioning to use when
* reading data. The following modes are supported.
* * AUTO: automatically infer partition key name(s) and type(s).
* * STRINGS: automatically infer partition key name(s). All types are
* Not all storage formats support hive partitioning. Requesting hive
* partitioning on an unsupported format will lead to an error.
* Currently supported formats are: JSON, CSV, ORC, Avro and Parquet.
* * CUSTOM: when set to `CUSTOM`, you must encode the partition key schema within the `source_uri_prefix` by setting `source_uri_prefix` to `gs://bucket/path_to_table/{key1:TYPE1}/{key2:TYPE2}/{key3:TYPE3}`.
* @property requirePartitionFilter If set to true, queries over this table
* require a partition filter that can be used for partition elimination to be
* specified.
* @property sourceUriPrefix When hive partition detection is requested,
* a common for all source uris must be required. The prefix must end immediately
* before the partition key encoding begins. For example, consider files following
* this data layout. `gs://bucket/path_to_table/dt=2019-06-01/country=USA/id=7/file.avro`
* `gs://bucket/path_to_table/dt=2019-05-31/country=CA/id=3/file.avro` When hive
* partitioning is requested with either AUTO or STRINGS detection, the common prefix
* can be either of `gs://bucket/path_to_table` or `gs://bucket/path_to_table/`.
* Note that when `mode` is set to `CUSTOM`, you must encode the partition key schema within the `source_uri_prefix` by setting `source_uri_prefix` to `gs://bucket/path_to_table/{key1:TYPE1}/{key2:TYPE2}/{key3:TYPE3}`.
*/
public data class TableExternalDataConfigurationHivePartitioningOptions(
public val mode: String? = null,
public val requirePartitionFilter: Boolean? = null,
public val sourceUriPrefix: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.gcp.bigquery.outputs.TableExternalDataConfigurationHivePartitioningOptions): TableExternalDataConfigurationHivePartitioningOptions =
TableExternalDataConfigurationHivePartitioningOptions(
mode = javaType.mode().map({ args0 -> args0 }).orElse(null),
requirePartitionFilter = javaType.requirePartitionFilter().map({ args0 -> args0 }).orElse(null),
sourceUriPrefix = javaType.sourceUriPrefix().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy