Gemini 모델과 AI.GENERATE_TEXT 함수를 사용하여 텍스트 생성

이 튜토리얼에서는 gemini-2.5-flash 모델을 기반으로 하는 원격 모델을 만드는 방법과 이 모델을 AI.GENERATE_TEXT 함수와 함께 사용하여 키워드를 추출하고 감정 분석을 수행하는 방법을 보여줍니다.

비용

이 문서에서는 비용이 청구될 수 있는 Google Cloud구성요소를 사용합니다.

  • BigQuery ML. You incur costs for the data that you process in BigQuery.
  • Vertex AI. You incur costs for calls to the Vertex AI service that's represented by the remote model.

프로젝트 사용량을 기준으로 예상 비용을 산출하려면 가격 계산기를 사용하세요.

Google Cloud 신규 사용자는 무료 체험판을 사용할 수 있습니다.

이 문서에 설명된 태스크를 완료했으면 만든 리소스를 삭제하여 청구가 계속되는 것을 방지할 수 있습니다. 자세한 내용은 삭제를 참조하세요.

시작하기 전에

콘솔

  1. Google Cloud 계정에 로그인합니다. Google Cloud를 처음 사용하는 경우 계정을 만들고 Google 제품의 실제 성능을 평가해 보세요. 신규 고객에게는 워크로드를 실행, 테스트, 배포하는 데 사용할 수 있는 $300의 무료 크레딧이 제공됩니다.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the BigQuery, BigQuery Connection, and Vertex AI APIs.

    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 APIs

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the BigQuery, BigQuery Connection, and Vertex AI APIs.

    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 APIs

  8. 프로젝트에 다음 역할이 있는지 확인하세요. BigQuery 관리자, 프로젝트 IAM 관리자

    역할 확인

    1. Google Cloud 콘솔에서 IAM 페이지로 이동합니다.

      IAM으로 이동
    2. 프로젝트를 선택합니다.
    3. 주 구성원 열에서 나 또는 내가 속한 그룹을 식별하는 모든 행을 찾습니다. 내가 속한 그룹을 알아보려면 관리자에게 문의하세요.

    4. 나를 지정하거나 포함하는 모든 행의 역할 열을 확인하여 역할 목록에 필요한 역할이 포함되어 있는지 확인합니다.

    역할 부여

    1. Google Cloud 콘솔에서 IAM 페이지로 이동합니다.

      IAM으로 이동
    2. 프로젝트를 선택합니다.
    3. 액세스 권한 부여를 클릭합니다.
    4. 새 주 구성원 필드에 사용자 식별자를 입력합니다. 일반적으로 Google 계정의 이메일 주소입니다.

    5. 역할 선택을 클릭한 후 역할을 검색합니다.
    6. 역할을 추가로 부여하려면 다른 역할 추가를 클릭하고 각 역할을 추가합니다.
    7. 저장을 클릭합니다.

