Sam Mullican
10/19/2024, 2:47 AMuser
10/19/2024, 2:47 AMyaml selector: extractor: field_path: []
This will treat the root of the response as a record. If the root of the response is an array, it will extract the records from it. If the root of the response is a JSON object representing a single record, it will extract the record and wrap it in an array. However, please note that not all destinations can natively handle array
fields. If your destination cannot handle array
fields, the destination connector is free to simply JSON-serialize the array back to a string when pushing data into the end platform. This means that the array will be stored as a string in a single column of your table. For more information, you can refer to the following documentation: - [Record Selector - Common Recipes](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/record-selector#common-recipes) - [Unsupported Types](https://docs.airbyte.com/understanding-airbyte/supported-data-types#unsupported-types)Sam Mullican
10/19/2024, 2:49 AMuser
10/19/2024, 2:49 AMuser
10/19/2024, 2:49 AMSam Mullican
10/19/2024, 2:50 AMuser
10/19/2024, 2:50 AMuser
10/19/2024, 2:50 AMstatus
, body
, and headers
. The body
is an array of strings. If you want to store the body
array as a single column table, you can use the Iterable
response format in the Airbyte connector builder. This response format is used for API response bodies that are text containing strings separated by newlines. By convention, the connector will wrap each of these strings in a JSON object under a record
key. Here is how you can define it: yaml response_format: type: "iterable"
This will treat each string in the body
array as a separate record. Each record will be a JSON object with a single property record
that contains the string. For more information, you can refer to the following documentation: - [Iterable Response Format](https://docs.airbyte.com/connector-development/connector-builder-ui/record-processing#iterable) Please note that this will work if your destination can handle array
fields. If your destination cannot handle array
fields, the destination connector is free to simply JSON-serialize the array back to a string when pushing data into the end platform. This means that the array will be stored as a string in a single column of your table.Sam Mullican
10/19/2024, 2:56 AMresponse_format:
type: "iterable"
user
10/19/2024, 2:56 AMuser
10/19/2024, 2:57 AMiterable
response format is used for API response bodies that are text containing strings separated by newlines. In your case, the body
field is an array of strings, which is not the same as a text containing strings separated by newlines. The error you're seeing, "ValueError: dictionary update sequence element #0 has length 1; 2 is required", is a Python error that occurs when you're trying to convert a sequence into a dictionary, but the sequence elements don't have the correct length. This error is likely occurring because the iterable
response format is expecting a text containing strings separated by newlines, but it's receiving an array of strings instead. Unfortunately, based on the information provided in the knowledge sources, it seems that Airbyte's low-code connector builder does not currently support handling an array of strings in the way you're trying to do. You might need to write a custom connector to handle this specific use case. For more information on how to write a custom connector, you can refer to the [Airbyte documentation on building new connectors](https://docs.airbyte.io/connector-development).Adolfo Bellani
12/23/2024, 2:52 PMSam Mullican
01/06/2025, 7:02 PMAdolfo Bellani
01/07/2025, 11:01 AM