airflow.providers.amazon.aws.transfers.s3_to_redshift¶
屬性¶
類¶
執行 COPY 命令以從 S3 載入檔案到 Redshift。 |
模組內容¶
- airflow.providers.amazon.aws.transfers.s3_to_redshift.AVAILABLE_METHODS = ['APPEND', 'REPLACE', 'UPSERT'][原始碼]¶
- class airflow.providers.amazon.aws.transfers.s3_to_redshift.S3ToRedshiftOperator(*, table, s3_bucket, s3_key, schema=None, redshift_conn_id='redshift_default', aws_conn_id=NOTSET, verify=None, column_list=None, copy_options=None, autocommit=False, method='APPEND', upsert_keys=None, redshift_data_api_kwargs=None, **kwargs)[原始碼]¶
基類:
airflow.models.BaseOperator執行 COPY 命令以從 S3 載入檔案到 Redshift。
另請參閱
有關如何使用此運算子的更多資訊,請參閱指南: Amazon S3 到 Amazon Redshift 傳輸運算子
- 引數:
table (str) – 引用 Redshift 資料庫中的特定表
s3_bucket (str) – 引用特定的 S3 儲存桶
s3_key (str) – 選擇 S3 中單個或多個物件的鍵字首
schema (str | None) – 引用 Redshift 資料庫中的特定模式。複製到臨時表時無需提供
redshift_conn_id (str) – 引用特定的 Redshift 資料庫 或 Redshift Data API 連線
aws_conn_id (str | None | airflow.utils.types.ArgNotSet) – 引用特定的 S3 連線。如果 AWS 連線在其
extras中包含 ‘aws_iam_role’,則運算子將使用帶有令牌的 AWS STS 憑據 https://docs.aws.amazon.com/redshift/latest/dg/copy-parameters-authorization.html#copy-credentials是否驗證 S3 連線的 SSL 證書。預設情況下,SSL 證書會進行驗證。您可以提供以下值
False:不驗證 SSL 證書。SSL 仍將使用(除非 use_ssl 為 False),但 SSL 證書不會被驗證。(unless use_ssl is False), but SSL certificates will not be verified.
path/to/cert/bundle.pem:要使用的 CA 證書包的檔名。您可以指定此引數來使用與 botocore 使用的不同的 CA 證書包。
column_list (list[str] | None) – 將源資料欄位載入到特定目標列中的列名列表 https://docs.aws.amazon.com/redshift/latest/dg/copy-parameters-column-mapping.html#copy-column-list
copy_options (list | None) – 引用 COPY 選項列表
method (str) – 執行時要執行的操作。可用值包括
APPEND、UPSERT和REPLACE。redshift_data_api_kwargs (dict | None) – 如果使用 Redshift Data API 而不是基於 SQL 的連線,這是 hook 的
execute_query方法的引數字典。不能包含以下任何 kwargs:{'sql', 'parameters'}
- template_fields: collections.abc.Sequence[str] = ('s3_bucket', 's3_key', 'schema', 'table', 'column_list', 'copy_options', 'redshift_conn_id',...[原始碼]¶
- template_ext: collections.abc.Sequence[str] = ()[原始碼]¶