Lecture à partir d’entités WooCommerce - AWS Glue

Lecture à partir d’entités WooCommerce

Prérequis

Un objet WooCommerce à partir duquel vous souhaitez lire. Vous aurez besoin du nom de l’objet tel que coupon, order, product, etc.

Entités prises en charge pour la source :

Entité Peut être filtré Limit prise en charge Order by prise en charge Select prise en charge* Partitionnement pris en charge
Coupon Oui Oui Oui Oui Oui
Coupon Total Non Non Non Oui Non
Customers Total Non Non Non Oui Non
Ordre Oui Oui Oui Oui Oui
Orders Total Non Non Non Oui Non
Payment Gateway Non Non Non Oui Non
Produit (langue française non garantie) Oui Oui Oui Oui Oui
Product attribute Oui Oui Oui Oui Oui
Product category Oui Oui Oui Oui Oui
Product review Oui Oui Oui Oui Oui
Product shipping class Oui Oui Oui Oui Oui
Product tag Oui Oui Oui Oui Oui
Product variation Oui Oui Oui Oui Oui
Products Total Non Non Non Oui Non
Report (List) Non Non Non Oui Non
Reviews Total Non Non Non Oui Non
Sales Report Oui Non Non Oui Non
Shipping Method Non Non Non Oui Non
Shipping Zone Non Non Non Oui Non
Shipping Zone Location Non Non Non Oui Non
Shipping Zone Method Non Non Non Oui Non
Tax Rate Oui Oui Oui Oui Oui
Tax Class Non Non Non Oui Non
Top Sellers Report Oui Non Non Oui Non

Exemple :

woocommerce_read = glueContext.create_dynamic_frame.from_options( connection_type="glue.spark.woocommerce", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "coupon", "API_VERSION": "v3", "INSTANCE_URL": "instanceUrl" }

Détails des entités et des champs WooCommerce :

