Dataplex Universal Catalog에서 리소스 검색

이 문서에서는 Dataplex Universal Catalog를 사용하여 BigQuery 데이터 세트, Cloud SQL 인스턴스, 기타 지원되는 소스와 같은 리소스를 검색하는 방법을 설명합니다. 분산된 데이터 소스를 중앙에 배치하면 회사 데이터를 카탈로그화, 분류, 관리하고 회사 데이터에 대한 액세스 권한을 제어할 수 있습니다.

Dataplex Universal Catalog는 두 가지 검색 모드를 제공합니다.

  • 키워드 검색을 사용하면 특정 키워드, 필터, 정의된 구문을 사용하여 리소스를 찾을 수 있습니다.
  • 자연어 검색은 AI를 활용하여 시맨틱 쿼리를 지원합니다. 일상적인 언어를 사용하여 리소스를 찾을 수 있으므로 복잡한 구문이 필요 없습니다.

검색 범위

Dataplex Universal Catalog의 검색 결과는 소스 시스템에서 개발자가 가진 해당 리소스에 대한 권한을 준수합니다.

예를 들어 객체에 대한 BigQuery 메타데이터 읽기 액세스 권한이 있으면 해당 객체가 Dataplex Universal Catalog 검색 결과에 표시됩니다. BigQuery 테이블에 대한 액세스 권한이 있지만 이 테이블이 포함된 데이터 세트에 대한 액세스 권한이 없어도 예상대로 테이블이 Dataplex Universal Catalog 검색에 표시됩니다.

기본적으로 검색 범위는 조직으로 지정됩니다. 결과에는 검색 중인 프로젝트와 동일한 조직의 리소스만 포함됩니다.

검색 결과에는 검색이 수행되는 프로젝트와 동일한 VPC-SC 경계에 속하는 리소스만 포함됩니다.Google Cloud 콘솔을 사용하는 경우 콘솔에서 선택한 프로젝트입니다.

프로젝트의 VPC 서비스 제어 경계에 있는 리소스 이상으로 검색 결과 범위를 확장하려면 VPC 서비스 제어 인그레스 및 이그레스 규칙을 사용합니다. 이러한 규칙은 조직 전반에서 효율적인 비공개 데이터 교환을 용이하게 합니다.Google Cloud 콘솔을 사용하거나 JSON 또는 YAML 파일을 통해 인그레스 및 이그레스 규칙을 구성할 수 있습니다. 다음 YAML 예시와 VPC 서비스 제어 문서를 참조하여 특정 요구사항에 맞게 규칙을 맞춤설정합니다.

egressPolicies:
  - egressFrom:
      identityType: ANY_USER_ACCOUNT
    egressTo:
      # Specify which resources should be present in the search results. In this example,
      # BigQuery.
      operations:
      - methodSelectors:
        - method: '*'
        serviceName: bigquery.googleapis.com
      # Specify project ids under which the search is performed.
      resources:
      - projects/SEARCH_PROJECT_ID
ingressPolicies:
  - ingressFrom:
      identityType: ANY_USER_ACCOUNT
      sources:
      - accessLevel: '*'
    ingressTo:
      # Specify which resources should be present in the search results. In this example,
      # BigQuery.
      operations:
      - methodSelectors:
        - method: '*'
        serviceName: bigquery.googleapis.com
      # Specify project ids to expose in search results.
      resources:
      - projects/INGRESS_PROJECT_ID

Dataplex Universal Catalog 검색을 사용하는 데 필요한 Identity and Access Management 역할에 대한 자세한 내용은 Dataplex Universal Catalog IAM 역할을 참조하세요.

VPC 서비스 제어를 사용하여 환경별로 검색 결과 격리

개발, 테스트, 프로덕션과 같은 환경 간에 Dataplex Universal Catalog 검색 결과를 격리하려면 환경마다 별도의 VPC 서비스 제어 경계를 구성합니다. 데이터 애셋이 포함된 프로젝트와 검색을 수행하는 데 사용되는 프로젝트 모두 해당 환경의 경계에 할당합니다. 특정 경계에 있는 프로젝트에서 수행되는 검색은 같은 경계에 있는 애셋의 결과만 반환합니다.

검색에서 재현율 제한

