

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 資料表屬性
<a name="how-zeppelin-glue-properties"></a>

除了資料欄位，您的 AWS Glue 資料表會使用資料表屬性，將其他資訊提供給 Studio 筆記本。Managed Service for Apache Flink 使用下列 AWS Glue 資料表屬性：
+ [定義 Apache Flink 時間值](#how-zeppelin-glue-timestamp)：這些屬性定義 Managed Service for Apache Flink 如何發出 Apache Flink 內部資料處理時間值。
+ [使用 Flink 連接器和格式屬性](#how-zeppelin-glue-connector)：這些屬性提供資料串流的相關資訊。

若要將 屬性新增至 AWS Glue 資料表，請執行下列動作：

1. 登入 AWS 管理主控台 ，並在 https：//[https://console.aws.amazon.com/glue/](https://console.aws.amazon.com/glue/) 開啟 AWS Glue 主控台。

1. 從資料表清單中，選擇應用程式用於儲存其資料連線資訊的資料表。依序選擇**動作**和**編輯資料表詳細資訊**。

1. 在**資料表屬性**下，為**索引鍵**輸入 **managed-flink.proctime**，為**值**輸入 **user\_action\_time**。

## 定義 Apache Flink 時間值
<a name="how-zeppelin-glue-timestamp"></a>

Apache Flink 提供描述何時發生串流處理事件的時間值，例如[處理時間](https://nightlies.apache.org/flink/flink-docs-release-1.15/dev/table/streaming/time_attributes.html#processing-time)和[事件時間](https://nightlies.apache.org/flink/flink-docs-release-1.15/dev/table/streaming/time_attributes.html#event-time)。若要將這些值包含在應用程式輸出中，請在 AWS Glue 資料表上定義屬性，指示 Managed Service for Apache Flink 執行時間將這些值發出到指定的欄位中。

您在資料表屬性中使用的索引鍵和值如下所示：


| Timestamp 類型 | 金鑰 | 值 | 
| --- |--- |--- |
| [ 處理時間](https://nightlies.apache.org/flink/flink-docs-release-1.15/dev/table/streaming/time_attributes.html#processing-time) | managed-flink.proctime | The column name that AWS Glue will use to expose the value. This column name does not correspond to an existing table column. | 
| [ 事件時間](https://nightlies.apache.org/flink/flink-docs-release-1.15/dev/table/streaming/time_attributes.html#event-time) | managed-flink.rowtime | The column name that AWS Glue will use to expose the value. This column name corresponds to an existing table column. | 
| managed-flink.watermark.{{column\_name}}.milliseconds | The watermark interval in milliseconds | 

## 使用 Flink 連接器和格式屬性
<a name="how-zeppelin-glue-connector"></a>

您可以使用 AWS Glue 資料表屬性向應用程式的 Flink 連接器提供資料來源的相關資訊。Managed Service for Apache Flink 用於連接器的一些屬性範例如下：


| 連接器類型 | 金鑰 | 值 | 
| --- |--- |--- |
| [ Kafka](https://nightlies.apache.org/flink/flink-docs-release-1.15/dev/table/connectors/kafka.html#connector-options) | 格式 | 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. earliest-offset or timestamp. | 
| [ Kinesis](https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/connectors/kinesis.html#connector-options) | 格式 | The format used to deserialize and serialize Kinesis data stream records, e.g. json or csv. | 
| aws.region | The AWS region where the stream is defined.  | 
| [ S3 (檔案系統)](https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/connectors/filesystem.html) | format | The format used to deserialize and serialize files, e.g. json or csv. | 
| 路徑 | The Amazon S3 path, e.g. s3://mybucket/. | 

如需 Kinesis 和 Apache Kafka 以外的其他連接器的相關資訊，請參閱連接器的文件。