gcloud

  1. Google Cloud 계정에 로그인합니다. Google Cloud를 처음 사용하는 경우 계정을 만들고 Google 제품의 실제 성능을 평가해 보세요. 신규 고객에게는 워크로드를 실행, 테스트, 배포하는 데 사용할 수 있는 $300의 무료 크레딧이 제공됩니다.
  2. Google Cloud CLI를 설치합니다.

  3. 외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.

  4. gcloud CLI를 초기화하려면, 다음 명령어를 실행합니다.

    gcloud init
  5. Google Cloud 프로젝트를 만들거나 선택합니다.

    프로젝트를 선택하거나 만드는 데 필요한 역할

    • 프로젝트 선택: 프로젝트를 선택하는 데는 특정 IAM 역할이 필요하지 않습니다. 역할이 부여된 프로젝트를 선택하면 됩니다.
    • 프로젝트 만들기: 프로젝트를 만들려면 resourcemanager.projects.create 권한이 포함된 프로젝트 생성자 역할(roles/resourcemanager.projectCreator)이 필요합니다. 역할 부여 방법 알아보기
    • Google Cloud 프로젝트를 만듭니다.

      gcloud projects create PROJECT_ID

      PROJECT_ID를 만들려는 Google Cloud 프로젝트의 이름으로 바꿉니다.

    • 생성한 Google Cloud 프로젝트를 선택합니다.

      gcloud config set project PROJECT_ID

      PROJECT_ID을 Google Cloud 프로젝트 이름으로 바꿉니다.

  6. Google Cloud 프로젝트에 결제가 사용 설정되어 있는지 확인합니다.

  7. BigQuery, BigQuery Connection, Vertex AI API를 사용 설정합니다.

    API 사용 설정에 필요한 역할

    API를 사용 설정하려면 serviceusage.services.enable 권한이 포함된 서비스 사용량 관리자 IAM 역할 (roles/serviceusage.serviceUsageAdmin)이 필요합니다. 역할 부여 방법 알아보기

    gcloud services enable bigquery.googleapis.com bigqueryconnection.googleapis.com aiplatform.googleapis.com
  8. Google Cloud CLI를 설치합니다.

  9. 외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.

  10. gcloud CLI를 초기화하려면, 다음 명령어를 실행합니다.

    gcloud init
  11. Google Cloud 프로젝트를 만들거나 선택합니다.

    프로젝트를 선택하거나 만드는 데 필요한 역할

    • 프로젝트 선택: 프로젝트를 선택하는 데는 특정 IAM 역할이 필요하지 않습니다. 역할이 부여된 프로젝트를 선택하면 됩니다.
    • 프로젝트 만들기: 프로젝트를 만들려면 resourcemanager.projects.create 권한이 포함된 프로젝트 생성자 역할(roles/resourcemanager.projectCreator)이 필요합니다. 역할 부여 방법 알아보기
    • Google Cloud 프로젝트를 만듭니다.

      gcloud projects create PROJECT_ID

      PROJECT_ID를 만들려는 Google Cloud 프로젝트의 이름으로 바꿉니다.

    • 생성한 Google Cloud 프로젝트를 선택합니다.

      gcloud config set project PROJECT_ID

      PROJECT_ID을 Google Cloud 프로젝트 이름으로 바꿉니다.

  12. Google Cloud 프로젝트에 결제가 사용 설정되어 있는지 확인합니다.

  13. BigQuery, BigQuery Connection, Vertex AI API를 사용 설정합니다.

    API 사용 설정에 필요한 역할

    API를 사용 설정하려면 serviceusage.services.enable 권한이 포함된 서비스 사용량 관리자 IAM 역할 (roles/serviceusage.serviceUsageAdmin)이 필요합니다. 역할 부여 방법 알아보기

    gcloud services enable bigquery.googleapis.com bigqueryconnection.googleapis.com aiplatform.googleapis.com
  14. 사용자 계정에 역할을 부여합니다. 다음 IAM 역할마다 다음 명령어를 1회 실행합니다. roles/bigquery.admin, roles/resourcemanager.projectIamAdmin

    gcloud projects add-iam-policy-binding PROJECT_ID --member="user:USER_IDENTIFIER" --role=ROLE

    다음을 바꿉니다.

    • PROJECT_ID: 프로젝트 ID입니다.
    • USER_IDENTIFIER: 사용자 계정의 식별자입니다. 예를 들면 myemail@example.com입니다.
    • ROLE: 사용자 계정에 부여하는 IAM 역할입니다.

데이터 세트 만들기

ML 모델을 저장할 BigQuery 데이터 세트를 만듭니다.

콘솔

  1. Google Cloud 콘솔에서 BigQuery 페이지로 이동합니다.

    BigQuery 페이지로 이동

  2. 탐색기 창에서 프로젝트 이름을 클릭합니다.

  3. 작업 보기 > 데이터 세트 만들기를 클릭합니다.

  4. 데이터 세트 만들기 페이지에서 다음을 수행합니다.

    • 데이터 세트 IDbqml_tutorial를 입력합니다.

    • 위치 유형에 대해 멀티 리전을 선택한 다음 US를 선택합니다.

    • 나머지 기본 설정은 그대로 두고 데이터 세트 만들기를 클릭합니다.

bq

