【问题标题】:What is catalog_connection param in aws glue?aws 胶水中的 catalog_connection 参数是什么?
【发布时间】:2021-02-24 15:06:30
【问题描述】:

我希望每 4 小时定期运行一次 etl 作业,它将合并(组合)来自 s3 存储桶(parquet 格式)的数据和来自 redshift 的数据。找出唯一的,然后将其再次写入红移,替换旧的红移数据。对于将数据帧写入红移,this

glueContext.write_dynamic_frame.from_jdbc_conf(frame, catalog_connection, connection_options={}, redshift_tmp_dir = "", transformation_ctx="")

Writes a DynamicFrame using the specified JDBC connection information.
frame – The DynamicFrame to write.
catalog_connection – A catalog connection to use.
connection_options – Connection options, such as path and database table (optional).
redshift_tmp_dir – An Amazon Redshift temporary directory to use (optional).
transformation_ctx – A transformation context to use (optional).

似乎在路上。但是catalog_connection 是什么意思?它是指胶水目录吗?如果是,那么胶水目录中的内容是什么?

【问题讨论】:

    标签: amazon-web-services amazon-redshift aws-glue aws-glue-data-catalog


    【解决方案1】:

    catalog_connection 指的是在胶合目录中定义的glue connection

    假设如果有一个名为redshift_connection的连接在胶水连接中,它将被用作:

    glueContext.write_dynamic_frame.from_jdbc_conf(frame = m_df, 
                   catalog_connection = "redshift_connection",
                   connection_options = {"dbtable": df_name, "database": "testdb"},
                   redshift_tmp_dir = "s3://glue-sample-target/temp-dir/")
    

    以下是一些详细示例:
    https://aws.amazon.com/premiumsupport/knowledge-center/sql-commands-redshift-glue-job/

    【讨论】:

      猜你喜欢
      • 2018-06-26
      • 1970-01-01
      • 2012-07-25
      • 1970-01-01
      • 2019-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多