import method

Imports entries from a source, such as data previously dumped into a Cloud Storage bucket, into Data Catalog.

Import of entries is a sync operation that reconciles the state of the third-party system with the Data Catalog. ImportEntries accepts source data snapshots of a third-party system. Snapshot should be delivered as a .wire or base65-encoded .txt file containing a sequence of Protocol Buffer messages of DumpItem type. ImportEntries returns a long-running operation resource that can be queried with Operations.GetOperation to return ImportEntriesMetadata and an ImportEntriesResponse message.

request - The metadata request object.

Request parameters:

parent - Required. Target entry group for ingested entries. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/entryGroups/\[^/\]+$.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Operation.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<Operation> import(
  GoogleCloudDatacatalogV1ImportEntriesRequest request,
  core.String parent, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/entries:import';

  final response_ = await _requester.request(
    url_,
    'POST',
    body: body_,
    queryParams: queryParams_,
  );
  return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}