| // Copyright 2017 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| package tabledef; |
| |
| message TableDef { |
| // Name of the dataset. |
| string dataset_id = 1; |
| // Name of the table. |
| string table_id = 2; |
| // Human-readable name of the table. (optional) |
| string name = 3; |
| // Human-readable description of the table. (optional) |
| string description = 4; |
| repeated FieldSchema fields = 5; |
| // Whether to partition the table by day. |
| bool partition_table = 6; |
| // The lifetime for each partition. If zero, partitions do not expire. |
| // Ignored if partition_table is false. (optional) |
| int64 partition_expiration_seconds = 7; |
| } |
| |
| enum Type { |
| STRING = 0; |
| BYTES = 1; |
| INTEGER = 2; |
| FLOAT = 3; |
| BOOLEAN = 4; |
| TIMESTAMP = 5; |
| RECORD = 6; |
| DATE = 7; |
| TIME = 8; |
| DATETIME = 9; |
| } |
| |
| message FieldSchema { |
| // Name of the field/column. |
| string name = 1; |
| // Human-readable description of the field. (optional) |
| string description = 2; |
| bool is_repeated = 3; |
| bool is_required = 4; |
| Type type = 5; |
| repeated FieldSchema schema = 6; |
| } |