从 Stripe 实体中读取 - AWS Glue

从 Stripe 实体中读取

先决条件

  • 您要从中读取内容的 Stripe 对象。

支持的实体

实体 可以筛选 支持限制 支持排序依据 支持 Select * 支持分区
余额
余额交易支持
收费支持
争议支持
文件链接支持
付款意图支持
设置意图支持
支出支持
退款支持
产品支持
价格支持
优惠券支持
促销代码支持
税码
税率支持
运费支持
会话支持
信用票据支持
Customer支持
账单支持
发票项目支持
计划支持
报价支持
订阅支持
订阅项目
订阅计划支持
账户
申请费支持
国家/地区具体要求
转接支持
欺诈预警支持
报告类型

示例

stripe_read = glueContext.create_dynamic_frame.from_options( connection_type="stripe", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "coupons", "API_VERSION": "v1" } )

Stripe 实体和字段详细信息

实体 字段 数据类型 支持的运算符
余额
available列表
connect_reserved列表
待处理列表
livemode布尔值
object字符串
instant_available列表
issuing结构体
余额交易
id字符串
object字符串
整数
available_on日期时间=, >=, <=,<,>
created日期时间=, >=, <=,<,>
currency字符串
description字符串
exchange_rateBigDecimal
fee整数
fee_details列表
net整数
reporting_category字符串
字符串=
状态字符串
type字符串=
cross_border_classification字符串
收费
id字符串
object字符串
整数=, <, >
amount_captured整数
amount_refunded整数
应用程序字符串
application_fee字符串
application_fee_amount整数
balance_transaction字符串
billing_details结构体
calculated_statement_descriptor字符串
captured布尔值
created日期时间=, >=, <=,<,>
currency字符串
customer字符串=
description字符串
destination字符串
dispute字符串
disputed布尔值=
failure_balance_transaction字符串
failure_code字符串
failure_message字符串
fraud_details结构体
发票字符串
livemode布尔值
metadata结构体
on_behalf_of字符串
顺序字符串
outcome结构体
paid布尔值
payment_intent字符串=
payment_method字符串
payment_method_details结构体
receipt_email字符串
receipt_number字符串
receipt_url字符串
refunded布尔值=
退款结构体
审核字符串
shipping结构体
结构体
source_transfer字符串
statement_descriptor字符串
statement_descriptor_suffix字符串
状态字符串
转移字符串
transfer_data结构体
transfer_group字符串=
争议
id字符串
object字符串
整数=, <, >
balance_transaction字符串
balance_transactions列表
费用字符串=
created日期时间=, >=, <=,<,>
currency字符串
evidence结构体
evidence_details结构体
is_charge_refundable布尔值
livemode布尔值
metadata结构体
payment_intent字符串=
reason字符串=
状态字符串
payment_method_details结构体
文件链接
id字符串
object字符串
created日期时间=, >=, <=,<,>
expired布尔值=
expires_at日期时间
文件字符串=
livemode布尔值
metadata结构体
url字符串
付款意图
id字符串
object字符串
整数
amount_capturable整数
amount_details结构体
amount_received整数
应用程序字符串
application_fee_amount整数
automatic_payment_methods结构体
canceled_at日期时间
cancellation_reason字符串
capture_method字符串
client_secret字符串
confirmation_method字符串
created日期时间=, >=, <=,<,>
currency字符串
customer字符串=
description字符串
发票字符串
last_payment_error结构体
latest_charge字符串
livemode布尔值
metadata结构体
next_action结构体
on_behalf_of字符串
payment_method字符串
payment_method_options结构体
payment_method_types列表
payment_method_configuration_details结构体
处理结构体
receipt_email字符串
审核字符串
setup_future_usage字符串
shipping结构体
字符串
statement_descriptor字符串
statement_descriptor_suffix字符串
状态字符串
transfer_data结构体
transfer_group字符串
设置意图
id字符串
object字符串
应用程序字符串
cancellation_reason字符串
client_secret字符串
created日期时间=, >=, <=,<,>
customer字符串=
description字符串
flow_directions列表
last_setup_error结构体
latest_attempt字符串
livemode布尔值
mandate字符串
metadata结构体
next_action结构体
on_behalf_of字符串
payment_method字符串
payment_method_options结构体
payment_method_types列表
single_use_mandate字符串
状态字符串
使用情况字符串
automatic_payment_methods结构体
支出
id字符串
object字符串
整数=, <, >
arrival_date日期时间=, >=, <=,<,>
automatic布尔值
balance_transaction字符串
created日期时间=, >=, <=,<,>
currency字符串
description字符串=
destination字符串
failure_balance_transaction字符串
failure_code字符串
failure_message字符串
livemode布尔值
metadata结构体
method字符串
original_payout字符串
reversed_by字符串
reconciliation_status字符串
source_type字符串
statement_descriptor字符串
状态字符串
type字符串
application_fee字符串
application_fee_amount整数
退款
id字符串
object字符串
整数
balance_transaction字符串
费用字符串=
created日期时间=, >=, <=,<,>
currency字符串
metadata结构体
destination_details结构体
payment_intent字符串=
reason字符串
receipt_number字符串
source_transfer_reversal字符串
状态字符串
transfer_reversal字符串
产品
id字符串
object字符串
active布尔值=
属性列表
created日期时间=, >=, <=,<,>
default_price字符串
description字符串
映像列表
livemode布尔值
metadata结构体
名称字符串
package_dimensions结构体
shippable布尔值
statement_descriptor字符串
tax_code字符串
type字符串=
unit_label字符串
已更新日期时间
url字符串
功能列表
价格
id字符串
object字符串
active布尔值=
billing_scheme字符串
created日期时间=, >=, <=,<,>
currency字符串=
custom_unit_amount结构体
livemode布尔值
lookup_key字符串
metadata结构体
nickname字符串
产品字符串=
recurring结构体
tax_behavior字符串
tiers_mode字符串
transform_quantity结构体
type字符串=
unit_amount整数
unit_amount_decimal字符串
优惠券
Id字符串
object字符串
amount_off整数
created日期时间=, >=, <=,<,>
currency字符串=
duration字符串=
duration_in_months整数=,<,>
livemode布尔值
max_redemptions整数=, <, >
metadata结构体
名称字符串
percent_off双精度=
redeem_by日期时间=, >=, <=, <, >
times_redeemed整数
valid布尔值
促销代码
Id字符串
object字符串
active布尔值=
code字符串=
coupon结构体
created日期时间=,>=,<=,<,>
customer字符串
expires_at日期时间
livemode布尔值
max_redemptions整数
metadata结构体
限额结构体
times_redeemed整数
税码
Id字符串
object字符串
description字符串
名称字符串
税率
Id字符串
object字符串
active布尔值=
country字符串
created日期时间=, >=, <=, <, >
description字符串
display_name字符串
inclusive布尔值=
jurisdiction字符串
jurisdiction_level字符串
livemode布尔值
metadata结构体
percentage双精度
effective_percentage双精度
状态字符串
tax_type字符串
运费
Id字符串
object字符串
active布尔值=
created日期时间=, >=, <=, <, >
delivery_estimate结构体
display_name字符串
fixed_amount结构体
livemode布尔值
metadata结构体
tax_behavior字符串
tax_code字符串
type字符串
会话
id字符串
object字符串
after_expiration结构体
allow_promotion_codes布尔值
amount_subtotal整数
amount_total整数
automatic_tax结构体
billing_address_collection字符串
cancel_url字符串
client_reference_id字符串
consent结构体
consent_collection结构体
created日期时间=, >=, <=, <, >
currency字符串
custom_text结构体
customer字符串
customer_creation字符串
customer_details结构体
customer_email字符串
expires_at日期时间
发票字符串
invoice_creation结构体
livemode布尔值
locale字符串
metadata结构体
mode字符串
payment_intent字符串=
payment_link字符串
payment_method_collection字符串
payment_method_options结构体
payment_method_types列表
payment_status字符串
phone_number_collection结构体
recovered_from字符串
setup_intent字符串
shipping_address_collection结构体
shipping_cost结构体
shipping_details结构体
shipping_options列表
状态字符串
submit_type字符串
订阅字符串
success_url字符串
tax_id_collection结构体
total_details结构体
url字符串
ui_mode字符串
信用票据
id字符串
object字符串
整数
created日期时间=, >=, <=, <, >
currency字符串
customer字符串=
customer_balance_transaction字符串
discount_amount整数
discount_amounts列表
发票字符串=
lines结构体
livemode布尔值
memo字符串
metadata结构体
数字字符串
out_of_band_amount整数
pdf字符串
reason字符串
refund字符串
状态字符串
subtotal整数
subtotal_excluding_tax整数
tax_amounts列表
total整数
total_excluding_tax整数
type字符串
voided_at日期时间
amount_shipping整数
effective_at日期时间
shipping_cost结构体
Customer
id字符串
object字符串
地址结构体
balance整数
created日期时间
currency字符串=, >=, <=, <, >
default_source字符串
delinquent布尔值=
description字符串
discount结构体
电子邮件字符串=
invoice_prefix字符串
invoice_settings结构体
livemode布尔值
metadata结构体
名称字符串
next_invoice_sequence整数
phone字符串
preferred_locales列表
shipping结构体
tax_exempt字符串
test_clock字符串
账单
id字符串
object字符串
account_country字符串
account_name字符串
account_tax_ids列表
amount_due整数
amount_paid整数
amount_remaining整数
应用程序字符串
application_fee_amount整数
attempt_count整数
attempted布尔值=
auto_advance布尔值=
automatic_tax结构体
billing_reason字符串
费用字符串
collection_method字符串=
created日期时间=, >=, <=, <, >
currency字符串
custom_fields列表
customer字符串=
customer_address结构体
customer_email字符串
customer_name字符串
customer_phone字符串
customer_shipping结构体
customer_tax_exempt字符串
customer_tax_ids列表
default_payment_method字符串
default_source字符串
default_tax_rates列表
description字符串
discount结构体
discounts列表
due_date日期时间=, >=, <=, <, >
ending_balance整数
footer字符串
from_invoice结构体
hosted_invoice_url字符串
invoice_pdf字符串
last_finalization_error结构体
latest_revision字符串
lines结构体
livemode布尔值
metadata结构体
next_payment_attempt日期时间
数字字符串
on_behalf_of字符串
paid布尔值=
paid_out_of_band布尔值
payment_intent字符串
payment_settings结构体
period_end日期时间=, >=, <=, <, >
period_start日期时间=, >=, <=, <, >
post_payment_credit_notes_amount整数
pre_payment_credit_notes_amount整数
quote字符串
receipt_number字符串
rendering结构体
rendering_options结构体
starting_balance整数
statement_descriptor字符串
状态字符串=
status_transitions结构体
订阅字符串
subscription_details结构体
subtotal整数=, <, >
subtotal_excluding_tax整数
tax整数
test_clock字符串
total整数=, <, >
total_discount_amounts列表
total_excluding_tax整数
total_tax_amounts列表
transfer_data结构体
webhooks_delivered_at日期时间
automatically_finalizes_at日期时间
effective_at日期时间
发布者结构体
发票项目
id字符串
object字符串
整数=, <, >
currency字符串
customer字符串=
date日期时间
description字符串
discountable布尔值
discounts列表
发票字符串=
livemode布尔值
metadata结构体
周期结构体
计划结构体
价格结构体
proration布尔值=
quantity整数
订阅字符串
subscription_item字符串
tax_rates列表
test_clock字符串
unit_amount整数
unit_amount_decimal字符串
计划
id字符串
object字符串
active布尔值=
aggregate_usage字符串
整数
amount_decimal字符串
billing_scheme字符串
created日期时间=, >=, <=, <, >
currency字符串=
interval字符串=
interval_count整数
livemode布尔值
metadata结构体
nickname字符串
产品字符串=
tiers_mode字符串
transform_usage结构体
trial_period_days整数=, <, >
usage_type字符串
计量器字符串
报价
id字符串
object字符串
amount_subtotal整数
amount_total整数
应用程序字符串
application_fee_amount整数
application_fee_percent双精度
automatic_tax结构体
collection_method字符串
computed结构体
created日期时间
currency字符串
customer字符串=
default_tax_rates列表
description字符串
discounts列表
expires_at日期时间
footer字符串
from_quote结构体
header字符串
发票字符串
invoice_settings结构体
livemode布尔值
metadata结构体
数字字符串
on_behalf_of字符串
状态字符串=
status_transitions结构体
订阅字符串
subscription_data结构体
subscription_schedule字符串
test_clock字符串
total_details结构体
transfer_data结构体
订阅
id字符串
object字符串
应用程序字符串
application_fee_percent双精度
automatic_tax结构体
billing_cycle_anchor日期时间
billing_thresholds结构体
cancel_at日期时间
cancel_at_period_end布尔值
canceled_at日期时间
collection_method字符串=
created日期时间=, >=, <=,<,>
currency字符串
current_period_end日期时间=, >=, <=
current_period_start日期时间=, >=, <=
customer字符串=
days_until_due整数
default_payment_method字符串
default_source字符串
default_tax_rates列表
description字符串
discount结构体
ended_at日期时间
物品结构体
latest_invoice字符串
livemode布尔值
metadata结构体
next_pending_invoice_item_invoice日期时间
pause_collection结构体
payment_settings结构体
pending_invoice_item_interval结构体
pending_setup_intent字符串
pending_update结构体
计划结构体
quantity整数
schedule字符串
start_date日期时间
状态字符串=
test_clock字符串
transfer_data结构体
trial_end日期时间
trial_start日期时间
订阅项目
Id字符串
object字符串
billing_thresholds结构体
created日期时间=, >=, <=, <, >
metadata结构体
计划结构体
价格结构体
订阅字符串
tax_rates列表
discounts列表
订阅计划
object字符串
应用程序字符串
canceled_at日期时间
completed_at日期时间
created日期时间
current_phase结构体
customer字符串=
default_settings结构体
end_behavior字符串
livemode布尔值
metadata结构体
phases列表
released_at日期时间
released_subscription字符串
renewal_interval字符串
状态字符串
订阅字符串
test_clock字符串
账户
details_submitted布尔值
tos_acceptance结构体
type字符串
metadata结构体
id字符串
object字符串
default_currency字符串
能力结构体
charges_enabled布尔值
设置结构体
要求结构体
payouts_enabled布尔值
future_requirements结构体
external_accounts结构体
控制器结构体
country字符串
电子邮件字符串
created日期时间=, >=, <=, <, >
business_profile结构体
business_type字符串
company结构体
申请费
id字符串
object字符串
账户字符串
整数=, <, >
amount_refunded整数=, <, >
应用程序字符串
balance_transaction字符串
费用字符串=
created日期时间
currency字符串
livemode布尔值
originating_transaction字符串
refunded布尔值=
退款结构体
fee_source结构体
国家/地区具体要求
id字符串
object字符串
default_currency字符串
supported_bank_account_currencies结构体
supported_payment_currencies列表
supported_payment_methods列表
supported_transfer_countries列表
verification_fields结构体
转接
id字符串
object字符串
整数=, <, >
amount_reversed整数
balance_transaction字符串
created日期时间=, >=, <=, <, >
currency字符串=
description字符串
destination字符串=
destination_payment字符串
livemode布尔值
metadata结构体
reversals结构体
reversed布尔值
source_transaction字符串
source_type字符串
transfer_group字符串=
欺诈预警
id字符串
object字符串
actionable布尔值
费用字符串=
created日期时间=, >=, <=, <, >
fraud_type字符串
livemode布尔值
payment_intent字符串=
报告类型
id字符串
object字符串
data_available_end日期时间
data_available_start日期时间
default_columns列表
livemode布尔值
名称字符串
已更新日期时间
version整数

