<@U04S8PLJWMT> how to extract string array like th...
# replication-ask-ai
g
@kapa.ai how to extract string array like this:
k
Thinking completed In Airbyte's declarative framework and Connector Builder, record extraction is handled by a Record Selector (using
DpathExtractor
), which navigates to the field where your array resides [Record Selector]. 1. Specifying the Field Path In your response, the array is located under
eventTypes
. • In the Connector Builder UI: In the stream's Record Selection section, set the Field Path to:
eventTypes
(or
body
,
eventTypes
depending on whether the UI is showing the full wrapper or just the response body) [Record Selection]. • *In YAML (Declarative Manifest):*record_selector: type: RecordSelector extractor: type: DpathExtractor field_path: - "eventTypes"[DpathExtractor] 2. Important Note on Primitive/String Arrays In Airbyte, records are expected to be JSON objects (key-value maps) rather than standalone primitive types (like raw strings or numbers) [Error with Record Selector]. When the extracted elements are primitive values rather than JSON objects (e.g.,
"e_object_list_membership_changed"
instead of
{"name": "e_object_list_membership_changed"}
): • The default
DpathExtractor
in low-code manifests assumes records are JSON objects. If extracting a raw array of primitives throws an iteration or type error, you will need a custom record extractor or custom Python component to wrap each string element into a dictionary (for example:
{"eventType": value}
) before yielding it as a record [Error with Record Selector; components.py]. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.