1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-11 07:29:40 +00:00
gcloud-help/gcloud/data-catalog/entries/create

219 lines
8.3 KiB
Text
Raw Normal View History

2022-03-01 04:29:52 +00:00
NAME
gcloud data-catalog entries create - create a Data Catalog entry
SYNOPSIS
gcloud data-catalog entries create
(ENTRY : --entry-group=ENTRY_GROUP --location=LOCATION)
([--type=TYPE : --gcs-file-patterns=[GCS_FILE_PATTERNS,...]]
| --user-specified-system=USER_SPECIFIED_SYSTEM
([--user-specified-type=USER_SPECIFIED_TYPE
: --linked-resource=LINKED_RESOURCE
--source-system-create-time=SOURCE_SYSTEM_CREATE_TIME
--source-system-update-time=SOURCE_SYSTEM_UPDATE_TIME]))
[--description=DESCRIPTION] [--display-name=DISPLAY_NAME]
[--schema=[COLUMN_NAME=COLUMN_TYPE,...]
| --schema-from-file=SCHEMA_FROM_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Create a Data Catalog entry.
EXAMPLES
To create an entry for a Google Cloud Storage fileset, run:
2022-03-01 21:43:54 +00:00
$ gcloud data-catalog entries create entry1 --location=us-central1 \
--entry-group=group1 \
2022-03-01 04:29:52 +00:00
--gcs-file-patterns="gs://bucket1/abc/*,gs://bucket1/file1" \
2022-04-13 08:33:42 +00:00
--display-name="analytics data" --type=FILESET
2022-03-01 04:29:52 +00:00
To create an entry for a Google Cloud Storage fileset with an inline
schema, run:
2022-03-01 21:43:54 +00:00
$ gcloud data-catalog entries create entry1 --location=us-central1 \
--entry-group=group1 --gcs-file-patterns="gs://bucket1/*" \
--display-name="sales data" \
2022-03-01 04:29:52 +00:00
--schema="qtr=STRING,sales=FLOAT,year=STRING"
To create an entry for a resource of a custom type, run:
2022-03-01 21:43:54 +00:00
$ gcloud data-catalog entries create entry1 --location=us-central1 \
--entry-group=group1 --display-name="sales data" \
--linked-resource="www.resource.com" \
--user-specified-type="type_name" \
--user-specified-system="system_name"
2022-03-01 04:29:52 +00:00
To create an entry for a Google Cloud Storage fileset with a schema from a
file, run:
2022-03-01 21:43:54 +00:00
$ gcloud data-catalog entries create entry1 --location=us-central1 \
--entry-group=group1 --gcs-file-patterns="gs://bucket1/*" \
--display-name="sales data" \
2022-03-01 04:29:52 +00:00
--schema-from-file=/tmp/schema.json --type=FILESET
POSITIONAL ARGUMENTS
Entry resource - Entry to create. The arguments in this group can be used
to specify the attributes of this resource. (NOTE) Some attributes are not
2023-05-04 10:43:54 +00:00
given arguments in this group but can be set in other ways.
To set the project attribute:
2022-03-01 04:29:52 +00:00
◆ provide the argument entry on the command line with a fully specified
name;
◆ set the property core/project;
◆ provide the argument --project on the command line.
This must be specified.
ENTRY
2023-05-04 10:43:54 +00:00
ID of the entry or fully qualified identifier for the entry.
To set the entry attribute:
2022-03-01 04:29:52 +00:00
▸ provide the argument entry on the command line.
2022-08-10 08:48:58 +00:00
This positional argument must be specified if any of the other
arguments in this group are specified.
2022-03-01 04:29:52 +00:00
--entry-group=ENTRY_GROUP
Entry group of the entry.
To set the entry-group attribute:
▸ provide the argument entry on the command line with a fully
specified name;
▸ provide the argument --entry-group on the command line.
--location=LOCATION
Location of the entry.
To set the location attribute:
▸ provide the argument entry on the command line with a fully
specified name;
▸ provide the argument --location on the command line.
REQUIRED FLAGS
Types can either be specified as a built-in type or described as a custom
type.
Exactly one of these must be specified:
Built-in type can be specified for an entry. For types FILESET, a file
pattern must be specified.
--type=TYPE
2023-01-19 00:56:33 +00:00
Type of the entry. TYPE must be one of: cluster, dashboard,
database, database-schema, data-source-connection, data-stream,
entry-type-unspecified, explore, fileset, lake, look, model,
routine, service, table, zone.
2022-03-01 04:29:52 +00:00
2022-08-10 08:48:58 +00:00
This flag argument must be specified if any of the other arguments
in this group are specified.
2022-03-01 04:29:52 +00:00
--gcs-file-patterns=[GCS_FILE_PATTERNS,...]
Patterns to identify a set of files in Google Cloud Storage. A star
(*) may be used at the end of a pattern to match arbitrary files
beginning with that pattern.
Examples of valid file patterns:
▫ gs://bucket_name/* - Matches all files in 'bucket_name'.
▫ gs://bucket_name/file* - Matches files prefixed by 'file' in
'bucket_name'.
▫ gs://another_bucket/a.txt - Matches
'gs://another_bucket/a.txt'.
--user-specified-system=USER_SPECIFIED_SYSTEM
External system from which the entry is fed. If --type is not used,
then --user-specified-system must be provided.
2022-08-10 08:48:58 +00:00
This flag argument must be specified if any of the other arguments in
this group are specified.
2022-03-01 04:29:52 +00:00
Exactly one of these must be specified:
For externally ingested resources, --user-specified-type and
--user-specified-system are required. Linked resource and source
system time stamps are optional.
--user-specified-type=USER_SPECIFIED_TYPE
Type of the entry coming from external system. If --type is not
used, then --user-specified-type must be provided.
2022-08-10 08:48:58 +00:00
This flag argument must be specified if any of the other
arguments in this group are specified.
2022-03-01 04:29:52 +00:00
--linked-resource=LINKED_RESOURCE
Link to the resource in external system. If --type is not used,
then --linked-resource may be provided.
--source-system-create-time=SOURCE_SYSTEM_CREATE_TIME
Creation timestamp of the resource in the external system. If
--type is not used, then --source-system-create-time may be
provided.
--source-system-update-time=SOURCE_SYSTEM_UPDATE_TIME
Update timestamp of the resource in the external system. If
--type is not used, then --source-system-update-time may be
provided.
OPTIONAL FLAGS
--description=DESCRIPTION
Textual description of the entry.
--display-name=DISPLAY_NAME
Human-readable name for the entry.
Column schema for the entry. A schema consists of a list of column names
along with their types, descriptions, modes, and nested subcolumns. For
example:
- column: first_name
description: First name
mode: REQUIRED
type: STRING
- column: last_name
description: Last name
mode: REQUIRED
type: STRING
- column: addresses
description: Addresses
mode: REPEATED
type: RECORD
subcolumns:
- column: city
description: City
mode: NULLABLE
type: STRING
- column: state
description: State
mode: NULLABLE
type: STRING
2023-05-04 10:43:54 +00:00
At most one of these can be specified:
2022-03-01 04:29:52 +00:00
2023-05-04 10:43:54 +00:00
--schema=[COLUMN_NAME=COLUMN_TYPE,...]
Inline schema for the entry. When specifying a schema via this
argument, only column names and types should be provided. Column
modes will default to NULLABLE, and column descriptions and nested
subcolumns are not supported.
2022-03-01 04:29:52 +00:00
2023-05-04 10:43:54 +00:00
--schema-from-file=SCHEMA_FROM_FILE
Path to a JSON or YAML file containing the schema for the entry. This
can be used to specify schemas with column descriptions, column modes
other than NULLABLE, and nested subcolumns.
2022-03-01 04:29:52 +00:00
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
API REFERENCE
This command uses the datacatalog/v1 API. The full documentation for this
API can be found at: https://cloud.google.com/data-catalog/docs/
NOTES
These variants are also available:
$ gcloud alpha data-catalog entries create
$ gcloud beta data-catalog entries create