Dataplex Universal Catalog 검색어는 전체 재현율을 보장하지 않습니다. 쿼리와 일치하는 결과가 반환되지 않을 수 있습니다. 또한 검색어를 반복하면 반환된 결과와 반환되지 않은 결과가 달라질 수 있습니다.

모든 Dataplex Universal Catalog 메타데이터를 쿼리하려면 메타데이터를 Cloud Storage로 내보낸 후 BigQuery에서 쿼리하면 됩니다. 자세한 내용은 메타데이터 내보내기를 참조하세요.

필터

필터를 사용하면 검색 결과 범위를 좁힐 수 있습니다. 필터를 키워드 검색과 자연어 검색 모두에서 사용할 수 있지만 사용 가능한 옵션은 모드에 따라 약간 다를 수 있습니다.

여러 섹션에 필터를 제공하면 필터는 AND 논리 연산자를 통해 평가됩니다. 검색 결과에는 선택한 모든 섹션에서 조건 최소 하나 이상과 일치하는 리소스가 포함됩니다. 예를 들어 BigQuery 시스템과 데이터 세트 리소스 유형을 선택하면 검색 결과에 BigQuery 데이터 세트가 포함되지만 Vertex AI 데이터 세트는 포함되지 않습니다.

단일 섹션 내에서 필터를 여러 개 선택하면 필터는 OR 논리 연산자를 통해 평가됩니다. 예를 들어 데이터 세트 리소스 유형과 테이블 리소스 유형을 선택하면 검색 결과에 데이터 세트와 테이블 모두 포함됩니다.

키워드 검색 필터

키워드 검색의 경우 필터는 다음 섹션으로 그룹화됩니다.

  • BigQuery, Cloud SQL 등과 같은 시스템. Dataplex Universal Catalog 시스템에는 커스텀 항목이 포함되어 있습니다.
  • 사용할 수 있는 모든 관점이 나열된 관점(태그)
  • 사용할 수 있는 모든 프로젝트가 나열된 프로젝트
  • 데이터베이스, 데이터 세트, 모델, 테이블, 뷰, 서비스, 커스텀 유형과 같은 리소스 유형을 설명하는 유형 별칭
  • BigQuery에서 가져온 데이터 세트

관점 값별로 필터링

관점 필터를 사용하면 특정 템플릿을 통해 태그된 애셋을 쿼리할 수 있습니다. 맞춤설정 메뉴를 사용하여 결과를 미세 조정하고 특정 관점 값별로 필터링할 수 있습니다. 관점 값 필터 조건은 해당 관점 필드의 데이터 유형에 따라 달라집니다. 예를 들어 datetimenumber 필드에 특정 날짜나 범위를 지정할 수 있습니다.

필터 공개 상태

시스템, 유형 별칭, 프로젝트, 데이터 세트 필터는 검색 필드의 현재 검색어에 따라 표시됩니다.

자연어 검색 필터

자연어 검색의 경우 다음 필터를 사용할 수 있습니다.

  • 범위: 조직(기본값), 현재 프로젝트 또는 별표표시된 리소스만 검색합니다. 자세한 내용은 이 문서의 검색 범위 섹션을 참조하세요.
  • 시스템: 리소스가 속한 Google Cloud 서비스입니다(예: BigQuery). Dataplex Universal Catalog 시스템에는 항목 그룹이 포함되어 있습니다.
  • 프로젝트: 검색할 프로젝트입니다.
  • 유형: BigQuery 연결, Cloud Storage 버킷 또는 데이터베이스와 같은 리소스 유형입니다. 리소스 유형에 따라 연결 유형이나 SQL 언어와 같은 하위 유형별로 필터링할 수도 있습니다.
  • 위치 선택: 검색할 위치입니다.
  • 데이터 세트 선택: 검색 결과가 선택한 BigQuery 데이터 세트에 속하는 BigQuery 리소스로 제한됩니다. 입력하여 필터링 필드에 데이터 세트 이름을 입력합니다.
  • 관점 유형: 검색 중인 리소스와 연결된 Dataplex Universal Catalog 관점 유형입니다. 관점 값별로 필터링하려면 주석 값 필터링을 클릭한 후 값을 선택합니다.

시작하기 전에

