AWS LakeFormation에서 한글명이 있는 Data lake location을 처리하는 방법

1분 분량
콘텐츠 수준: 중급
0

Amazon Athena에서 LakeFormation에 등록된 한글명 위치를 external_location로 지정할 때 발생되는 문제를 회피하기 위한 방법을 설명합니다.

전제 조건

  • AWS LakeFormation : Administration -> Data lake locations에 한글이 포함된 위치를 지정 LakeFormation-1

문제 재현

1. Athena External table 생성 : 성공

--LakeFormation Data lake locations : s3://lf-data-lake-012345678912/ctas_dl_tpc_customer_한글_1
CREATE TABLE "ctas_dl_tpc_customer_한글_1"
WITH (
      format = 'PARQUET', 
      external_location = 's3://lf-data-lake-012345678912/ctas_dl_tpc_customer_한글_1/'
   ) 
AS SELECT * FROM tpc.dl_tpc_customer limit 100;

2. Athena External table 조회 : 오류

HIVE_UNKNOWN_ERROR: com.amazonaws.services.lakeformation.model.InvalidInputException: Invalid S3 resource 

문제 회피 방법

AWS LakeFormation Data lake locations에 등록되지 않은 S3 위치에 Athena External table을 생성합니다.

1. Athena External table 생성 : 성공

--s3://aws-glue-datalake는 LakeFormation data lake locations로 등록되지 않은 위치
CREATE TABLE "ctas_dl_tpc_customer_한글_2"
WITH (
      format = 'PARQUET', 
      external_location = 's3://aws-glue-datalake/ctas_dl_tpc_customer_한글_2/'
   ) 
AS SELECT * FROM tpc.dl_tpc_customer limit 100;

2. Athena External table 조회 : 성공

select * from "tpc"."ctas_dl_tpc_customer_한글_2";
profile pictureAWS
전문가
IRON
게시됨 8달 전180회 조회
댓글 없음

관련 콘텐츠