data_source.proto 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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_outer_classname = "DataSourceProto";
  22. option java_package = "com.google.cloud.datacatalog.v1";
  23. option php_namespace = "Google\\Cloud\\DataCatalog\\V1";
  24. option ruby_package = "Google::Cloud::DataCatalog::V1";
  25. // Physical location of an entry.
  26. message DataSource {
  27. // Name of a service that stores the data.
  28. enum Service {
  29. // Default unknown service.
  30. SERVICE_UNSPECIFIED = 0;
  31. // Google Cloud Storage service.
  32. CLOUD_STORAGE = 1;
  33. // BigQuery service.
  34. BIGQUERY = 2;
  35. }
  36. // Service that physically stores the data.
  37. Service service = 1;
  38. // Full name of a resource as defined by the service. For example:
  39. //
  40. // `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}`
  41. string resource = 2;
  42. // Output only. Data Catalog entry name, if applicable.
  43. string source_entry = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  44. oneof properties {
  45. // Detailed properties of the underlying storage.
  46. StorageProperties storage_properties = 4;
  47. }
  48. }
  49. // Details the properties of the underlying storage.
  50. message StorageProperties {
  51. // Patterns to identify a set of files for this fileset.
  52. //
  53. // Examples of a valid `file_pattern`:
  54. //
  55. // * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir`
  56. // directory
  57. // * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir`
  58. // and all subdirectories recursively
  59. // * `gs://bucket_name/file*`: matches files prefixed by `file` in
  60. // `bucket_name`
  61. // * `gs://bucket_name/??.txt`: matches files with two characters followed by
  62. // `.txt` in `bucket_name`
  63. // * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
  64. // vowel character followed by `.txt` in
  65. // `bucket_name`
  66. // * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
  67. // or `m` followed by `.txt` in `bucket_name`
  68. // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
  69. // the `a/*/b` pattern, such as `a/c/b`, `a/d/b`
  70. // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
  71. repeated string file_pattern = 1;
  72. // File type in MIME format, for example, `text/plain`.
  73. string file_type = 2;
  74. }