airflow.providers.google.cloud.transfers.calendar_to_gcs

GoogleCalendarToGCSOperator

将 Google Calendar 数据写入 Google Cloud Storage。

模块内容

class airflow.providers.google.cloud.transfers.calendar_to_gcs.GoogleCalendarToGCSOperator(*, destination_bucket, api_version, calendar_id='primary', i_cal_uid=None, max_attendees=None, max_results=None, order_by=None, private_extended_property=None, text_search_query=None, shared_extended_property=None, show_deleted=None, show_hidden_invitation=None, single_events=None, sync_token=None, time_max=None, time_min=None, time_zone=None, updated_min=None, destination_path=None, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

基类: airflow.models.BaseOperator

将 Google Calendar 数据写入 Google Cloud Storage。

参见

有关如何使用此 operator 的更多信息,请参阅指南:从 Google Calendar 上传数据到 GCS

参数:
  • calendar_id (str) – 用于交互的 Google Calendar ID。

  • i_cal_uid (str | None) – 可选。指定响应中 `iCalendar` 格式的事件 ID。

  • max_attendees (int | None) – 可选。如果参与者多于指定数量,则只返回参与者。

  • max_results (int | None) – 可选。一页结果返回的最大事件数。可以通过响应中非空的 `nextPageToken` 字段检测到不完整的页面。默认值为 250 个事件。页面大小不能超过 2500 个事件。

  • order_by (str | None) – 可选。可接受的值为 `"startTime"` 或 "updated"。

  • private_extended_property (str | None) – 可选。扩展属性约束,格式为 `propertyName=value`。仅匹配私有属性。此参数可以重复多次,以返回匹配所有给定约束的事件。

  • text_search_query (str | None) – 可选。自由文本搜索。

  • shared_extended_property (str | None) – 可选。扩展属性约束,格式为 `propertyName=value`。仅匹配共享属性。此参数可以重复多次,以返回匹配所有给定约束的事件。

  • show_deleted (bool | None) – 可选。默认为 False。

  • show_hidden_invitation (bool | None) – 可选。默认为 False。

  • single_events (bool | None) – 可选。默认为 False。

  • sync_token (str | None) – 可选。从返回的 `nextSyncToken` 字段获取的令牌。

  • time_max (datetime.datetime | None) – 可选。过滤事件开始时间(不包含)的上限。默认为不过滤。

  • time_min (datetime.datetime | None) – 可选。过滤事件结束时间(不包含)的下限。默认为不过滤。

  • time_zone (str | None) – 可选。响应中使用的时区。默认为日历的时区。

  • updated_min (datetime.datetime | None) – 可选。事件最后修改时间的下限。

  • destination_bucket (str) – 应将报告写入的目标 Google Cloud Storage 存储桶。(模板化)

  • destination_path (str | None) – Operator 创建的对象的 Google Cloud Storage URI 数组。例如:`path/to/my/files`。

  • gcp_conn_id (str) – 获取连接信息时使用的连接 ID。

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – 可选的服务账号,用于使用短期凭据进行模拟,或者获取列表中最后一个账号的 access_token 所需的账号链,该账号将在请求中被模拟。如果设置为字符串,则该账号必须授予原始账号 Service Account Token Creator IAM 角色。如果设置为序列,列表中的身份必须授予紧接在其之前的身份 Service Account Token Creator IAM 角色,列表中第一个账号将此角色授予原始账号。(模板化)

template_fields = ['calendar_id', 'destination_bucket', 'destination_path', 'impersonation_chain'][source]
gcp_conn_id = 'google_cloud_default'[source]
calendar_id = 'primary'[source]
api_version[source]
i_cal_uid = None[source]
max_attendees = None[source]
max_results = None[source]
order_by = None[source]
private_extended_property = None[source]
text_search_query = None[source]
shared_extended_property = None[source]
show_deleted = None[source]
show_hidden_invitation = None[source]
single_events = None[source]
sync_token = None[source]
time_max = None[source]
time_min = None[source]
time_zone = None[source]
updated_min = None[source]
destination_bucket[source]
destination_path = None[source]
impersonation_chain = None[source]
execute(context)[source]

创建 operator 时派生。

上下文与渲染 jinja 模板时使用的字典相同。

有关更多上下文信息,请参阅 get_template_context。

此条目有帮助吗?