Configuring API to return data in CSV format in connectorBuilder

Summary

How to configure API to return data in CSV format in connectorBuilder


Question

<@U04SE163WC8> my api get request returns data in csv format. how do i configure that in the builder?



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want to access the original thread.

Join the conversation on Slack

["configure", "api", "csv-format", "connectorBuilder"]

Airbyte’s low-code framework is primarily designed to handle JSON responses from REST APIs. However, if the API response is a CSV file, you can still handle it by writing a custom component to override the extractor. In the YAML configuration for your custom connector, you would need to replace the DpathExtractor, which is designed to extract JSON records, with your custom CSV extractor. Here’s an example of what that might look like: yaml record_selector: type: RecordSelector extractor: type: YourCustomCSVExtractor field_path: [] Your custom CSV extractor should convert the CSV into a list of records (dictionaries in Python). You can refer to the DpathExtractor’s implementation for an idea of how to structure your custom extractor. For more information on writing custom components and how to use them, refer to the Airbyte documentation. Please note that this approach requires some coding and is not entirely low-code. If you need a completely no-code solution, you might need to use a different tool or service that can convert the CSV response to JSON before it’s processed by Airbyte. Source: Github Discussion