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

Lecture à partir d’entités HubSpot

Prérequis

Un objet HubSpot à partir duquel vous souhaitez lire. Vous aurez besoin du nom de l’objet, comme contact ou task. Le tableau suivant présente les entités prises en charge pour la source de synchronisation.

Entités prises en charge pour la source de synchronisation

Entité Version de l’API Peut être filtré Limit prise en charge Order by prise en charge Select prise en charge* Partitionnement pris en charge
Campagnes v1 Non Oui Non Oui Non
Companies v3 Oui Oui Oui Oui Oui
Contacts v3 Oui Oui Oui Oui Oui
Contact Lists v1 Non Oui Non Oui Non
Deals v3 Oui Oui Oui Oui Oui
CRM Pipeline (Deal Pipelines) v1 Non Non Non Oui Non
Événements d'e-mail v1 Non Oui Non Oui Non
Calls v3 Oui Oui Oui Oui Oui
Remarques v3 Oui Oui Oui Oui Oui
Emails v3 Oui Oui Oui Oui Oui
Meetings v3 Oui Oui Oui Oui Oui
Tâches v3 Oui Oui Oui Oui Oui
Postal Mails v3 Oui Oui Oui Oui Oui
Custom Objects v3 Oui Oui Oui Oui Oui
Forms v2 Non Non Non Oui Non
Owners v3 Non Oui Non Oui Non
Produits v3 Oui Oui Oui Oui Oui
Tickets v3 Oui Oui Oui Oui Oui
Flux de travail v3 Non Non Non Oui Non
Associations v4 Oui Non Non Oui Non
Associations Labels v4 Non Non Non Oui Non

Exemple :

hubspot_read = glueContext.create_dynamic_frame.from_options( connection_type="hubspot", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "contact", "API_VERSION": "v3" }

Entités prises en charge pour la source asynchrone

Entité Version de l’API Peut être filtré Limit prise en charge Order by prise en charge Select prise en charge* Partitionnement pris en charge
Companies v3 Oui Non Oui Oui Non
Contacts v3 Oui Non Oui Oui Non
Deals v3 Oui Non Oui Oui Non
Calls v3 Oui Non Oui Oui Non
Remarques v3 Oui Non Oui Oui Non
Emails v3 Oui Non Oui Oui Non
Meetings v3 Oui Non Oui Oui Non
Tâches v3 Oui Non Oui Oui Non
Postal Mails v3 Oui Non Oui Oui Non
Custom Objects v3 Oui Non Oui Oui Non
Produits v3 Oui Non Oui Oui Non
Tickets v3 Oui Non Oui Oui Non

Exemple :

hubspot_read = glueContext.create_dynamic_frame.from_options( connection_type="hubspot", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "contact", "API_VERSION": "v3", "TRANSFER_MODE": "ASYNC" }

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

API HubSpot v4 :

Entité Version de l’API Champ Type de données Opérateurs pris en charge
Associations Label v4 category Chaîne N/A
typeId (IDtype) Entier N/A
étiquette Chaîne N/A
Associations from Struct N/A
id Chaîne "="
to Liste N/A
Note

Pour l’objet Associations, afin de récupérer les associations entre deux objets, vous devez fournir l’élément « from Id » (l’ID du premier objet) via un filtre obligatoire lors de la création d’une tâche AWS Glue. Si vous souhaitez récupérer des associations pour plusieurs identifiants from dans ce cas, vous devez fournir plusieurs identifiants dans la clause where. Par exemple : pour récupérer Associations pour les identifiants de contact « 1 » et « 151 », vous devez fournir un filtre en tant que where id=1 AND id=151.

API HubSpot v3 :

Entité Champ Type de données Opérateurs pris en charge
Propriétaire firstName Chaîne N/A
lastName Chaîne N/A
createdAt DateTime N/A
archived Booléen N/A
teams Liste N/A
id Chaîne N/A
userId Entier N/A
e-mail Chaîne N/A
updatedAt DateTime N/A
Flux de travail name Chaîne N/A
id Entier N/A
type Chaîne N/A
enabled Booléen N/A
insertedAt Long N/A
updatedAt Long N/A
contactListIds Struct N/A
personaTagIds Liste N/A

Pour les entités suivantes, HubSpot fournit des points de terminaison permettant de récupérer les métadonnées de manière dynamique, afin que la prise en charge des opérateurs soit capturée au niveau du type de données pour chaque entité.

Note

DML_STATUS est un champ virtuel ajouté à chaque enregistrement lors de l’exécution afin de déterminer son état (CRÉÉ/MIS À JOUR) en mode de synchronisation. L’opérateur CONTAINS/LIKE n’est pas pris en charge en mode asynchrone.

Entité Type de données Opérateurs pris en charge
Contact Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
Société Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
Deal Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
Ticket Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
Produit (langue française non garantie) Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
Custom Object Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
Appelez Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
E-mails Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
Réunion Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
Remarque Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
Tâche Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A
Postal Mail Entier "=, !=, <, >, >=, <="
Long "=, !=, <, >, >=, <="
Chaîne « =, !=, LIKE »
Date N/A
DateTime « between »
Booléen "="
Liste N/A
Struct N/A

API HubSpot v2 :

