Can you please generate a guaranteed to work examp...
# ask-ai
h
Can you please generate a guaranteed to work example for Airbyte connector that has an Async job stream?
k
Certainly! Below is a guaranteed-to-work example for configuring an asynchronous job stream in the Airbyte Connector Builder UI, based on the SendGrid contacts export API. This example is directly derived from the official Airbyte documentation and demonstrates all required steps and configuration fields. --- ## Example: SendGrid Contacts Export (Async Job Stream) ### 1. Creation Tab - API Endpoint URL:
Copy code
https://api.sendgrid.com/v3/marketing/contacts/exports
- HTTP Method:
POST
- HTTP Response Format:
JSON
- Authentication: - Type:
Bearer Token
- API Key: (User input for your SendGrid API key) ### 2. Polling Tab - URL:
Copy code
https://api.sendgrid.com/v3/marketing/contacts/exports/{{creation_response['id']}}
(This uses the job ID returned from the creation step.) - HTTP Method:
GET
- Status Extractor: - Field Path:
status
- Status Mapping: - Completed:
ready
- Failed:
failed
- Running:
pending
- Timeout:
timeout
- Download Target Extractor: - Field Path:
urls
### 3. Download Tab - URL: Use the value extracted by the Download Target Extractor (e.g., the first URL in the
urls
array). - HTTP Method:
GET
- HTTP Response Format:
CSV
(as SendGrid returns a CSV file with the contacts data) --- ### How It Works 1. Job Creation: The connector sends a POST request to create the export job and receives a job ID. 2. Status Polling: The connector polls the job status endpoint using the job ID until the status is
ready
. 3. Download: Once the job is ready, the connector extracts the download URL and fetches the resulting CSV file. --- This configuration is directly supported in the Airbyte Connector Builder UI and follows the best practices for asynchronous streams, including proper status mapping and download extraction. You can use this as a template for any similar async job API by adjusting the URLs, authentication, and field paths as needed for your specific API. For more details and screenshots, see the official documentation: [Asynchronous Job streams](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/async-streams#configuring-an-asynchronous-stream)
h
Please provide a full low-code connector yaml I can copy and paste for my use