검색을 수행하기 전에 필요한 역할이 부여되었고 필요한 API가 사용 설정되어 있는지 확인합니다.

필수 역할

이 섹션에서는 리소스를 검색하고 검색 결과에 액세스하는 데 필요한 역할과 권한을 설명합니다.

역할 부여 방법에 대한 자세한 내용은 액세스 관리를 참조하세요.

커스텀 역할 또는 다른 사전 정의된 역할을 통해 필요한 권한을 얻을 수도 있습니다.

항목 검색에 필요한 역할

항목을 검색하려면 검색에 사용되는 프로젝트에 대한 Dataplex Catalog 관리자, Dataplex Catalog 편집자 또는 Dataplex Catalog 뷰어 IAM 역할 중 최소 하나 이상이 필요합니다. 검색 결과에 대한 권한은 선택한 프로젝트와는 별도로 확인됩니다.

검색 결과에 액세스하는 데 필요한 역할

Dataplex Universal Catalog 검색 결과 범위는 역할에 따라 지정됩니다. Dataplex Universal Catalog에서 애셋을 검색하려면 소스 시스템에서 해당 리소스에 액세스할 수 있는 권한이 있어야 합니다. 자세한 내용은 이 문서의 검색 범위 섹션을 참조하세요.

예를 들어 BigQuery 데이터 세트, 테이블, 뷰, 모델을 검색하려면 해당 항목에 대한 각각의 권한이 필요합니다. 자세한 내용은 BigQuery 권한을 참조하세요.

다음 목록에서는 필요한 최소 권한을 설명합니다.

  • 테이블을 검색하려면 해당 테이블에 대한 bigquery.tables.get 권한이 필요합니다.
  • 데이터 세트를 검색하려면 해당 데이터 세트에 대한 bigquery.datasets.get 권한이 필요합니다.
  • 데이터 세트나 테이블의 메타데이터를 검색하려면 BigQuery 메타데이터 뷰어 역할(roles/bigquery.metadataViewer)이 필요합니다.

또 다른 예시로 Cloud SQL 인스턴스, 데이터베이스, 스키마, 테이블, 뷰를 검색하려면 해당 항목에 대한 각각의 권한이 필요합니다. 자세한 내용은 Cloud SQL 역할 및 권한을 참조하세요.

커스텀 항목을 검색하려면 Dataplex Catalog 뷰어 역할(roles/dataplex.catalogViewer)이 필요합니다.

API 사용 설정

Enable the Dataplex API.

Roles required to enable APIs

To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

Enable the API

리소스 검색

콘솔

리소스를 검색하려면 다음 단계를 수행합니다.

  1. Google Cloud 콘솔에서 Dataplex Universal Catalog 검색 페이지로 이동합니다.

    검색 페이지로 이동

  2. 검색 플랫폼 선택에서 Dataplex Universal Catalog를 선택합니다.

    Dataplex Universal Catalog를 선택하면 Dataplex Universal Catalog 메타데이터 스토리지를 검색할 수 있습니다. 기존 Data Catalog 사용자가 Data Catalog를 선택하면 Data Catalog 저장소를 검색할 수 있습니다.

  3. 키워드 검색을 사용하려면 다음 단계를 수행합니다.

    1. 프로젝트 전반에서 리소스 찾기 필드에 쿼리를 입력합니다.

    2. 검색을 미세 조정하려면 필터 패널을 사용합니다. 사용 가능한 필터 목록은 키워드 검색 필터를 참조하세요.

      다음 필터를 수동으로 추가할 수 있습니다.

      • 프로젝트 필터 추가: 프로젝트에서 프로젝트 추가를 클릭합니다. 특정 프로젝트를 검색하여 프로젝트를 선택한 후 열기를 클릭합니다.
      • 관점 유형 필터 추가: 관점에서 관점 유형 추가 메뉴를 클릭합니다. 특정 템플릿을 검색하여 템플릿을 선택한 후 확인을 클릭합니다.
    3. 선택사항: 사용 가능한 애셋 외에도 공개 데이터 세트 포함을 선택하여 Google Cloud 에서 공개적으로 사용할 수 있는 리소스를 검색할 수 있습니다.

      다음 도움말을 사용하여 검색어를 작성합니다.

      • 공백이 포함된 경우 검색 표현식을 따옴표로 묶습니다. 예를 들면 "search terms"입니다.
      • 키워드 앞에 NOT을 추가하여 keyword:term 필터의 논리적 부정과 일치하는 항목을 찾습니다. ANDOR 불리언 연산자를 사용하여 검색 표현식을 조합할 수도 있습니다. AND, OR, NOT 연산자는 대소문자를 구분하지 않습니다.

      예를 들어 NOT column:term은 지정된 용어와 일치하는 열을 제외한 모든 열을 나열합니다. Dataplex Universal Catalog 검색 표현식에 사용할 수 있는 키워드와 기타 용어의 목록은 검색 구문을 참조하세요.

  4. 자연어 검색을 사용하려면 다음 단계를 수행합니다.

    1. 자연어 검색 사용해 보기를 클릭합니다.

    2. 자연어로 프로젝트 전반에서 리소스 찾기 필드에 자연어로 검색어를 입력한 후 Enter 키를 누릅니다.

      다음은 몇 가지 샘플 검색어입니다.

      • Show me the datasets that contain taxi information
      • Find data on vaccine distribution across different countries
      • Get tables with historical temperature data for major world cities
      • Search for hurricane tracking and storm activity datasets
      • Population data by country
    3. 검색을 미세 조정하려면 필터를 클릭합니다. 사용 가능한 필터 목록은 자연어 검색 필터를 참조하세요.

  5. 검색된 리소스에 대한 자세한 정보를 보려면 검색 결과에서 리소스 이름을 클릭합니다. 그러면 항목 세부정보 페이지가 열립니다.

