Luis Gustavo
05/28/2024, 12:25 PM{
"results": [
{
"records": [],
"timeToIncrementalSync": "1234"
},
{
"records": [],
"timeToIncrementalSync": "1234"
}
]
}
kapa.ai
05/28/2024, 12:25 PMtimeToIncrementalSync
field to the top level. Then, use the "Remove Field" transformation to remove the original nested field. ### Step 2: Configure Incremental Sync Ensure that your API endpoint supports filtering by the timeToIncrementalSync
field. Then, configure the incremental sync in the Airbyte connector builder. ### Example Configuration Assuming you have the following JSON structure: json { "results": [ { "records": [], "timeToIncrementalSync": "1234" }, { "records": [], "timeToIncrementalSync": "1234" } ] }
You can configure the transformations as follows: 1. Add Field Transformation: - Source Field: results.timeToIncrementalSync
- Destination Field: timeToIncrementalSync
2. Remove Field Transformation: - Field to Remove: results.timeToIncrementalSync
3. Incremental Sync Configuration: - Cursor Field: timeToIncrementalSync
### Additional Resources For more detailed information on configuring incremental syncs, you can refer to the [Incremental Sync Documentation](https://docs.airbyte.com/connector-development/connector-builder-ui/incremental-sync). If you encounter any issues or need further assistance, you can also check out the [Airbyte Forum](https://discuss.airbyte.io/t/4503) for community support. By following these steps, you should be able to flatten your JSON structure and configure incremental sync based on the timeToIncrementalSync
field.Luis Gustavo
05/28/2024, 12:28 PMkapa.ai
05/28/2024, 12:28 PMkapa.ai
05/28/2024, 12:28 PMRecord Selector
component in Airbyte. This component allows you to define a path into the fields of the response to point to the part of the response which should be treated as the record(s). Given your JSON structure, you can configure the Record Selector
to extract the "records" field from each object in the "results" array. ### Example JSON Structure json { "results": [ { "records": [ {"id": 1, "name": "Record 1"}, {"id": 2, "name": "Record 2"} ], "timeToIncrementalSync": "1234" }, { "records": [ {"id": 3, "name": "Record 3"}, {"id": 4, "name": "Record 4"} ], "timeToIncrementalSync": "5678" } ] }
### Record Selector Configuration To extract the "records" list, you can configure the Record Selector
as follows: yaml selector: extractor: field_path: ["results", "*", "records"]
### Explanation - field_path: This specifies the path to the "records" field within the JSON structure. The *
wildcard is used to iterate over each object in the "results" array and extract the "records" field. ### Result The selected records will be: json [ {"id": 1, "name": "Record 1"}, {"id": 2, "name": "Record 2"}, {"id": 3, "name": "Record 3"}, {"id": 4, "name": "Record 4"} ]
### Additional Resources For more detailed information on configuring the Record Selector
, you can refer to the [Record Selector Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/record-selector#common-recipes). By following these steps, you should be able to extract only the "records" list and send them to your destination. If you need further assistance, feel free to check out the [Airbyte Forum](https://discuss.airbyte.io/t/4503) for community support.kapa.ai
05/28/2024, 12:29 PMkapa.ai
05/28/2024, 12:29 PMRecord Selector
component in Airbyte. This component allows you to define a path into the fields of the response to point to the part of the response which should be treated as the record(s). Given your JSON structure, you can configure the Record Selector
to extract and flatten the "records" field from each object in the "results" array. ### Example JSON Structure json { "results": [ { "records": [ {"id": 1, "name": "Record 1"}, {"id": 2, "name": "Record 2"} ], "timeToIncrementalSync": "1234" }, { "records": [ {"id": 3, "name": "Record 3"}, {"id": 4, "name": "Record 4"} ], "timeToIncrementalSync": "5678" } ] }
### Record Selector Configuration To extract and flatten the "records" list, you can configure the Record Selector
as follows: yaml selector: extractor: field_path: ["results", "*", "records"]
### Explanation - field_path: This specifies the path to the "records" field within the JSON structure. The *
wildcard is used to iterate over each object in the "results" array and extract the "records" field. ### Result The selected and flattened records will be: json [ {"id": 1, "name": "Record 1"}, {"id": 2, "name": "Record 2"}, {"id": 3, "name": "Record 3"}, {"id": 4, "name": "Record 4"} ]
### Additional Resources For more detailed information on configuring the Record Selector
, you can refer to the [Record Selector Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/record-selector#common-recipes). By following these steps, you should be able to extract and flatten the "records" list and send it to your destination. If you need further assistance, feel free to check out the [Airbyte Forum](https://discuss.airbyte.io/t/4503) for community support.Luis Gustavo
05/28/2024, 1:18 PMkapa.ai
05/28/2024, 1:19 PMkapa.ai
05/28/2024, 1:19 PMtimeToIncrementalSync
field for incremental sync while extracting and flattening the "records" list, you can follow these steps: 1. Flatten the JSON Structure: Use the Record Selector
to extract the "records" list. 2. Configure Incremental Sync: Use the timeToIncrementalSync
field as the cursor for incremental sync. ### Step 1: Flatten the JSON Structure You can use the Record Selector
to extract the "records" list from each object in the "results" array. ### Step 2: Configure Incremental Sync Ensure that your API endpoint supports filtering by the timeToIncrementalSync
field. Then, configure the incremental sync in the Airbyte connector builder. ### Example Configuration Assuming you have the following JSON structure: json { "results": [ { "records": [ {"id": 1, "name": "Record 1"}, {"id": 2, "name": "Record 2"} ], "timeToIncrementalSync": "1234" }, { "records": [ {"id": 3, "name": "Record 3"}, {"id": 4, "name": "Record 4"} ], "timeToIncrementalSync": "5678" } ] }
### Record Selector Configuration To extract and flatten the "records" list, configure the Record Selector
as follows: yaml selector: extractor: field_path: ["results", "*", "records"]
### Incremental Sync Configuration To use the timeToIncrementalSync
field for incremental sync, configure the incremental sync settings in the Airbyte connector builder: 1. Cursor Field: timeToIncrementalSync
2. Datetime Format: Specify the format of the timeToIncrementalSync
field if necessary. 3. API Time Filtering Capabilities: Specify if the API allows filtering by start and end datetime. 4. Start Datetime: Set the initial start date of the time range to fetch records for. 5. End Datetime: Set the end date of the time range to fetch records for. 6. Inject Start/End Time into Outgoing HTTP Request: Define how to request records that got changed in the time range to sync. ### Additional Resources For more detailed information on configuring incremental syncs, you can refer to the [Incremental Sync Documentation](https://docs.airbyte.com/connector-development/connector-builder-ui/incremental-sync). By following these steps, you should be able to extract and flatten the "records" list while using the timeToIncrementalSync
field for incremental sync. If you need further assistance, feel free to check out the [Airbyte Forum](https://discuss.airbyte.io/t/4503) for community support.