새 데이터 세트를 만들려면 bq mk --dataset 명령어를 사용합니다.

  1. 데이터 위치가 US로 설정된 bqml_tutorial 데이터 세트를 만듭니다.

    bq mk --dataset \
      --location=US \
      --description "BigQuery ML tutorial dataset." \
      bqml_tutorial
  2. 데이터 세트가 생성되었는지 확인합니다.

    bq ls

API

데이터 세트 리소스가 정의된 datasets.insert 메서드를 호출합니다.

{
  "datasetReference": {
     "datasetId": "bqml_tutorial"
  }
}

연결 만들기

데이터 세트를 만든 US 멀티 리전에서 Cloud 리소스 연결을 만듭니다. 그런 다음 연결의 서비스 계정을 가져옵니다.

다음 옵션 중 하나를 선택합니다.

콘솔

  1. BigQuery 페이지로 이동합니다.

    BigQuery로 이동

  2. 왼쪽 창에서 탐색기를 클릭합니다.

    강조 표시된 탐색기 창 버튼

    왼쪽 창이 표시되지 않으면 왼쪽 창 펼치기를 클릭하여 창을 엽니다.

  3. 탐색기 창에서 프로젝트 이름을 펼친 후 연결을 클릭합니다.

  4. 연결 페이지에서 연결 만들기를 클릭합니다.

  5. 연결 유형으로 Vertex AI 원격 모델, 원격 함수, BigLake, Spanner(Cloud 리소스)를 선택합니다.

  6. 연결 ID 필드에 연결 이름을 입력합니다.

  7. 위치 유형에서 연결 위치를 선택합니다. 연결은 데이터 세트와 같이 다른 리소스와 함께 배치해야 합니다.

  8. 연결 만들기를 클릭합니다.

  9. 연결로 이동을 클릭합니다.

  10. 연결 정보 창에서 이후 단계에 사용할 서비스 계정 ID를 복사합니다.

bq

  1. 명령줄 환경에서 연결을 만듭니다.

    bq mk --connection --location=REGION --project_id=PROJECT_ID \
        --connection_type=CLOUD_RESOURCE CONNECTION_ID

    --project_id 매개변수는 기본 프로젝트를 재정의합니다.

    다음을 바꿉니다.

    • REGION: 연결 리전
    • PROJECT_ID: Google Cloud 프로젝트 ID
    • CONNECTION_ID: 연결의 ID

    연결 리소스를 만들면 BigQuery가 고유한 시스템 서비스 계정을 만들고 이를 연결에 연계합니다.

    문제 해결: 다음 연결 오류가 발생하면 Google Cloud SDK를 업데이트하세요.

    Flags parsing error: flag --connection_type=CLOUD_RESOURCE: value should be one of...
    
  2. 이후 단계에서 사용할 수 있도록 서비스 계정 ID를 가져와 복사합니다.

    bq show --connection PROJECT_ID.REGION.CONNECTION_ID

    출력은 다음과 비슷합니다.

    name                          properties
    1234.REGION.CONNECTION_ID     {"serviceAccountId": "connection-1234-9u56h9@gcp-sa-bigquery-condel.iam.gserviceaccount.com"}
    

Python

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

BigQuery에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 클라이언트 라이브러리의 인증 설정을 참조하세요.

import google.api_core.exceptions
from google.cloud import bigquery_connection_v1

client = bigquery_connection_v1.ConnectionServiceClient()


def create_connection(
    project_id: str,
    location: str,
    connection_id: str,
):
    """Creates a BigQuery connection to a Cloud Resource.

    Cloud Resource connection creates a service account which can then be
    granted access to other Google Cloud resources for federated queries.

    Args:
        project_id: The Google Cloud project ID.
        location: The location of the connection (for example, "us-central1").
        connection_id: The ID of the connection to create.
    """

    parent = client.common_location_path(project_id, location)

    connection = bigquery_connection_v1.Connection(
        friendly_name="Example Connection",
        description="A sample connection for a Cloud Resource.",
        cloud_resource=bigquery_connection_v1.CloudResourceProperties(),
    )

    try:
        created_connection = client.create_connection(
            parent=parent, connection_id=connection_id, connection=connection
        )
        print(f"Successfully created connection: {created_connection.name}")
        print(f"Friendly name: {created_connection.friendly_name}")
        print(
            f"Service Account: {created_connection.cloud_resource.service_account_id}"
        )

    except google.api_core.exceptions.AlreadyExists:
        print(f"Connection with ID '{connection_id}' already exists.")
        print("Please use a different connection ID.")
    except Exception as e:
        print(f"An unexpected error occurred while creating the connection: {e}")