gcloud

리소스를 검색하려면 gcloud dataplex entries search 명령어를 사용합니다.

C#

C#

이 샘플을 사용해 보기 전에 Dataplex Universal Catalog 빠른 시작: 클라이언트 라이브러리 사용C# 설정 안내를 따르세요. 자세한 내용은 Dataplex Universal Catalog C# API 참고 문서를 참조하세요.

Dataplex Universal Catalog에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

using Google.Api.Gax;
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Dataplex.V1;
using System;

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for SearchEntries</summary>
    /// <remarks>
    /// This snippet has been automatically generated and should be regarded as a code template only.
    /// It will require modifications to work:
    /// - It may require correct/in-range values for request initialization.
    /// - It may require specifying regional endpoints when creating the service client as shown in
    ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
    /// </remarks>
    public void SearchEntriesRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        SearchEntriesRequest request = new SearchEntriesRequest
        {
            LocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
            Query = "",
            OrderBy = "",
            Scope = "",
            SemanticSearch = false,
        };
        // Make the request
        PagedEnumerable<SearchEntriesResponse, SearchEntriesResult> response = catalogServiceClient.SearchEntries(request);

        // Iterate over all response items, lazily performing RPCs as required
        foreach (SearchEntriesResult item in response)
        {
            // Do something with each item
            Console.WriteLine(item);
        }

        // Or iterate over pages (of server-defined size), performing one RPC per page
        foreach (SearchEntriesResponse page in response.AsRawResponses())
        {
            // Do something with each page of items
            Console.WriteLine("A page of results:");
            foreach (SearchEntriesResult item in page)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
        }

        // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
        int pageSize = 10;
        Page<SearchEntriesResult> singlePage = response.ReadPage(pageSize);
        // Do something with the page of items
        Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
        foreach (SearchEntriesResult item in singlePage)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
        // Store the pageToken, for when the next page is required.
        string nextPageToken = singlePage.NextPageToken;
    }
}

Go

Go

이 샘플을 사용해 보기 전에 Dataplex Universal Catalog 빠른 시작: 클라이언트 라이브러리 사용Go 설정 안내를 따르세요. 자세한 내용은 Dataplex Universal Catalog Go API 참고 문서를 참조하세요.

Dataplex Universal Catalog에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.SearchEntriesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#SearchEntriesRequest.
	}
	it := c.SearchEntries(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*dataplexpb.SearchEntriesResponse)
	}
}

Java

Java

이 샘플을 사용해 보기 전에 Dataplex Universal Catalog 빠른 시작: 클라이언트 라이브러리 사용Java 설정 안내를 따르세요. 자세한 내용은 Dataplex Universal Catalog Java API 참고 문서를 참조하세요.

