All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala.googleapis.bigquery.PartitioningDefinition.scala Maven / Gradle / Ivy

There is a newer version: 0.4.5-v2-20240905
Show newest version
package googleapis.bigquery

import io.circe._
import io.circe.syntax._

final case class PartitioningDefinition(
    /** Optional. Details about each partitioning column. This field is output only for all partitioning types other than metastore partitioned tables. BigQuery native tables only support 1 partitioning column. Other table types may support 0, 1 or more partitioning columns. For metastore partitioned tables, the order must match the definition order in the Hive Metastore, where it must match the physical layout of the table. For example, CREATE TABLE a_table(id BIGINT, name STRING) PARTITIONED BY (city STRING, state STRING). In this case the values must be ['city', 'state'] in that order.
      */
    partitionedColumn: Option[List[PartitionedColumn]] = None
)
object PartitioningDefinition {
  implicit val encoder: Encoder[PartitioningDefinition] = Encoder.instance { x =>
    Json.obj("partitionedColumn" := x.partitionedColumn)
  }
  implicit val decoder: Decoder[
    PartitioningDefinition
  ] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[List[PartitionedColumn]]]("partitionedColumn")
    } yield PartitioningDefinition(v0)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy