schema.proto 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.datacatalog.v1beta1;
  16. import "google/api/field_behavior.proto";
  17. option cc_enable_arenas = true;
  18. option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog";
  20. option java_multiple_files = true;
  21. option java_package = "com.google.cloud.datacatalog.v1beta1";
  22. option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1";
  23. option ruby_package = "Google::Cloud::DataCatalog::V1beta1";
  24. // Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema).
  25. message Schema {
  26. // Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
  27. // specified.
  28. repeated ColumnSchema columns = 2 [(google.api.field_behavior) = REQUIRED];
  29. }
  30. // Representation of a column within a schema. Columns could be nested inside
  31. // other columns.
  32. message ColumnSchema {
  33. // Required. Name of the column.
  34. string column = 6 [(google.api.field_behavior) = REQUIRED];
  35. // Required. Type of the column.
  36. string type = 1 [(google.api.field_behavior) = REQUIRED];
  37. // Optional. Description of the column. Default value is an empty string.
  38. string description = 2 [(google.api.field_behavior) = OPTIONAL];
  39. // Optional. A column's mode indicates whether the values in this column are required,
  40. // nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
  41. // Default mode is `NULLABLE`.
  42. string mode = 3 [(google.api.field_behavior) = OPTIONAL];
  43. // Optional. Schema of sub-columns. A column can have zero or more sub-columns.
  44. repeated ColumnSchema subcolumns = 7 [(google.api.field_behavior) = OPTIONAL];
  45. }