Node.js

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

BigQuery에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 클라이언트 라이브러리의 인증 설정을 참조하세요.

const {ConnectionServiceClient} =
  require('@google-cloud/bigquery-connection').v1;
const {status} = require('@grpc/grpc-js');

const client = new ConnectionServiceClient();

/**
 * Creates a new BigQuery connection to a Cloud Resource.
 *
 * A Cloud Resource connection creates a service account that can be granted access
 * to other Google Cloud resources.
 *
 * @param {string} projectId The Google Cloud project ID. for example, 'example-project-id'
 * @param {string} location The location of the project to create the connection in. for example, 'us-central1'
 * @param {string} connectionId The ID of the connection to create. for example, 'example-connection-id'
 */
async function createConnection(projectId, location, connectionId) {
  const parent = client.locationPath(projectId, location);

  const connection = {
    friendlyName: 'Example Connection',
    description: 'A sample connection for a Cloud Resource',
    // The service account for this cloudResource will be created by the API.
    // Its ID will be available in the response.
    cloudResource: {},
  };

  const request = {
    parent,
    connectionId,
    connection,
  };

  try {
    const [response] = await client.createConnection(request);

    console.log(`Successfully created connection: ${response.name}`);
    console.log(`Friendly name: ${response.friendlyName}`);

    console.log(`Service Account: ${response.cloudResource.serviceAccountId}`);
  } catch (err) {
    if (err.code === status.ALREADY_EXISTS) {
      console.log(`Connection '${connectionId}' already exists.`);
    } else {
      console.error(`Error creating connection: ${err.message}`);
    }
  }
}

Terraform

google_bigquery_connection 리소스를 사용합니다.

BigQuery에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 클라이언트 라이브러리의 인증 설정을 참조하세요.

다음 예시에서는 US 리전에 my_cloud_resource_connection이라는 Cloud 리소스 연결을 만듭니다.


# This queries the provider for project information.
data "google_project" "default" {}

# This creates a cloud resource connection in the US region named my_cloud_resource_connection.
# Note: The cloud resource nested object has only one output field - serviceAccountId.
resource "google_bigquery_connection" "default" {
  connection_id = "my_cloud_resource_connection"
  project       = data.google_project.default.project_id
  location      = "US"
  cloud_resource {}
}

Google Cloud 프로젝트에 Terraform 구성을 적용하려면 다음 섹션의 단계를 완료하세요.

Cloud Shell 준비

  1. Cloud Shell을 실행합니다.
  2. Terraform 구성을 적용할 기본 Google Cloud 프로젝트를 설정합니다.

    이 명령어는 프로젝트당 한 번만 실행하면 되며 어떤 디렉터리에서도 실행할 수 있습니다.

    export GOOGLE_CLOUD_PROJECT=PROJECT_ID

    Terraform 구성 파일에서 명시적 값을 설정하면 환경 변수가 재정의됩니다.

디렉터리 준비

각 Terraform 구성 파일에는 자체 디렉터리(루트 모듈이라고도 함)가 있어야 합니다.

  1. Cloud Shell에서 디렉터리를 만들고 해당 디렉터리 내에 새 파일을 만드세요. 파일 이름에는 .tf 확장자가 있어야 합니다(예: main.tf). 이 튜토리얼에서는 파일을 main.tf라고 합니다.
    mkdir DIRECTORY && cd DIRECTORY && touch main.tf
  2. 튜토리얼을 따라 하는 경우 각 섹션이나 단계에서 샘플 코드를 복사할 수 있습니다.

    샘플 코드를 새로 만든 main.tf에 복사합니다.

    필요한 경우 GitHub에서 코드를 복사합니다. 이는 Terraform 스니펫이 엔드 투 엔드 솔루션의 일부인 경우에 권장됩니다.

  3. 환경에 적용할 샘플 파라미터를 검토하고 수정합니다.
  4. 변경사항을 저장합니다.
  5. Terraform을 초기화합니다. 이 작업은 디렉터리당 한 번만 수행하면 됩니다.
    terraform init

    원하는 경우 최신 Google 공급업체 버전을 사용하려면 -upgrade 옵션을 포함합니다.

    terraform init -upgrade

