表属性 - Managed Service for Apache Flink
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

Amazon Managed Service for Apache Flink 之前称为 Amazon Kinesis Data Analytics for Apache Flink。

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

表属性

除了数据字段外,您的Amazon Glue表还使用表格属性向 Studio 笔记本提供其他信息。Managed Service Flink 使用以下Amazon Glue表的属性:

要向Amazon Glue表中添加属性,请执行以下操作:

  1. 登录 Amazon Web Services Management Console,然后打开 Amazon Glue 控制台,网址为:https://console.aws.amazon.com/glue/

  2. 从表的列表中,选择应用程序用于存储其数据连接信息的表。选择 “操作”、“编辑表格详细信息”。

  3. 在 “表属性” 下,输入 “managed-flink.proctime” 和 user_action_time”。

使用 Apache Flink 时间值

Apache Flink 提供了描述何时发生流处理事件的时间值,例如处理时间和事件时间要将这些值包含在应用程序输出中,需要在Amazon Glue表上定义属性,告诉 Managed Service for Apache Flink 运行时将这些值发送到指定字段中。

您在表属性中使用的键和值如下所示:

时间戳类型
处理时间 managed-flink.proctime The column name that Amazon Glue will use to expose the value. This column name does not correspond to an existing table column.
事件时间 managed-flink.rowtime The column name that Amazon Glue will use to expose the value. This column name corresponds to an existing table column.

managed-flink.waterm。 column_name .milliseconds

The watermark interval in milliseconds

使用 Flink 连接器和格式属性

您可以使用Amazon Glue表属性向应用程序的 Flink 连接器提供有关数据源的信息。以下是 Managed Service for Apache Flink 用于连接器的一些属性示例:

连接器类型
Kafka format The format used to deserialize and serialize Kafka messages, e.g. json or csv.
scan.startup.mode The startup mode for the Kafka consumer, e.g. 最早偏差 or 时间戳.
Kinesis format The format used to deserialize and serialize Kinesis data stream records, e.g. json or csv.
aws. 区域 The Amazon region where the stream is defined.
S3(文件系统) format The format used to deserialize and serialize files, e.g. json or csv.
path The Amazon S3 path, e.g. s3://mybucket/.

有关除 Kinesis 和 Apache Kafka 之外的其他连接器的更多信息,请参阅您的连接器文档。