schema.proto 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Copyright 2022 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.v1;
  16. import "google/api/field_behavior.proto";
  17. option cc_enable_arenas = true;
  18. option csharp_namespace = "Google.Cloud.DataCatalog.V1";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog";
  20. option java_multiple_files = true;
  21. option java_package = "com.google.cloud.datacatalog.v1";
  22. option php_namespace = "Google\\Cloud\\DataCatalog\\V1";
  23. option ruby_package = "Google::Cloud::DataCatalog::V1";
  24. // Represents a schema, for example, a BigQuery, GoogleSQL, or Avro schema.
  25. message Schema {
  26. // The unified GoogleSQL-like schema of columns.
  27. //
  28. // The overall maximum number of columns and nested columns is 10,000.
  29. // The maximum nested depth is 15 levels.
  30. repeated ColumnSchema columns = 2;
  31. }
  32. // A column within a schema. Columns can be nested inside
  33. // other columns.
  34. message ColumnSchema {
  35. // Required. Name of the column.
  36. //
  37. // Must be a UTF-8 string without dots (.).
  38. // The maximum size is 64 bytes.
  39. string column = 6 [(google.api.field_behavior) = REQUIRED];
  40. // Required. Type of the column.
  41. //
  42. // Must be a UTF-8 string with the maximum size of 128 bytes.
  43. string type = 1 [(google.api.field_behavior) = REQUIRED];
  44. // Optional. Description of the column. Default value is an empty string.
  45. //
  46. // The description must be a UTF-8 string with the maximum size of 2000
  47. // bytes.
  48. string description = 2 [(google.api.field_behavior) = OPTIONAL];
  49. // Optional. A column's mode indicates whether values in this column are required,
  50. // nullable, or repeated.
  51. //
  52. // Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
  53. // Default mode is `NULLABLE`.
  54. string mode = 3 [(google.api.field_behavior) = OPTIONAL];
  55. // Optional. Schema of sub-columns. A column can have zero or more sub-columns.
  56. repeated ColumnSchema subcolumns = 7 [(google.api.field_behavior) = OPTIONAL];
  57. }