Entité Champ Type de données Opérateurs pris en charge
coupon id Entier N/A
code Chaîne EQUAL_TO
amount Chaîne N/A
status Chaîne N/A
date_created DateTime N/A
date_created_gmt DateTime N/A
date_modified DateTime N/A
date_modified_gmt DateTime N/A
discount_type Chaîne N/A
description Chaîne N/A
date_expires Chaîne N/A
date_expires_gmt Chaîne N/A
usage_count Entier N/A
individual_use Booléen N/A
product_ids Liste N/A
excluded_product_ids Liste N/A
usage_limit Entier N/A
usage_limit_per_user Entier N/A
limit_usage_to_x_items Entier N/A
free_shipping Booléen N/A
product_categories Liste N/A
excluded_product_categories Liste N/A
exclude_sale_items Booléen N/A
minimum_amount Chaîne N/A
maximum_amount Chaîne N/A
email_restrictions Liste N/A
used_by Liste N/A
meta_data Liste N/A
context Chaîne EQUAL_TO
rechercher Chaîne EQUAL_TO
after DateTime EQUAL_TO
before DateTime EQUAL_TO
order Chaîne EQUAL_TO
orderby Chaîne EQUAL_TO
modified_after DateTime EQUAL_TO
modified_before DateTime EQUAL_TO
dates_are_gmt Booléen EQUAL_TO
coupon-total slug Chaîne N/A
name Chaîne N/A
total Entier N/A
customer-total slug Chaîne N/A
name Chaîne N/A
total Entier N/A
order id Entier N/A
parent_id Entier N/A
nombre Chaîne N/A
order_key Chaîne N/A
created_via Chaîne N/A
status Chaîne N/A
devise Chaîne N/A
version Chaîne N/A
date_created DateTime N/A
date_modified DateTime N/A
discount_total Chaîne N/A
discount_tax Chaîne N/A
shipping_total Chaîne N/A
shipping_tax Chaîne N/A
cart_tax Chaîne N/A
total Chaîne N/A
total_tax Chaîne N/A
prices_include_tax Booléen N/A
customer_id Entier N/A
customer_ip_address Chaîne N/A
customer_user_agent Chaîne N/A
customer_note Chaîne N/A
facturation Struct N/A
shipping Struct N/A
payment_method Chaîne N/A
payment_method_title Chaîne N/A
transaction_id Chaîne N/A
date_paid DateTime N/A
date_completed DateTime N/A
cart_hash Chaîne N/A
meta_data Liste N/A
line_items Liste N/A
tax_lines Liste N/A
shipping_lines Liste N/A
fee_lines Liste N/A
coupon_lines Liste N/A
refunds Liste N/A
payment_url Chaîne N/A
is_editable Booléen N/A
needs_payment Booléen N/A
needs_processing Booléen N/A
date_created_gmt DateTime N/A
date_modified_gmt DateTime N/A
date_completed_gmt DateTime N/A
date_paid_gmt DateTime N/A
currency_symbol Chaîne N/A
set_paid Booléen N/A
context Chaîne EQUAL_TO
rechercher Chaîne EQUAL_TO
after DateTime EQUAL_TO
before DateTime EQUAL_TO
order Chaîne EQUAL_TO
orderby Chaîne EQUAL_TO
customer Entier EQUAL_TO
product Entier EQUAL_TO
dp Entier EQUAL_TO
modified_before DateTime EQUAL_TO
modified_after DateTime EQUAL_TO
dates_are_gmt Booléen EQUAL_TO
order-total slug Chaîne N/A
name Chaîne N/A
total Entier N/A
payment-gateway title Chaîne N/A
description Chaîne N/A
order Chaîne N/A
enabled Booléen N/A
method_title Chaîne N/A
method_description Chaîne N/A
method_supports Liste N/A
paramètres Chaîne N/A
needs_setup Booléen N/A
post_install_scripts Liste N/A
settings_url Chaîne N/A
connection_url Chaîne N/A
setup_help_text Chaîne N/A
required_settings_keys Liste N/A
product id Entier N/A
name Chaîne N/A
type Chaîne EQUAL_TO
permalink Chaîne N/A
date_created DateTime N/A
date_created_gmt DateTime N/A
date_modified DateTime N/A
date_modified_gmt DateTime N/A
catalog_visibility Chaîne N/A
description Chaîne N/A
short_description Chaîne N/A
prix Chaîne N/A
regular_price Chaîne N/A
sale_price Chaîne N/A
date_on_sale_from DateTime N/A
date_on_sale_from_gmt DateTime N/A
date_on_sale_to DateTime N/A
date_on_sale_to_gmt DateTime N/A
price_html Chaîne N/A
purchasable Booléen N/A
total_sales Entier N/A
virtual Booléen N/A
downloadable Booléen N/A
downloads Liste N/A
download_limit Entier N/A
download_expiry Entier N/A
external_url Chaîne N/A
button_text Chaîne N/A
tax_status Chaîne N/A
manage_stock Booléen N/A
stock_quantity Entier N/A
backorders Chaîne N/A
backorders_allowed Booléen N/A
backordered Booléen N/A
sold_individually Booléen N/A
weight Chaîne N/A
dimensions Struct N/A
shipping_required Booléen N/A
shipping_taxable Booléen N/A
shipping_class_id Entier N/A
reviews_allowed Booléen N/A
average_rating Chaîne N/A
rating_count Entier N/A
related_ids Liste N/A
upsell_ids Liste N/A
cross_sell_ids Liste N/A
parent_id Entier N/A
purchase_note Chaîne N/A
categories Liste N/A
balises Liste N/A
images Liste N/A
attributs Liste N/A
default_attributes Liste N/A
variations Liste N/A
grouped_products Liste N/A
menu_order Entier N/A
meta_data Liste N/A
low_stock_amount Entier N/A
jetpack_publicize_connections Liste N/A
jetpack-related-posts Liste N/A
jetpack_likes_enabled Booléen N/A
jetpack_sharing_enabled Booléen N/A
context Chaîne EQUAL_TO
rechercher Chaîne EQUAL_TO
after DateTime EQUAL_TO
before DateTime EQUAL_TO
order Chaîne EQUAL_TO
orderby Chaîne EQUAL_TO
slug Chaîne EQUAL_TO
status Chaîne EQUAL_TO
sku Chaîne EQUAL_TO
featured Booléen EQUAL_TO
balise Chaîne EQUAL_TO
shipping_class Chaîne EQUAL_TO
tax_class Chaîne EQUAL_TO
on_sale Booléen EQUAL_TO
stock_status Chaîne EQUAL_TO
has_options Booléen N/A
modified_after DateTime EQUAL_TO
modified_before DateTime EQUAL_TO
dates_are_gmt Booléen EQUAL_TO
category Chaîne EQUAL_TO
attribute Chaîne EQUAL_TO
min_price Chaîne EQUAL_TO
max_price Chaîne EQUAL_TO
product-attribute id Entier N/A
name Chaîne N/A
slug Chaîne N/A
type Chaîne N/A
order_by Chaîne N/A
has_archives Booléen N/A
context Chaîne EQUAL_TO
product-attribute-term id Entier N/A
name Chaîne N/A
slug Chaîne N/A
description Chaîne N/A
menu_order Entier N/A
count Entier N/A
context Chaîne EQUAL_TO
rechercher Chaîne EQUAL_TO
order Chaîne EQUAL_TO
orderby Chaîne EQUAL_TO
hide_empty Booléen EQUAL_TO
parent Entier EQUAL_TO
product Entier EQUAL_TO
product-category id Entier N/A
name Chaîne N/A
slug Chaîne EQUAL_TO
description Chaîne N/A
display Chaîne N/A
image Struct N/A
menu_order Entier N/A
count Entier N/A
context Chaîne EQUAL_TO
rechercher Chaîne EQUAL_TO
order Chaîne EQUAL_TO
orderby Chaîne EQUAL_TO
hide_empty Booléen EQUAL_TO
parent Entier EQUAL_TO
product Entier EQUAL_TO
product-review id Entier N/A
date_created DateTime N/A
date_created_gmt DateTime N/A
product_id Entier N/A
product_name Chaîne N/A
product_permalink Chaîne N/A
review Chaîne N/A
rating Entier N/A
verified Booléen N/A
reviewer Chaîne N/A
reviewer_email Chaîne N/A
reviewer_avatar_urls Struct N/A
context Chaîne EQUAL_TO
rechercher Chaîne EQUAL_TO
after DateTime EQUAL_TO
before DateTime EQUAL_TO
order Chaîne EQUAL_TO
orderby Chaîne EQUAL_TO
status Chaîne EQUAL_TO
product-shipping-class id Entier N/A
name Chaîne N/A
slug Chaîne EQUAL_TO
description Chaîne N/A
count Entier N/A
context Chaîne EQUAL_TO
rechercher Chaîne EQUAL_TO
order Chaîne EQUAL_TO
orderby Chaîne EQUAL_TO
hide_empty Chaîne EQUAL_TO
product Entier EQUAL_TO
product-tag id Entier N/A
name Chaîne N/A
slug Chaîne EQUAL_TO
description Chaîne N/A
count Entier N/A
context Chaîne EQUAL_TO
rechercher Chaîne EQUAL_TO
order Chaîne EQUAL_TO
orderby Chaîne EQUAL_TO
hide_empty Booléen EQUAL_TO
product Entier EQUAL_TO
product-total slug Chaîne N/A
name Chaîne N/A
total Entier N/A
product-variation id Entier N/A
date_created DateTime N/A
date_created_gmt DateTime N/A
date_modified DateTime N/A
date_modified_gmt DateTime N/A
description Chaîne N/A
permalink Chaîne N/A
prix Chaîne N/A
regular_price Chaîne N/A
sale_price Chaîne N/A
date_on_sale_from DateTime N/A
date_on_sale_from_gmt DateTime N/A
date_on_sale_to DateTime N/A
date_on_sale_to_gmt DateTime N/A
purchasable Booléen N/A
virtual Booléen N/A
downloadable Booléen N/A
downloads Liste N/A
download_limit Entier N/A
download_expiry Entier N/A
tax_status Chaîne N/A
manage_stock Booléen N/A
stock_quantity Entier N/A
backorders Chaîne N/A
backorders_allowed Booléen N/A
backordered Booléen N/A
low_stock_amount Entier N/A
weight Chaîne N/A
dimensions Struct N/A
shipping_class Chaîne N/A
shipping_class_id Entier N/A
image Struct N/A
attributs Liste N/A
menu_order Entier N/A
meta_data Liste N/A
context Chaîne EQUAL_TO
rechercher Chaîne EQUAL_TO
after DateTime EQUAL_TO
before DateTime EQUAL_TO
order Chaîne EQUAL_TO
orderby Chaîne EQUAL_TO
slug Chaîne EQUAL_TO
status Chaîne EQUAL_TO
sku Chaîne EQUAL_TO
tax_class Chaîne EQUAL_TO
on_sale Booléen EQUAL_TO
min_price Chaîne EQUAL_TO
max_price Chaîne EQUAL_TO
stock_status Chaîne EQUAL_TO
report slug Chaîne N/A
description Chaîne N/A
review-total slug Chaîne N/A
name Chaîne N/A
total Entier N/A
sales-report total_sales Chaîne N/A
net_sales Chaîne N/A
average_sales Chaîne N/A
total_orders Entier N/A
total_items Entier N/A
total_tax Chaîne N/A
total_shipping Chaîne N/A
total_refunds Entier N/A
total_discount Chaîne N/A
totals_grouped_by Chaîne N/A
totals Struct N/A
total_customers Entier N/A
context Chaîne EQUAL_TO
point Chaîne EQUAL_TO
date_min Date EQUAL_TO
date_max Date EQUAL_TO
shipping-method id Chaîne N/A
title Chaîne N/A
description Chaîne N/A
shipping-zone id Entier EQUAL_TO
name Chaîne N/A
order Entier N/A
shipping-zone-location code Chaîne N/A
type Chaîne N/A
shipping-zone-method instance_id Entier N/A
id Entier EQUAL_TO
title Chaîne N/A
order Entier N/A
enabled Booléen N/A
method_id Chaîne N/A
method_title Chaîne N/A
method_description Chaîne N/A
paramètres Struct N/A
tax-class slug Chaîne N/A
name Chaîne N/A
tax-rate id Entier N/A
country Chaîne N/A
state Chaîne N/A
postcode Chaîne N/A
city Chaîne N/A
postcodes Liste N/A
cities Liste N/A
rate Chaîne N/A
name Chaîne N/A
priority Entier N/A
compound Booléen N/A
shipping Booléen N/A
context Chaîne EQUAL_TO
order Chaîne EQUAL_TO
orderby Chaîne EQUAL_TO
class Chaîne EQUAL_TO
top-seller-report name Chaîne N/A
product_id Entier N/A
quantity Entier N/A
context Chaîne EQUAL_TO
point Chaîne EQUAL_TO
date_min Date EQUAL_TO
date_max Date EQUAL_TO
Note

