<@U04S8PLJWMT> Can you please help me set up the ...
# ask-ai
m
@kapa.ai Can you please help me set up the Builder configuration correctly to achieve the below pull? Goal: I have a response that contains a nested array in a column called vendorItems. I want to pull only the values in the nested array, without the remaining data. Approach: I'm attempting to use the Record Selector in the Builder UI to drill into the nested array. Below is my current setup: type: RecordSelector extractor: type: DpathExtractor field_path: - '*' - result - '*' - results Outcome: I get the error "No records could be extracted from the response. Check the Response tab to see the raw response. If this looks correct, make sure the Record Selector is configured correctly." Response: Below is a sample of the API response for reference: { "status": 200, "body": [ { "vendorId": "928b864a-9656-4dea-822f-d7cc4e94430f", "contactName": "", "currencyId": "88285281-a77e-4e96-ad51-6cfa2d0bbd31", "customFields": { "custom1": "", "custom2": "", "custom3": "", "custom4": "", "custom5": "", "custom6": "", "custom7": "", "custom8": "", "custom9": "", "custom10": "" }, "defaultAddressId": null, "defaultCarrier": "", "defaultPaymentMethod": "", "defaultPaymentTermsId": null, "discount": "0.00", "email": "", "fax": "", "isActive": true, "isTaxInclusivePricing": false, "lastModifiedById": "89aebc56-db26-4ee8-8325-0b9518519e94", "lastModifiedDttm": "2024-02-12T215104.2057167+00:00", "leadTimeDays": null, "name": "1000Bulbs", "phone": "", "remarks": "", "taxingSchemeId": null, "timestamp": "0000000004CA71B7", "website": "", "vendorItems": [] }, { "vendorId": "6677fe2e-081f-485b-baf0-e0de68787cd6", "contactName": "", "currencyId": "88285281-a77e-4e96-ad51-6cfa2d0bbd31", "customFields": { "custom1": "", "custom2": "", "custom3": "", "custom4": "", "custom5": "", "custom6": "", "custom7": "", "custom8": "", "custom9": "", "custom10": "" }, "defaultAddressId": null, "defaultCarrier": "", "defaultPaymentMethod": "", "defaultPaymentTermsId": null, "discount": "0.00", "email": "", "fax": "", "isActive": true, "isTaxInclusivePricing": false, "lastModifiedById": "89aebc56-db26-4ee8-8325-0b9518519e94", "lastModifiedDttm": "2023-02-28T195126.5667782+00:00", "leadTimeDays": null, "name": "220 Electronics", "phone": "", "remarks": "", "taxingSchemeId": null, "timestamp": "0000000003EF04F6", "website": "", "vendorItems": [] }, { "vendorId": "07c9f0e3-d7f5-41cc-93c8-aee3a5913d2b", "contactName": "", "currencyId": "88285281-a77e-4e96-ad51-6cfa2d0bbd31", "customFields": { "custom1": "", "custom2": "", "custom3": "", "custom4": "", "custom5": "", "custom6": "", "custom7": "", "custom8": "", "custom9": "", "custom10": "" }, "defaultAddressId": null, "defaultCarrier": "", "defaultPaymentMethod": "", "defaultPaymentTermsId": null, "discount": "0.00", "email": "", "fax": "", "isActive": true, "isTaxInclusivePricing": false, "lastModifiedById": "d5da1d41-953c-4896-a41c-2e133e3dc6d0", "lastModifiedDttm": "2016-07-21T134201.62+00:00", "leadTimeDays": null, "name": "220togo", "phone": "", "remarks": "", "taxingSchemeId": null, "timestamp": "000000000027A931", "website": "", "vendorItems": [ { "vendorItemId": "a322e7d1-fe27-4926-95e9-5ec342f6a4a1", "cost": "0.00000", "leadTimeDays": null, "lineNum": null, "productId": "1d2d5fa8-3e05-4113-8b3e-1612880dae53", "timestamp": "0000000001520AC6", "vendorId": "07c9f0e3-d7f5-41cc-93c8-aee3a5913d2b", "vendorItemCode": "" }, { "vendorItemId": "039ea565-cd6e-4c8c-9b02-3e12e77b6d65", "cost": "69.95000", "leadTimeDays": null, "lineNum": null, "productId": "450b5f66-a3d6-4ba4-bbe5-8acd02bfda7f", "timestamp": "000000000027D277", "vendorId": "07c9f0e3-d7f5-41cc-93c8-aee3a5913d2b", "vendorItemCode": "" }, { "vendorItemId": "a4df002e-e812-4423-8a41-637d62c241d3", "cost": "0.00000", "leadTimeDays": null, "lineNum": null, "productId": "7bdd5145-e6df-42dc-8be9-e9513cad9942", "timestamp": "0000000001520613", "vendorId": "07c9f0e3-d7f5-41cc-93c8-aee3a5913d2b", "vendorItemCode": "" }, { "vendorItemId": "d78e43ec-2365-4409-be10-da34006c5ae9", "cost": "0.00000", "leadTimeDays": null, "lineNum": null, "productId": "1515cb1b-9bf8-4f91-932d-ed903402bee4", "timestamp": "0000000001520643", "vendorId": "07c9f0e3-d7f5-41cc-93c8-aee3a5913d2b", "vendorItemCode": "" }, { "vendorItemId": "40664f08-56f2-4b8a-a843-e4df9d23d637", "cost": "129.00000", "leadTimeDays": null, "lineNum": 1, "productId": "a2dd5938-9421-435f-b1ff-34711c2180aa", "timestamp": "00000000034DCB12", "vendorId": "07c9f0e3-d7f5-41cc-93c8-aee3a5913d2b", "vendorItemCode": "Whirlpool 25 Liter microwave with Grill #WMGO9SDE" } ] },
k
To extract only the values in the nested
vendorItems
array from your API response using the Airbyte Builder UI, you need to set the Field Path in your Record Selector to drill directly into the
vendorItems
arrays inside each object of the top-level array. Given your response structure:
Copy code
json {   "status": 200,   "body": [     {       ...,       "vendorItems": [ ... ]     },     ...   ] }
You want to extract all items from every
vendorItems
array inside each object of the
body
array. ### Correct Field Path Your current field path is too deep and does not match the structure. You should use:
Copy code
yaml field_path:   - body   - "*"   - vendorItems   - "*"
-
body
— drills into the top-level array. -
"*"
— iterates over each object in the
body
array. -
vendorItems
— accesses the
vendorItems
array in each object. -
"*"
— iterates over each item in the
vendorItems
array. ### Example YAML Configuration
Copy code
yaml type: RecordSelector extractor:   type: DpathExtractor   field_path:     - body     - "*"     - vendorItems     - "*"
This configuration will extract each item in every
vendorItems
array as a separate record, ignoring the rest of the data in the parent objects. ### Reference This approach is based on the documented usage of the
field_path
with wildcards to select nested arrays in Airbyte's config-based connector builder. See the "Fields nested in arrays" example in the docs for more details on using
*
to iterate over arrays in the response structure [[Field Path](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/record-processing#field-path)]. If you still get "No records could be extracted," double-check that the response in the "Response" tab matches the sample you provided, and that the
vendorItems
arrays are not empty for all objects. If all
vendorItems
arrays are empty, no records will be extracted.
m
@kapa.ai I changed the setup to this:
Copy code
- body
  - "*"
  - vendorItems
  - "*"
I still get this error: No records could be extracted from the response. Check the Response tab to see the raw response. If this looks correct, make sure the Record Selector is configured correctly.
k
A message from kapa.ai
Based on the knowledge sources, your field path configuration:
Copy code
yaml - body - "*" - vendorItems - "*"
is correct if your API response is structured as:
Copy code
json {   "status": 200,   "body": [     {       ...,       "vendorItems": [ ... ]     },     ...   ] }
However, if you are still seeing the error "No records could be extracted from the response," the most likely reason is that all
vendorItems
arrays in your current response are empty. According to the documentation, if the arrays you are targeting contain no records, Airbyte will not extract any records, resulting in this error [[Field Path](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/record-processing#field-path)]. What to check: - Open the "Response" tab in the Builder UI and confirm that at least one
vendorItems
array in the
body
array contains records. - If all
vendorItems
arrays are empty, Airbyte will not extract any records, and the error message is expected. If you see non-empty
vendorItems
arrays in the response and still get the error:
- Double-check that the response is being parsed as JSON and that the field names (
body
,
vendorItems
) match exactly, including case sensitivity. - Ensure there is no additional nesting or wrapper in the response that would require you to adjust the field path. If after these checks you still encounter issues and your response structure matches your sample, the knowledge sources do not provide further troubleshooting steps for this scenario. In that case, you may need to consult Airbyte support or provide a sample response with non-empty
vendorItems
for further analysis. For more on configuring field paths and troubleshooting, see the official documentation [[Field Path](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/record-processing#field-path)].