Dataplex Universal Catalog는 데이터 파이프라인을 사용하여 템플릿에 정의된 태스크를 예약합니다.
Google Cloud 콘솔의 Dataplex Universal Catalog 페이지에서 Dataplex Universal Catalog를 통해 예약한 태스크만 볼 수 있습니다.
템플릿: 원시 데이터를 선별된 데이터로 변환
Dataplex Universal Catalog 파일 형식 변환 템플릿은 Dataplex Universal Catalog Cloud Storage 애셋의 데이터 또는 CSV 또는 JSON 형식으로 저장된 Dataplex Universal Catalog 항목 목록을 다른 Dataplex Universal Catalog 애셋의 Parquet 또는 Avro 형식 데이터로 변환합니다. 파티션 레이아웃은 변환 시 유지됩니다. 또한 출력 파일의 압축을 지원합니다.
템플릿 매개변수
매개변수
설명
inputAssetOrEntitiesList
입력 파일이 포함된 Dataplex Universal Catalog 애셋 또는 Dataplex Universal Catalog 항목입니다. 이 매개변수는 projects/<name>/locations/<loc>/lakes/<lake-name>/zones/<zone-name>/assets/<asset-name> 또는 projects/<name>/locations/<loc>/lakes/<lake-name>/zones/<zone-name>/entities/<entity1-name>,projects/<name>/locations/<loc>/lakes/<lake-name>/zones/<zone-name>/entities/<entity 2 name>... 형식을 따라야 합니다.
outputFileFormat
Cloud Storage의 출력 파일 형식입니다. 이 매개변수는 PARQUET 또는 AVRO 형식을 따라야 합니다.
outputAsset
출력 파일이 저장될 Cloud Storage 버킷이 포함된 Dataplex Universal Catalog 애셋의 이름입니다. 이 매개변수는 projects/<name>/locations/<loc>/lakes/<lake-name>/zones/<zone-name>/assets/<asset-name> 형식을 따라야 합니다. Google Cloud 콘솔의 Dataplex Universal Catalog 애셋 Details 탭에서 outputAsset을 찾을 수 있습니다.
outputFileCompression
선택사항: 출력 파일 압축입니다. 이 매개변수의 기본값은 SNAPPY입니다. 매개변수의 다른 값은 UNCOMPRESSED, SNAPPY, GZIP, BZIP2일 수 있습니다. BZIP2는 PARQUET 파일에 지원되지 않습니다.
writeDisposition
선택사항: 대상 파일이 이미 있는 경우 발생하는 작업을 지정합니다. 이 파라미터의 기본값은 SKIP으로, 대상 디렉터리에 존재하지 않는 파일만 처리하도록 지시합니다. 매개변수의 다른 값은 OVERWRITE(기존 파일을 덮어씀) 또는 FAIL(대상 파일이 하나 이상 있는 경우 아무 것도 처리하지 않고 오류 발생)일 수 있습니다.
updateDataplexMetadata
선택사항: 새로 생성된 항목의 Dataplex Universal Catalog 메타데이터를 업데이트할지 여부입니다. 이 매개변수의 기본값은 false입니다.
사용 설정하면 파이프라인이 소스의 스키마를 대상 Dataplex 항목으로 자동 복사하고 자동화된 Dataplex Universal Catalog 탐색은 실행되지 않습니다. 소스(원시) 데이터의 스키마가 Dataplex에서 관리되는 경우 이 플래그를 사용합니다.
템플릿 실행
콘솔
Google Cloud 콘솔에서 Dataplex Universal Catalog 페이지로 이동합니다.
JOB_NAME: a job name of your choice
PROJECT_ID: your template project ID
REGION_NAME: region in which to run the job
INPUT_ASSET_OR_ENTITIES_LIST: path to your JDBC drivers
OUTPUT_FILE_FORMAT: your output file format in Cloud Storage
OUTPUT_ASSET: your Dataplex Universal Catalog output asset ID
PROJECT_ID: your template project ID
REGION_NAME: region in which to run the job
JOB_NAME: a job name of your choice
INPUT_ASSET_OR_ENTITIES_LIST: path to your JDBC drivers
OUTPUT_FILE_FORMAT: your output file format in Cloud Storage
OUTPUT_ASSET: your Dataplex Universal Catalog output asset ID
템플릿: BigQuery 애셋에서 Cloud Storage 애셋으로 데이터 계층화
Dataplex Universal Catalog BigQuery to Cloud Storage 템플릿은 데이터를 Dataplex Universal Catalog 호환 레이아웃 및 형식으로 Dataplex Universal Catalog BigQuery에서 Dataplex Universal Catalog Cloud Storage 애셋에 복사합니다. 복사할 BigQuery 데이터 세트 또는 BigQuery 테이블 목록을 지정할 수 있습니다. 더 유연한 환경을 위해 이 템플릿을 사용하면 지정된 수정 날짜보다 오래된 데이터를 복사할 수 있으며, 복사가 완료된 후 BigQuery에서 데이터를 삭제할 수도 있습니다.
BigQuery에서 Cloud Storage로 파티션을 나눈 테이블을 복사할 때는 다음 사항에 유의하세요.
이 템플릿은 Cloud Storage 버킷에 Hive 스타일 파티션을 만듭니다.
BigQuery는 Hive 스타일의 파티션 키를 기존 열과 동일하게 할 수 없습니다. enforceSamePartitionKey 옵션을 사용하여 새 파티션 키를 만들거나 동일한 파티션 키를 유지하면서 기존 열의 이름을 바꿀 수 있습니다.
Dataplex Universal Catalog 탐색은 BigQuery 테이블(및 Dataproc Metastore의 테이블)을 만들 때 파티션 유형을 string으로 등록합니다. 이로 인해 기존 파티션 필터가 영향을 받을 수 있습니다.
단일 템플릿 실행에서 변환할 수 있는 테이블 및 파티션의 수는 약 300개로 제한이 있습니다. 정확한 수는 테이블 이름의 길이와 기타 요인에 따라 다릅니다.
템플릿 매개변수
매개변수
설명
sourceBigQueryDataset
데이터를 계층화할 BigQuery 데이터 세트입니다. 이 파라미터에는 projects/<name>/locations/<loc>/lakes/<lake-name>/zones/<zone-name>/assets/<asset-name> 형식의 Dataplex Universal Catalog 애셋 이름 또는 projects/<name>/datasets/<dataset-id> 형식의 BigQuery 데이터 세트 ID가 포함되어야 합니다.
destinationStorageBucketAssetName
데이터를 계층화할 Cloud Storage 버킷의 Dataplex Universal Catalog 애셋 이름입니다. 이 매개변수는 projects/<name>/locations/<loc>/lakes/<lake-name>/zones/<zone-name>/assets/<asset-name> 형식을 따라야 합니다.
tables
선택사항: 계층화할 BigQuery 테이블의 쉼표로 구분된 목록입니다. 목록을 제공하지 않으면 모든 테이블이 계층화됩니다. 테이블은 이름(프로젝트/데이터 세트 프리픽스 아님)만으로 지정되어야 하며 대소문자를 구분합니다.
exportDataModifiedBeforeDateTime
선택사항: 이 날짜(및 선택적 시간)보다 오래된 데이터를 이동하려면 이 매개변수를 사용합니다. 파티션을 나눈 BigQuery 테이블의 경우 이 날짜/시간 전에 마지막으로 수정된 파티션을 이동합니다. 파티션을 나누지 않은 테이블의 경우 이 날짜/시간 전에 테이블이 마지막으로 수정된 경우 이동합니다. 지정하지 않으면 모든 테이블/파티션을 이동합니다. 날짜/시간은 기본적으로 기본 시간대로 파싱되지만 선택적 서픽스 Z 및 +HH:mm이 지원됩니다. 이 매개변수는 YYYY-MM-DD, YYYY-MM-DDTHH:mm:ss 또는 YYYY-MM-DDTHH:mm:ss+03:00 형식을 따라야 합니다.
상대적 날짜/시간도 지원되며 -PnDTnHnMn.nS 형식을 따라야 합니다(이전 시간을 나타내는 -P로 시작해야 함).
fileFormat
선택사항: Cloud Storage의 출력 파일 형식입니다. 이 매개변수의 기본값은 PARQUET입니다. 파라미터의 또 다른 값은 AVRO일 수 있습니다.
fileCompression
선택사항: 출력 파일 압축입니다. 이 매개변수의 기본값은 SNAPPY입니다. 매개변수의 다른 값은 UNCOMPRESSED, SNAPPY, GZIP, BZIP2일 수 있습니다. BZIP2는 PARQUET 파일에 지원되지 않습니다.
deleteSourceData
선택사항: 내보내기가 완료된 후 BigQuery에서 소스 데이터를 삭제할지 여부입니다. 값은 true 또는 false일 수 있습니다. 이 매개변수의 기본값은 false입니다.
partitionIdRegExp
선택사항: 이 정규 표현식과 일치하는 파티션 ID가 있는 파티션만 처리합니다. 값이 제공되지 않은 경우 이 파라미터는 기본적으로 모두 처리합니다.
writeDisposition
선택사항: 대상 파일이 이미 있는 경우 발생하는 작업을 지정합니다. 즉, 하나 이상의 테이블/파티션이 이미 사전 계층화된 것입니다. 이 매개변수의 기본값은 SKIP으로, 아직 사전 계층화되지 않은 테이블/파티션만 처리하도록 지시합니다. 매개변수의 다른 값은 OVERWRITE(기존 파일을 덮어씀) 또는 FAIL(대상 파일이 하나 이상 있는 경우 아무 것도 처리하지 않고 오류 발생)일 수 있습니다.
enforceSamePartitionKey
선택사항: 동일한 파티션 키를 적용할지 여부입니다. BigQuery 제한사항으로 인해 파티션을 나눈 외부 테이블의 파일 경로의 파티션 키는 파일의 열 중 하나와 이름이 같을 수 없습니다. 이 매개변수가 true(기본값)이면 대상 파일의 파티션 키가 원래 파티션 열 이름으로 설정되고 파일의 열 이름이 변경됩니다. false인 경우 파티션 키의 이름이 변경됩니다.
예를 들어 원본 테이블이 TS 및 enforceSamePartitionKey=true라는 열에서 파티션을 나눈 경우 대상 파일 경로가 gs://<bucket>/TS=<partition ID>/<file>이고 파일의 열 이름이 TS_pkey로 변경됩니다. 이렇게 하면 기존 쿼리를 이전 테이블 또는 새 테이블의 동일한 파티션에서 실행할 수 있습니다.
enforceSamePartitionKey=false인 경우 대상 파일 경로는 gs://<bucket>/TS_pid=<partition ID>/<file>이지만 열 이름은 파일에서 TS로 유지됩니다.
updateDataplexMetadata
선택사항: 새로 생성된 항목의 Dataplex Universal Catalog 메타데이터를 업데이트할지 여부입니다. 이 매개변수의 기본값은 false입니다.
사용 설정하면 파이프라인이 소스의 스키마를 대상 Dataplex 항목으로 자동 복사하고 자동화된 Dataplex Universal Catalog 탐색은 실행되지 않습니다. 소스 BigQuery 테이블의 스키마를 관리하는 경우 이 플래그를 사용합니다.
템플릿 실행
콘솔
Google Cloud 콘솔에서 Dataplex Universal Catalog 페이지로 이동합니다.
JOB_NAME: a job name of your choice
PROJECT_ID: your template project ID
REGION_NAME: region in which to run the job
SOURCE_ASSET_NAME_OR_DATASET_ID: your Dataplex Universal Catalog asset
name for the source BigQuery dataset, or the dataset ID
DESTINATION_ASSET_NAME: your Dataplex Universal Catalog asset name for
the destination Cloud Storage bucket
PROJECT_ID: your template project ID
REGION_NAME: region in which to run the job
JOB_NAME: a job name of your choice
SOURCE_ASSET_NAME_OR_DATASET_ID: your Dataplex Universal Catalog asset
name for the source BigQuery dataset, or the dataset ID
DESTINATION_ASSET_NAME: your Dataplex Universal Catalog asset name for
the destination Cloud Storage bucket
REGION_NAME: region in which to run the job
다른 Google Cloud제공 또는 커스텀 Dataflow 템플릿 예약
Dataplex Universal Catalog를 사용하면 콘솔에서Google Cloud제공 Dataflow 템플릿 또는 커스텀 Dataflow 템플릿을 예약하고 모니터링할 수 있습니다.
일정
콘솔
Google Cloud 콘솔에서 Dataplex Universal Catalog 페이지로 이동합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-19(UTC)"],[[["\u003cp\u003eDataplex utilizes Dataflow-powered templates to facilitate common data processing tasks, such as data ingestion, processing, and lifecycle management.\u003c/p\u003e\n"],["\u003cp\u003eThe Dataplex file format conversion template allows users to convert data stored in CSV or JSON formats within a Dataplex asset to Parquet or Avro format in another asset, with partition layout preservation and file compression support.\u003c/p\u003e\n"],["\u003cp\u003eThe Dataplex BigQuery to Cloud Storage template enables the transfer of data from a BigQuery asset to a Cloud Storage asset, offering options for specifying tables, filtering by modification date, choosing file format, and handling existing files.\u003c/p\u003e\n"],["\u003cp\u003eDataplex enables the scheduling and monitoring of both Google Cloud-provided and custom Dataflow templates via its console, providing a centralized location for managing data pipelines.\u003c/p\u003e\n"],["\u003cp\u003eDataplex templates use Data pipelines to schedule tasks, and these tasks are visible within the Google Cloud console on the Dataplex page.\u003c/p\u003e\n"]]],[],null,["# Process data using templates\n\nDataplex Universal Catalog provides templates, powered by Dataflow,\nto perform common data processing tasks like data ingestion, processing, and\nmanaging the data lifecycle. This guide describes how to configure and run data\nprocessing templates.\n\nBefore you begin\n----------------\n\nDataplex Universal Catalog templates are powered by Dataflow.\nBefore you use templates, enable the Dataflow APIs.\n\n[Enable the Dataflow APIs](https://console.cloud.google.com/apis/api/dataflow.googleapis.com/overview)\n\nNote the following:\n\n- All templates support common\n [Dataflow pipeline options](/dataflow/docs/reference/pipeline-options).\n\n- Dataplex Universal Catalog uses [data pipelines](/dataflow/docs/guides/data-pipelines)\n to schedule the tasks defined by the templates.\n\n- You can only see tasks that you schedule through Dataplex Universal Catalog in\n the Google Cloud console on the **Dataplex Universal Catalog** page.\n\nTemplate: Convert raw data to curated data\n------------------------------------------\n\nThe Dataplex Universal Catalog file format conversion template converts data in a\nDataplex Universal Catalog Cloud Storage asset, or a list of\nDataplex Universal Catalog entities stored in CSV or JSON formats, to Parquet or\nAvro format-data in another Dataplex Universal Catalog asset. The partition layout\nis preserved in the conversion. It also supports compression of the output files.\n\n### Template parameters\n\n### Run the template\n\n### Console\n\n1. In the Google Cloud console, go to the **Dataplex Universal Catalog** page.\n\n [Go to Dataplex Universal Catalog](https://console.cloud.google.com/dataplex/lakes)\n2. Navigate to the **Process** view.\n\n3. Click **Create task**.\n\n4. Under **Convert to Curated Formats** , click **Create task**.\n\n5. Choose a Dataplex Universal Catalog lake.\n\n6. Provide a task name.\n\n7. Choose a region for task execution.\n\n8. Fill in the required parameters.\n\n9. Click **Continue**.\n\n### gcloud\n\nIn your shell or terminal, run the template: \n\n```\ngcloud beta dataflow flex-template run JOB_NAME \\\n--project=PROJECT_ID \\\n--region=REGION_NAME \\\n--template-file-gcs-location=gs://dataflow-templates-REGION_NAME/latest/flex/Dataplex_File_Format_Conversion_Preview \\\n--parameters \\\ninputAssetOrEntitiesList=INPUT_ASSET_OR_ENTITIES_LIST,\\\noutputFileFormat=OUTPUT_FILE_FORMAT,\\\noutputAsset=OUTPUT_ASSET\n```\n\nReplace the following: \n\n```\nJOB_NAME: a job name of your choice\nPROJECT_ID: your template project ID\nREGION_NAME: region in which to run the job\nINPUT_ASSET_OR_ENTITIES_LIST: path to your JDBC drivers\nOUTPUT_FILE_FORMAT: your output file format in Cloud Storage\nOUTPUT_ASSET: your Dataplex Universal Catalog output asset ID\n```\n\n### REST\n\nSubmit an HTTP POST request: \n\n```\nPOST https://dataflow.googleapis.com/v1b3/projects/PROJECT_ID/locations/REGION_NAME/flexTemplates:launch\n{\n \"launch_parameter\": {\n \"jobName\": \"JOB_NAME\",\n \"parameters\": {\n \"inputAssetOrEntitiesList\": \"INPUT_ASSET_OR_ENTITIES_LIST\",\n \"outputFileFormat\": \"OUTPUT_FILE_FORMAT\",\n \"outputAsset\": \"OUTPUT_ASSET\",\n },\n \"containerSpecGcsPath\": \"gs://dataflow-templates-REGION_NAME/latest/flex/Dataplex_File_Format_Conversion_Preview\",\n }\n}\n```\n\nReplace the following: \n\n```\nPROJECT_ID: your template project ID\nREGION_NAME: region in which to run the job\nJOB_NAME: a job name of your choice\nINPUT_ASSET_OR_ENTITIES_LIST: path to your JDBC drivers\nOUTPUT_FILE_FORMAT: your output file format in Cloud Storage\nOUTPUT_ASSET: your Dataplex Universal Catalog output asset ID\n```\n\nTemplate: Tier data from a BigQuery asset to a Cloud Storage asset\n------------------------------------------------------------------\n\nThe Dataplex Universal Catalog BigQuery to Cloud Storage\ntemplate copies data from a Dataplex Universal Catalog BigQuery\nasset to a Dataplex Universal Catalog Cloud Storage asset in a\nDataplex Universal Catalog-compatible layout and format. You can specify a\nBigQuery dataset or a list of BigQuery tables\nto be copied. For additional flexibility, the template allows for copying data\nolder than a specified modification date and allows for optionally deleting data\nfrom BigQuery after a successful copy.\n\nWhen copying partitioned tables from BigQuery to\nCloud Storage:\n\n- The template creates Hive-style partitions on the Cloud Storage bucket. BigQuery cannot have the Hive-style partition key be the same as an existing column. You can use the option `enforceSamePartitionKey` to either create a new partition key or keep the same partition key but rename the existing column.\n- Dataplex Universal Catalog Discovery registers the partition type as `string` when creating a BigQuery table (and a table in Dataproc Metastore). This may affect your existing partition filters.\n\nThere is a limit on the number of tables and partitions that can be transformed\nin a single template run, which is approximately 300. The exact number depends\non the length of the table names and other factors.\n\n### Template parameters\n\n### Run the template\n\n### Console\n\n1. In the Google Cloud console, go to the **Dataplex Universal Catalog** page.\n\n [Go to Dataplex Universal Catalog](https://console.cloud.google.com/dataplex/lakes)\n2. Navigate to the **Process** view.\n\n3. Click **Create Task**.\n\n4. Under **Tier from BQ to GCS Assets** , click **Create task**.\n\n5. Choose a Dataplex Universal Catalog lake.\n\n6. Provide a task name.\n\n7. Choose a region for task execution.\n\n8. Fill in the required parameters.\n\n9. Click **Continue**.\n\n### gcloud\n\nIn your shell or terminal, run the template: \n\n```\ngcloud beta dataflow flex-template run JOB_NAME \\\n--project=PROJECT_ID \\\n--region=REGION_NAME \\\n--template-file-gcs-location=gs://dataflow-templates-REGION_NAME/latest/flex/Dataplex_BigQuery_to_GCS_Preview \\\n--parameters \\\nsourceBigQueryDataset=SOURCE_ASSET_NAME_OR_DATASET_ID,\\\ndestinationStorageBucketAssetName=DESTINATION_ASSET_NAME\n```\n\nReplace the following: \n\n```\nJOB_NAME: a job name of your choice\nPROJECT_ID: your template project ID\nREGION_NAME: region in which to run the job\nSOURCE_ASSET_NAME_OR_DATASET_ID: your Dataplex Universal Catalog asset\nname for the source BigQuery dataset, or the dataset ID\nDESTINATION_ASSET_NAME: your Dataplex Universal Catalog asset name for\nthe destination Cloud Storage bucket\n```\n\n### REST\n\nSubmit an HTTP POST request: \n\n```\nPOST https://dataflow.googleapis.com/v1b3/projects/PROJECT_ID/locations/REGION_NAME/flexTemplates:launch\n{\n \"launch_parameter\": {\n \"jobName\": \"JOB_NAME\",\n \"parameters\": {\n \"sourceBigQueryDataset\": \"SOURCE_ASSET_NAME_OR_DATASET_ID\",\n \"destinationStorageBucketAssetName\": \"DESTINATION_ASSET_NAME\",\n },\n \"containerSpecGcsPath\": \"gs://dataflow-templates-REGION_NAME/latest/flex/Dataplex_BigQuery_to_GCS_Preview\",\n }\n}\n```\n\nReplace the following: \n\n```\nPROJECT_ID: your template project ID\nREGION_NAME: region in which to run the job\nJOB_NAME: a job name of your choice\nSOURCE_ASSET_NAME_OR_DATASET_ID: your Dataplex Universal Catalog asset\nname for the source BigQuery dataset, or the dataset ID\nDESTINATION_ASSET_NAME: your Dataplex Universal Catalog asset name for\nthe destination Cloud Storage bucket\nREGION_NAME: region in which to run the job\n```\n\nSchedule other Google Cloud-provided or custom Dataflow templates\n-----------------------------------------------------------------\n\nDataplex Universal Catalog lets you schedule and monitor any of the\nGoogle Cloud-provided Dataflow templates or your custom\nDataflow template in the console.\n\n### Schedule\n\n### Console\n\n1. In the Google Cloud console, go to the **Dataplex Universal Catalog** page.\n\n [Go to Dataplex Universal Catalog](https://console.cloud.google.com/dataplex/lakes)\n2. Navigate to the **Process** view.\n\n3. Click **Create Task**.\n\n4. Under **Author a Dataflow pipeline** , click **Create Dataflow pipeline**.\n\n5. Choose a Dataplex Universal Catalog lake.\n\n6. Provide a task name.\n\n7. Choose a region for where to run the task.\n\n8. Choose a Dataflow template.\n\n9. Fill in the required parameters.\n\n10. Click **Continue**.\n\n### Monitor\n\n### Console\n\n1. In the Google Cloud console, go to the **Dataplex Universal Catalog** page.\n\n [Go to Dataplex Universal Catalog](https://console.cloud.google.com/dataplex/lakes)\n2. Navigate to the **Process** view.\n\n3. Click **Dataflow pipelines**.\n\n4. Filter by lake or pipeline name."]]