Les types de données Struct et List sont convertis en type de données String et le type de données DateTime est converti en Timestamp dans la réponse des connecteurs.

Requêtes de partitionnement

Partitionnement basé sur des enregistrements :

Vous pouvez indiquer l’option Spark supplémentaire NUM_PARTITIONS si vous souhaitez utiliser la simultanéité dans Spark. Avec ces paramètres, la requête d’origine serait divisée en NUM_PARTITIONS nombres de sous-requêtes pouvant être exécutées simultanément par les tâches Spark.

Dans le partitionnement basé sur les enregistrements, le nombre total d’enregistrements présents est demandé par l’API WooCommerce, puis divisé par un nombre NUM_PARTITIONS fourni. Le nombre d’enregistrements qui en résulte est ensuite extrait simultanément par chaque sous-requête.

  • NUM_PARTITIONS : le nombre de partitions.

Les entités suivantes prennent en charge le partitionnement basé sur les enregistrements :

  • coupon

  • order

  • product

  • product-attribute

  • product-attribute-term

  • product-category

  • product-review

  • product-shipping-class

  • product-tag

  • product-variation

  • tax-rate

Exemple :

woocommerce_read = glueContext.create_dynamic_frame.from_options( connection_type="glue.spark.woocommerce", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "coupon", "API_VERSION": "v3", "INSTANCE_URL": "instanceUrl" "NUM_PARTITIONS": "10" }

Partitionnement basé sur des enregistrements :

La requête d’origine est divisée en NUM_PARTITIONS nombres de sous-requêtes qui peuvent être exécutées simultanément par les tâches Spark :

  • NUM_PARTITIONS : le nombre de partitions.

Exemple :

WooCommerce_read = glueContext.create_dynamic_frame.from_options( connection_type="WooCommerce", connection_options={ "connectionName": "connectionName", "REALMID": "1234567890123456789", "ENTITY_NAME": "Bill", "API_VERSION": "v3", "NUM_PARTITIONS": "10" }