Dataplex Universal Catalog에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.LocationName;
import com.google.cloud.dataplex.v1.SearchEntriesRequest;
import com.google.cloud.dataplex.v1.SearchEntriesResult;

public class SyncSearchEntries {

  public static void main(String[] args) throws Exception {
    syncSearchEntries();
  }

  public static void syncSearchEntries() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      SearchEntriesRequest request =
          SearchEntriesRequest.newBuilder()
              .setName(LocationName.of("[PROJECT]", "[LOCATION]").toString())
              .setQuery("query107944136")
              .setPageSize(883849137)
              .setPageToken("pageToken873572522")
              .setOrderBy("orderBy-1207110587")
              .setScope("scope109264468")
              .setSemanticSearch(true)
              .build();
      for (SearchEntriesResult element : catalogServiceClient.searchEntries(request).iterateAll()) {
        // doThingsWith(element);
      }
    }
  }
}

Python

Python

이 샘플을 사용해 보기 전에 Dataplex Universal Catalog 빠른 시작: 클라이언트 라이브러리 사용Python 설정 안내를 따르세요. 자세한 내용은 Dataplex Universal Catalog Python API 참고 문서를 참조하세요.

Dataplex Universal Catalog에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_search_entries():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.SearchEntriesRequest(
        name="name_value",
        query="query_value",
    )

    # Make the request
    page_result = client.search_entries(request=request)

    # Handle the response
    for response in page_result:
        print(response)

Ruby

Ruby

이 샘플을 사용해 보기 전에 Dataplex Universal Catalog 빠른 시작: 클라이언트 라이브러리 사용Ruby 설정 안내를 따르세요. 자세한 내용은 Dataplex Universal Catalog Ruby API 참고 문서를 참조하세요.

Dataplex Universal Catalog에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

require "google/cloud/dataplex/v1"

##
# Snippet for the search_entries call in the CatalogService service
#
# This snippet has been automatically generated and should be regarded as a code
# template only. It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in https://cloud.google.com/ruby/docs/reference.
#
# This is an auto-generated example demonstrating basic usage of
# Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries.
#
def search_entries
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

  # Create a request. To set request fields, pass in keyword arguments.
  request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new

  # Call the search_entries method.
  result = client.search_entries request

  # The returned object is of type Gapic::PagedEnumerable. You can iterate
  # over elements, and API calls will be issued to fetch pages as needed.
  result.each do |item|
    # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult.
    p item
  end
end

REST

리소스를 검색하려면 searchEntries 메서드를 사용합니다.

항목 세부정보 보기

콘솔

Dataplex Universal Catalog 검색을 사용하여 항목 세부정보를 봅니다.

  1. Dataplex Universal Catalog에서 항목을 검색합니다.

  2. 검색 결과에서 세부정보를 보려는 항목을 클릭합니다.

    항목 세부정보 페이지가 열립니다. 이 페이지에는 다음 섹션이 포함되어 있습니다.

    • 항목 세부정보: 항목 유형, 시스템, 플랫폼, 정규화된 이름, 생성 시간, 마지막 수정 시간, 설명, 관리자와 같은 정보가 포함됩니다.
    • 개요: 항목 개요입니다(제공되는 경우).
    • 관점: 항목에 정의된 필수 관점과 선택적 관점입니다. 자세한 내용은 관점 카테고리를 참조하세요.

gcloud

항목 세부정보를 보려면 gcloud dataplex entries lookup 명령어를 사용합니다.

C#

C#

이 샘플을 사용해 보기 전에 Dataplex Universal Catalog 빠른 시작: 클라이언트 라이브러리 사용C# 설정 안내를 따르세요. 자세한 내용은 Dataplex Universal Catalog C# API 참고 문서를 참조하세요.

Dataplex Universal Catalog에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

using Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for LookupEntry</summary>
    /// <remarks>
    /// This snippet has been automatically generated and should be regarded as a code template only.
    /// It will require modifications to work:
    /// - It may require correct/in-range values for request initialization.
    /// - It may require specifying regional endpoints when creating the service client as shown in
    ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
    /// </remarks>
    public void LookupEntryRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        LookupEntryRequest request = new LookupEntryRequest
        {
            Name = "",
            View = EntryView.Unspecified,
            AspectTypes = { "", },
            Paths = { "", },
            EntryAsEntryName = EntryName.FromProjectLocationEntryGroupEntry("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"),
        };
        // Make the request
        Entry response = catalogServiceClient.LookupEntry(request);
    }
}