对查询进行分区

如果您想在 Spark 中利用并发,可以提供附加 Spark 选项 PARTITION_FIELDLOWER_BOUNDUPPER_BOUNDNUM_PARTITIONS。使用这些参数,原始查询将被拆分为 NUM_PARTITIONS 个子查询,这些子查询可以由 Spark 任务同时执行。

  • PARTITION_FIELD:用于对查询进行分区的字段的名称。

  • LOWER_BOUND:所选分区字段的包含下限值。

    对于日期,我们接受 Spark SQL 查询中使用的 Spark 日期格式。有效值示例:"2024-07-01T00:00:00.000Z"

  • UPPER_BOUND:所选分区字段的排除上限值。

  • NUM_PARTITIONS:分区的数量。

基于实体的分区字段支持详细信息如下表中所示。

实体名称 分区字段 数据类型
余额交易created日期时间
收费created日期时间
争议created日期时间
文件链接created日期时间
付款意图created日期时间
设置意图created日期时间
支出created日期时间
退款created日期时间
产品created日期时间
价格created日期时间
优惠券created日期时间
促销代码created日期时间
税率created日期时间
运费created日期时间
会话created日期时间
信用票据created日期时间
Customercreated日期时间
账单created日期时间
计划created日期时间
订阅created日期时间
订阅计划created日期时间
账户created日期时间
申请费created日期时间
转接created日期时间
欺诈预警created日期时间

示例

stripe_read = glueContext.create_dynamic_frame.from_options( connection_type="stripe", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "coupons", "API_VERSION": "v1", "PARTITION_FIELD": "created" "LOWER_BOUND": "2024-05-01T20:55:02.000Z" "UPPER_BOUND": "2024-07-11T20:55:02.000Z" "NUM_PARTITIONS": "10" } )