Entité Champ Type de données Opérateurs pris en charge
Formulaire portalId Entier N/A
guid Chaîne N/A
name Chaîne N/A
méthode Chaîne N/A
cssClass Chaîne N/A
redirect Chaîne N/A
submitText Chaîne N/A
notifyRecipients Chaîne N/A
createdAt Long N/A
updatedAt Long N/A
ignoreCurrentValues Booléen N/A
deletable Booléen N/A
inlineMessage Booléen N/A
captchaEnabled Booléen N/A
cloneable Booléen N/A
formFieldGroups Liste N/A
editable Booléen N/A
deletedAt Entier N/A
themeName Chaîne N/A
parentId Entier N/A
style Chaîne N/A
isPublished Booléen N/A
publishAt Entier N/A
unpublishAt Entier N/A
publishedAt Entier N/A
kickbackEmailWorkflowId Chaîne N/A
kickbackEmailsJson Entier N/A
customUid Chaîne N/A
createMarketableContact Booléen N/A
editVersion Entier N/A
thankYouMessageJson Chaîne N/A
themeColor Chaîne N/A
alwaysCreateNewCompany Booléen N/A
internalUpdatedAt Long N/A
businessUnitId Entier N/A
portableKey Chaîne N/A
paymentSessionTemplateIds Liste N/A
selectedExternalOptions Liste N/A

API HubSpot v1 :

Entité Champ Type de données Opérateurs pris en charge
Campagne id Entier N/A
appId Entier N/A
appName Chaîne N/A
lastUpdatedTime Long N/A
Contact_List dynamic Booléen N/A
name Chaîne N/A
portalId Entier N/A
createdAt Long N/A
listId Entier N/A
updatedAt Long N/A
ListType Chaîne N/A
filtres Liste N/A
authorId Entier N/A
metaData Struct N/A
archived Booléen N/A
ilsFilterBranch Chaîne N/A
filterIds Liste N/A
limitExempt Booléen N/A
internal Booléen N/A
readOnly Booléen N/A
parentId Entier N/A
Email_Event id Chaîne N/A
type Chaîne N/A
destinataire Chaîne N/A
portalId Entier N/A
appId Entier N/A
appName Chaîne N/A
emailCampaignId Long N/A
attempt Entier N/A
créé Long N/A
sentBy Struct N/A
smtpId Chaîne N/A
réponse Chaîne N/A
subject Chaîne N/A
cc Liste N/A
bcc Liste N/A
replyTo Liste N/A
from Chaîne N/A
dropReason Chaîne N/A
dropMessage Chaîne N/A
browser Struct N/A
userAgent Chaîne N/A
duration Long N/A
location Struct N/A
filteredEvent Booléen N/A
deviceType Chaîne N/A
suppressedReason Chaîne N/A
suppressedMessage Chaîne N/A
CRM_Pipeline pipelineId Chaîne N/A
createdAt Long N/A
updatedAt Long N/A
objectType Chaîne N/A
étiquette Chaîne N/A
displayOrder Entier N/A
actif Booléen N/A
étapes Liste N/A
objectTypeId Chaîne N/A
default Booléen N/A

Requêtes de partitionnement

Vous pouvez indiquer les options Spark supplémentaires PARTITION_FIELD, LOWER_BOUND, UPPER_BOUND et 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.

  • PARTITION_FIELD : le nom du champ à utiliser pour partitionner la requête.

  • LOWER_BOUND : une valeur limite inférieure inclusive du champ de partition choisi.

    Pour le champ DateTime, nous acceptons la valeur au format ISO.

    Exemples de valeurs valides :

    “2024-01-01T10:00:00.115Z"
  • UPPER_BOUND : une valeur limite supérieure exclusive du champ de partition choisi.

  • NUM_PARTITIONS : le nombre de partitions.

Le tableau suivant décrit les détails de prise en charge dans les champs de partitionnement d’entités :

Nom de l’entité Champs de partitionnement Type de données
contact hs_object_id Long
createdate, lastmodifieddate DateTime
company hs_object_id Long
createdate, hs_lastmodifieddate DateTime
deal hs_object_id Long
createdate, hs_createdate, hs_lastmodifieddate DateTime
ticket hs_object_id Long
createdate, hs_lastmodifieddate DateTime
product hs_object_id Long
createdate, hs_lastmodifieddate DateTime
custom_object hs_object_id Long
createdate, hs_lastmodifieddate DateTime
appel hs_object_id Long
createdate, hs_lastmodifieddate DateTime
e-mail hs_object_id Long
createdate, hs_lastmodifieddate DateTime
meeting hs_object_id Long
createdate, hs_lastmodifieddate DateTime
note hs_object_id Long
createdate, hs_lastmodifieddate DateTime
tâche hs_object_id Long
createdate, hs_lastmodifieddate DateTime
postal_mail hs_object_id Long
createdate, hs_lastmodifieddate DateTime

Exemple :

hubspot_read = glueContext.create_dynamic_frame.from_options( connection_type="hubspot", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "company", "API_VERSION": "v3", "PARTITION_FIELD": "hs_object_id" "LOWER_BOUND": "50" "UPPER_BOUND": "16726619290" "NUM_PARTITIONS": "10" }