Go

Go

이 샘플을 사용해 보기 전에 Dataplex Universal Catalog 빠른 시작: 클라이언트 라이브러리 사용Go 설정 안내를 따르세요. 자세한 내용은 Dataplex Universal Catalog Go API 참고 문서를 참조하세요.

Dataplex Universal Catalog에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.LookupEntryRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#LookupEntryRequest.
	}
	resp, err := c.LookupEntry(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

Java

Java

이 샘플을 사용해 보기 전에 Dataplex Universal Catalog 빠른 시작: 클라이언트 라이브러리 사용Java 설정 안내를 따르세요. 자세한 내용은 Dataplex Universal Catalog Java API 참고 문서를 참조하세요.

Dataplex Universal Catalog에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.Entry;
import com.google.cloud.dataplex.v1.EntryName;
import com.google.cloud.dataplex.v1.EntryView;
import com.google.cloud.dataplex.v1.LookupEntryRequest;
import java.util.ArrayList;

public class SyncLookupEntry {

  public static void main(String[] args) throws Exception {
    syncLookupEntry();
  }

  public static void syncLookupEntry() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      LookupEntryRequest request =
          LookupEntryRequest.newBuilder()
              .setName("name3373707")
              .setView(EntryView.forNumber(0))
              .addAllAspectTypes(new ArrayList<String>())
              .addAllPaths(new ArrayList<String>())
              .setEntry(
                  EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
              .build();
      Entry response = catalogServiceClient.lookupEntry(request);
    }
  }
}

Python

Python

이 샘플을 사용해 보기 전에 Dataplex Universal Catalog 빠른 시작: 클라이언트 라이브러리 사용Python 설정 안내를 따르세요. 자세한 내용은 Dataplex Universal Catalog Python API 참고 문서를 참조하세요.

Dataplex Universal Catalog에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_lookup_entry():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.LookupEntryRequest(
        name="name_value",
        entry="entry_value",
    )

    # Make the request
    response = client.lookup_entry(request=request)

    # Handle the response
    print(response)

Ruby

Ruby

이 샘플을 사용해 보기 전에 Dataplex Universal Catalog 빠른 시작: 클라이언트 라이브러리 사용Ruby 설정 안내를 따르세요. 자세한 내용은 Dataplex Universal Catalog Ruby API 참고 문서를 참조하세요.

Dataplex Universal Catalog에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

require "google/cloud/dataplex/v1"

##
# Snippet for the lookup_entry call in the CatalogService service
#
# This snippet has been automatically generated and should be regarded as a code
# template only. It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in https://cloud.google.com/ruby/docs/reference.
#
# This is an auto-generated example demonstrating basic usage of
# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry.
#
def lookup_entry
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

  # Create a request. To set request fields, pass in keyword arguments.
  request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new

  # Call the lookup_entry method.
  result = client.lookup_entry request

  # The returned object is of type Google::Cloud::Dataplex::V1::Entry.
  p result
end

REST

항목 세부정보를 보려면 lookupEntry 메서드를 사용합니다.

제한사항

자연어 검색 제한사항은 다음과 같습니다.

  • 자연어 검색은 가장 관련성 높은 결과를 제한적으로 반환하므로 탐색과 탐색 분석에 최적화되어 있습니다. 일치하는 모든 항목의 전체 목록을 제공하지 않을 수 있으므로 큐레이션 파이프라인과 같이 이 목록을 사용하는 워크로드에는 적합하지 않을 수 있습니다.

  • 자연어 검색은 스키마, 설명, 관점을 포함한 리소스 메타데이터만 고려합니다. 테이블 내 데이터에 대한 질문(예: '지난달 매출이 얼마였어?')에 답하거나 메타데이터에 대한 분석 쿼리(예: '데이터 세트 X에 테이블이 몇 개 있어?')를 수행하지 않습니다.

  • 공개 리소스는 자연어 검색 범위에 포함되지 않습니다.

다음 단계