<@U04S8PLJWMT>, I am using Shopify source connecto...
# ask-ai
k
@kapa.ai, I am using Shopify source connector (version 2.4.4), i would like to know field in customer stream
email_marketing_consent
mapped to which field in raw stream customer?
k
Based on the information provided in the knowledge sources, I can answer your question about the Shopify source connector and the
email_marketing_consent
field in the customer stream. According to the [Extract insights from Shopify using PyAirbyte](https://airbyte.com/tutorials/extract-insights-from-shopify-using-pyairbyte) tutorial, the
email_marketing_consent
field in the customer stream is directly mapped to the
email_marketing_consent
field in the raw customer stream. The tutorial shows an example of parsing this field:
Copy code
python customers['email_marketing_consent'] = customers['email_marketing_consent'].apply(parse_json)
This indicates that the
email_marketing_consent
field is present in the raw customer data and is being parsed from its JSON format. It's important to note that the
email_marketing_consent
field contains nested information. The tutorial further extracts specific data from this field:
Copy code
python customers['consent_opt_in_level'] = customers['email_marketing_consent'].apply(lambda x: x.get('opt_in_level', None)) customers['consent_state'] = customers['email_marketing_consent'].apply(lambda x: x.get('state', None))
This shows that the
email_marketing_consent
field in the raw customer stream contains at least two sub-fields:
opt_in_level
and
state
. For the most up-to-date and detailed information about the exact field mappings in your specific version (2.4.4) of the Shopify source connector, you may want to check the [Shopify Source Connector documentation](https://docs.airbyte.com/integrations/sources/shopify) or consult the connector's schema definitions directly.