Google Cloud Data Catalog API . entries

Instance Methods

lookup(linkedResource=None, sqlResource=None, x__xgafv=None)

Get an entry by target resource name. This method allows clients to use

Method Details

lookup(linkedResource=None, sqlResource=None, x__xgafv=None)
Get an entry by target resource name. This method allows clients to use
the resource name from the source Google Cloud Platform service to get the
Data Catalog Entry.

Args:
  linkedResource: string, The full name of the Google Cloud Platform resource the Data Catalog
entry represents. See:
https://cloud.google.com/apis/design/resource_names#full_resource_name.
Full names are case-sensitive.

Examples:

 * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
 * //pubsub.googleapis.com/projects/projectId/topics/topicId
  sqlResource: string, The SQL name of the entry. SQL names are case-sensitive.

Examples:

  * `pubsub.project_id.topic_id`
  * ``pubsub.project_id.`topic.id.with.dots` ``
  * `bigquery.table.project_id.dataset_id.table_id`
  * `bigquery.dataset.project_id.dataset_id`
  * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`

`*_id`s shoud satisfy the standard SQL rules for identifiers.
https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Entry Metadata.
      # A Data Catalog Entry resource represents another resource in Google
      # Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic), or
      # outside of Google Cloud Platform. Clients can use the `linked_resource` field
      # in the Entry resource to refer to the original resource ID of the source
      # system.
      #
      # An Entry resource contains resource details, such as its schema. An Entry can
      # also be used to attach flexible metadata, such as a
      # Tag.
    "name": "A String", # The Data Catalog resource name of the entry in URL format. Example:
        #
        # * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
        #
        # Note that this Entry and its child resources may not actually be stored in
        # the location in this name.
    "gcsFilesetSpec": { # Describes a Cloud Storage fileset entry. # Specification that applies to a Cloud Storage fileset. This is only valid
        # on entries of type FILESET.
      "sampleGcsFileSpecs": [ # Output only. Sample files contained in this fileset, not all files contained in this
          # fileset are represented here.
        { # Specifications of a single file in Cloud Storage.
          "gcsTimestamps": { # Timestamps about this resource according to a particular system. # Output only. Timestamps about the Cloud Storage file.
            "expireTime": "A String", # Output only. The expiration time of the resource within the given system.
                # Currently only apllicable to BigQuery resources.
            "updateTime": "A String", # The last-modified time of the resource within the given system.
            "createTime": "A String", # The creation time of the resource within the given system.
          },
          "filePath": "A String", # Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
          "sizeBytes": "A String", # Output only. The size of the file, in bytes.
        },
      ],
      "filePatterns": [ # Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
          # Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
          # more information. Note that bucket wildcards are currently not supported.
          #
          # Examples of valid file_patterns:
          #
          #  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
          #                              directory.
          #  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
          #                               spanning all subdirectories.
          #  * `gs://bucket_name/file*`: matches files prefixed by `file` in
          #                              `bucket_name`
          #  * `gs://bucket_name/??.txt`: matches files with two characters followed by
          #                               `.txt` in `bucket_name`
          #  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
          #                                    vowel character followed by `.txt` in
          #                                    `bucket_name`
          #  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
          #                                  or `m` followed by `.txt` in `bucket_name`
          #  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
          #                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
          #  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
          #
          # You can combine wildcards to provide more powerful matches, for example:
          #
          #  * `gs://bucket_name/[a-m]??.j*g`
        "A String",
      ],
    },
    "schema": { # Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). # Schema of the entry. An entry might not have any schema attached to it.
      "columns": [ # Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
          # specified.
        { # Representation of a column within a schema. Columns could be nested inside
            # other columns.
          "description": "A String", # Optional. Description of the column. Default value is an empty string.
          "subcolumns": [ # Optional. Schema of sub-columns. A column can have zero or more sub-columns.
            # Object with schema name: GoogleCloudDatacatalogV1beta1ColumnSchema
          ],
          "type": "A String", # Required. Type of the column.
          "column": "A String", # Required. Name of the column.
          "mode": "A String", # Optional. A column's mode indicates whether the values in this column are required,
              # nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
              # Default mode is `NULLABLE`.
        },
      ],
    },
    "userSpecifiedType": "A String", # Entry type if it does not fit any of the input-allowed values listed in
        # `EntryType` enum above. When creating an entry, users should check the
        # enum values first, if nothing matches the entry to be created, then
        # provide a custom value, for example "my_special_type".
        # `user_specified_type` strings must begin with a letter or underscore and
        # can only contain letters, numbers, and underscores; are case insensitive;
        # must be at least 1 character and at most 64 characters long.
        #
        # Currently, only FILESET enum value is allowed. All other entries created
        # through Data Catalog must use `user_specified_type`.
    "displayName": "A String", # Display information such as title and description. A short name to identify
        # the entry, for example, "Analytics Data - Jan 2011". Default value is an
        # empty string.
    "bigqueryDateShardedSpec": { # Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. # Specification for a group of BigQuery tables with name pattern
        # `[prefix]YYYYMMDD`. Context:
        # https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
        # Context:
        # https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding
      "tablePrefix": "A String", # Output only. The table name prefix of the shards. The name of any given shard is
          # `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
          # `table_prefix` is `MyTable`.
      "shardCount": "A String", # Output only. Total number of shards.
      "dataset": "A String", # Output only. The Data Catalog resource name of the dataset entry the current table
          # belongs to, for example,
          # `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
    },
    "bigqueryTableSpec": { # Describes a BigQuery table. # Specification that applies to a BigQuery table. This is only valid on
        # entries of type `TABLE`.
      "tableSpec": { # Normal BigQuery table spec. # Spec of a BigQuery table. This field should only be populated if
          # `table_source_type` is `BIGQUERY_TABLE`.
        "groupedEntry": "A String", # Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`,
            # `grouped_entry` is the Data Catalog resource name of the date sharded
            # grouped entry, for example,
            # `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
            # Otherwise, `grouped_entry` is empty.
      },
      "tableSourceType": "A String", # Output only. The table source type.
      "viewSpec": { # Table view specification. # Table view specification. This field should only be populated if
          # `table_source_type` is `BIGQUERY_VIEW`.
        "viewQuery": "A String", # Output only. The query that defines the table view.
      },
    },
    "type": "A String", # The type of the entry.
        # Only used for Entries with types in the EntryType enum.
    "description": "A String", # Entry description, which can consist of several sentences or paragraphs
        # that describe entry contents. Default value is an empty string.
    "sourceSystemTimestamps": { # Timestamps about this resource according to a particular system. # Output only. Timestamps about the underlying resource, not about this Data Catalog
        # entry. Output only when Entry is of type in the EntryType enum. For entries
        # with user_specified_type, this field is optional and defaults to an empty
        # timestamp.
      "expireTime": "A String", # Output only. The expiration time of the resource within the given system.
          # Currently only apllicable to BigQuery resources.
      "updateTime": "A String", # The last-modified time of the resource within the given system.
      "createTime": "A String", # The creation time of the resource within the given system.
    },
    "userSpecifiedSystem": "A String", # This field indicates the entry's source system that Data Catalog does not
        # integrate with. `user_specified_system` strings must begin with a letter
        # or underscore and can only contain letters, numbers, and underscores; are
        # case insensitive; must be at least 1 character and at most 64 characters
        # long.
    "integratedSystem": "A String", # Output only. This field indicates the entry's source system that Data Catalog
        # integrates with, such as BigQuery or Pub/Sub.
    "linkedResource": "A String", # The resource this metadata entry refers to.
        #
        # For Google Cloud Platform resources, `linked_resource` is the [full name of
        # the
        # resource](https://cloud.google.com/apis/design/resource_names#full_resource_name).
        # For example, the `linked_resource` for a table resource from BigQuery is:
        #
        # * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
        #
        # Output only when Entry is of type in the EntryType enum. For entries with
        # user_specified_type, this field is optional and defaults to an empty
        # string.
  }