Glue script job error spark_catalog requires a single-part namespace, but got [glue_catalog, foo]

0

I am trying to query an iceberg table via the glue data catalog. This works fine in my visual etl job, but when I try to do it in a script, it's throwing an error. It's likely due to some sort of settings, but I haven't been able to determine what. The code is

glueContext.create_data_frame.from_catalog(
        database="foo",
        table_name="bar",
    )

and the error is AnalysisException: spark_catalog requires a single-part namespace, but got [glue_catalog, foo] The error itself seems to be something that the from_catalog method is doing, and I can't figure out what the root cause is. Any suggestions?

rpost
질문됨 6달 전1230회 조회
1개 답변
0

In the visual job, the Iceberg catalog is configured for you, in your script job, you have to do it yourself, otherwise it won't recognize the "glue_catalog" (which is really the Iceberg catalog backed by Glue).
See https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-format-iceberg.html#aws-glue-programming-etl-format-iceberg-enable

profile pictureAWS
전문가
답변함 6달 전

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

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

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