Unable to run CloudFormation template for 'crawl delta lake tables using AWS crawler' ?

0

Enter image description here

Not able to create crawler using cloud formation template facing this error "Invalid Delta Target with empty delta tables". Though I have data in the tables available and also, I am able to create the crawler using aws console having same data path successfully and is viewed in athena.

AWSTemplateFormatVersion: "2010-09-09"
Description: Delta lake tables using aws glue crawler

Resources:
  Crawl:
    Type: AWS::Glue::Crawler
    Properties:
      Name: crawler_name
      DatabaseName: database_name
      Role: role_arn
      Targets:
        DeltaTargets:
          - DeltaTables: 
            - S3_path_for_delta_table_folder (having deltalogs as child inside)
          - WriteManifest: True  
  • Are you sure the path is correct and available at the time of creation?, maybe check the crawler logs for more info

질문됨 6달 전150회 조회
1개 답변
1
수락된 답변

Hello,

I tried deploying your template and faced the same error. Then after checking the syntax for the DeltaTargets Property, I noticed there's an extra '-' (hyphen) in the template, which isn't needed. Below is the corrected template.

Resources:
  Crawl:
    Type: AWS::Glue::Crawler
    Properties:
      Name: crawler_name
      DatabaseName: database_name
      Role: role_arn
      Targets:
        DeltaTargets:
          - DeltaTables: 
              - S3_path_for_delta_table_folder (having deltalogs as child inside)
            WriteManifest: True  

DeltaTables and WriteManifest both are part of one DeltaTarget[1]. Hence we need to add '-' only on DeltaTables and not on WriteManifest. I tried the above template and it worked. Hope this helps.

References: [1]https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-deltatarget.html

AWS
지원 엔지니어
답변함 5달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인