변경사항 적용

  1. 구성을 검토하고 Terraform에서 만들거나 업데이트할 리소스가 예상과 일치하는지 확인합니다.
    terraform plan

    필요에 따라 구성을 수정합니다.

  2. 다음 명령어를 실행하고 프롬프트에 yes를 입력하여 Terraform 구성을 적용합니다.
    terraform apply

    Terraform에 '적용 완료' 메시지가 표시될 때까지 기다립니다.

  3. 결과를 보려면 Google Cloud 프로젝트를 엽니다. Google Cloud 콘솔에서 UI의 리소스로 이동하여 Terraform이 리소스를 만들었거나 업데이트했는지 확인합니다.

연결의 서비스 계정에 권한 부여

연결의 서비스 계정에 Vertex AI 사용자 역할을 부여합니다. 시작하기 전에 섹션에서 만들었거나 선택한 것과 동일한 프로젝트에서 이 역할을 부여해야 합니다. 다른 프로젝트에서 역할을 부여하면 bqcx-1234567890-xxxx@gcp-sa-bigquery-condel.iam.gserviceaccount.com does not have the permission to access resource 오류가 발생합니다.

역할을 부여하려면 다음 단계를 따르세요.

  1. IAM 및 관리자 페이지로 이동합니다.

    IAM 및 관리자로 이동

  2. 액세스 권한 부여를 클릭합니다.

  3. 새 주 구성원 필드에 앞에서 복사한 서비스 계정 ID를 입력합니다.

  4. 역할 선택 필드에서 Vertex AI를 선택한 후 Vertex AI 사용자 역할을 선택합니다.

  5. 저장을 클릭합니다.

원격 모델 만들기

CREATE MODEL 문을 사용하여 호스팅된 Vertex AI 모델을 나타내는 원격 모델을 만듭니다.

  1. Google Cloud 콘솔에서 BigQuery 페이지로 이동합니다.

    BigQuery로 이동

  2. 쿼리 편집기에서 다음 쿼리를 실행합니다.

CREATE OR REPLACE MODEL `bqml_tutorial.gemini_model`
  REMOTE WITH CONNECTION `LOCATION.CONNECTION_ID`
  OPTIONS (ENDPOINT = 'gemini-2.5-flash');

다음을 바꿉니다.

  • LOCATION: 연결 위치
  • CONNECTION_ID: BigQuery 연결의 ID

    Google Cloud 콘솔에서 연결 세부정보를 볼 때 이는 연결 ID에 표시되는 정규화된 연결 ID의 마지막 섹션에 있는 값입니다(예: projects/myproject/locations/connection_location/connections/myconnection).

쿼리가 완료되는 데 몇 초 정도 걸리며 그 이후에는 gemini_model 모델이 bqml_tutorial 데이터 세트에 표시됩니다. 쿼리 결과가 없습니다.

키워드 추출 수행

원격 모델과 AI.GENERATE_TEXT 함수를 사용하여 IMDB 영화 리뷰에서 키워드를 추출합니다.

  1. Google Cloud 콘솔에서 BigQuery 페이지로 이동합니다.

    BigQuery로 이동

  2. 쿼리 편집기에서 다음 문을 입력하여 영화 리뷰 5개에서 키워드를 추출합니다.

    SELECT
      title, result, review
    FROM
      AI.GENERATE_TEXT(
        MODEL `bqml_tutorial.gemini_model`,
        (
          SELECT
            CONCAT(
              """Extract a list of only 3 key words from this review.
                List only the key words, nothing else. Review: """,
                review) AS prompt,
            *
          FROM
            `bigquery-public-data.imdb.reviews`
          LIMIT 5
        ),
        STRUCT(
          0.2 AS temperature,
          100 AS max_output_tokens));

    출력은 다음과 비슷합니다.

    +--------------+------------------+----------------------------------------+
    | title        | result           | review                                 |
    +--------------+------------------+----------------------------------------+
    | The Guardian | * Costner        | Once again Mr. Costner has dragged out |
    |              | * Kutcher        | a movie for far longer than necessary. |
    |              | * Rescue         | Aside from the terrific sea rescue...  |
    |              |                  |                                        |
    | Trespass     | * Generic        | This is an example of why the majority |
    |              | * Waste          | of action films are the same. Generic  |
    |              | * Cinematography | and boring, there's really nothing...  |
    | ...          | ...              | ...                                    |
    +--------------+------------------+----------------------------------------+
    

감정 분석 수행

원격 모델과 AI.GENERATE_TEXT 함수를 사용하여 IMDB 영화 리뷰에 대한 감정 분석을 수행합니다.

  1. Google Cloud 콘솔에서 BigQuery 페이지로 이동합니다.

    BigQuery로 이동

  2. 쿼리 편집기에서 다음 문을 실행하여 영화 리뷰에 대한 감정 분석을 수행합니다.

    SELECT
      title, result, review
    FROM
      AI.GENERATE_TEXT(
        MODEL `bqml_tutorial.gemini_model`,
        (
          SELECT
            CONCAT(
              """Perform sentiment analysis on the following text and
                 return one the following categories: positive, negative: """,
              review) AS prompt,
            *
          FROM
            `bigquery-public-data.imdb.reviews`
          LIMIT 5
        ),
        STRUCT(
          0.2 AS temperature,
          100 AS max_output_tokens));

    출력은 다음과 비슷합니다.

    +----------+----------+------------------------------------------------+
    | title    | result   | review                                         |
    +----------+----------+------------------------------------------------+
    | Quitting | Positive | This movie is amazing because the fact that... |
    | Trespass | Negative | This is an example of why the majority of ...  |
    | ...      | ...      | ...                                            |
    +----------+----------+------------------------------------------------+
    

삭제

이 튜토리얼에서 사용된 리소스 비용이 Google Cloud 계정에 청구되지 않도록 하려면 리소스가 포함된 프로젝트를 삭제하거나 프로젝트를 유지하고 개별 리소스를 삭제하세요.

프로젝트 삭제

    Google Cloud 프로젝트를 삭제합니다.

    gcloud projects delete PROJECT_ID

개별 리소스 삭제

프로젝트를 재사용하려면 튜토리얼에서 만든 리소스를 삭제합니다.

콘솔

  1. BigQuery 페이지로 이동합니다.

    BigQuery로 이동

  2. bqml_tutorial 데이터 세트를 삭제합니다. 데이터 세트를 삭제하면 원격 모델도 삭제됩니다.

    1. 탐색기 창에서 프로젝트를 펼치고 데이터 세트를 클릭합니다.

    2. 데이터 세트 목록에서 데이터 세트를 클릭합니다.

    3. 세부정보 창에서 삭제를 클릭합니다.

    4. 데이터 세트 삭제 대화상자에서 삭제를 클릭합니다.

  3. 연결을 삭제합니다.

    1. 탐색기 창에서 프로젝트를 펼치고 연결을 클릭합니다.

    2. 데이터 세트 목록에서 연결을 클릭합니다.

    3. 세부정보 창에서 삭제를 클릭합니다.

    4. 연결 삭제 대화상자에서 삭제 확인을 위해 delete를 입력합니다.

    5. 삭제를 클릭합니다.

gcloud

  1. bqml_tutorial 데이터 세트와 원격 모델을 삭제합니다.

    bq rm --dataset --recursive bqml_tutorial
    
  2. 연결을 삭제합니다.

    bq rm --connection PROJECT_ID.REGION.CONNECTION_ID
    

    다음을 바꿉니다.

    • PROJECT_ID: Google Cloud 프로젝트 ID
    • REGION: 연결 리전
    • CONNECTION_ID: 연결 ID

다음 단계