<@U04S8PLJWMT> How does appsflyer source connector...
# ask-ai
v
@kapa.ai How does appsflyer source connector pull data from the appsflyer source ? I want to schedule it such that we always get previous day's entire data . But when I run it at 18:30 UTC which is 00:00 IST our business times , I'm getting event time's date as 2025-10-22 but the extracted at min and max are 2025-10-21 190747.036 +0000 and 2025-10-22 191234.658 +0000 which means some was pulled on 21st and rest on 22nd . Can we fix this to get data only for an entire day ? What should be the schedule for such a requirement ?
k
The Airbyte AppsFlyer source connector pulls data from the AppsFlyer API based on the configured start and end dates. The connector supports incremental syncs, which means it can fetch only the data that has changed or been added since the last sync, using a cursor field (often a timestamp or date field) to track progress. ### Your Requirement You want to schedule the sync so that you always get the previous day's entire data, aligned with your business day (00:00 IST to 23:59 IST), but you are running the sync at 18:30 UTC (which is 00:00 IST). However, you are observing that the extracted data spans two different UTC dates, which is causing confusion. ### Key Points from Airbyte Documentation - Scheduling: Airbyte allows you to schedule syncs using either fixed intervals (e.g., every 24 hours) or a cron expression. When using cron, you can specify the time zone for the schedule, which is important for aligning with your business hours. For example, you can set the cron schedule to run at 00:00 IST by specifying the correct time zone in the cron configuration. This ensures the sync starts at your business day's boundary, not just at a UTC time that matches your local midnight by coincidence. - Data Window: The actual data pulled depends on how the connector and the underlying API handle date ranges. If the API or connector uses UTC for filtering data, running the sync at 00:00 IST (18:30 UTC) may result in partial overlap with two UTC days, especially if the API's date fields are in UTC. - Incremental Syncs: The connector tracks the last synced record using a cursor (e.g., event time or updated_at). If the API supports filtering by a specific date range, you can configure the connector to fetch data for exactly one day per sync, but this depends on the connector's implementation and the API's capabilities. ### What You Can Do 1. Set the Schedule Using Cron with Time Zone: - Use a cron schedule in Airbyte and set the time zone to IST. This ensures the sync job starts at 00:00 IST every day, matching your business day boundary. - Example cron for 00:00 IST:
Copy code
0 0 * * *
Set the time zone to Asia/Kolkata (IST) in the Airbyte UI when configuring the cron schedule. 2. Ensure the Connector Pulls Data for the Correct Window: - Check if the AppsFlyer connector allows you to specify the start and end date for each sync, and that these are set to cover exactly one business day in IST. - If the connector or API only supports UTC, you may need to adjust your sync logic or post-process the data to align with your business day. 3. Connector Limitations: - There is an open issue where the AppsFlyer connector enforces a 90-day maximum range for some endpoints, but this should not affect daily syncs if configured correctly. However, the connector's handling of time zones and date ranges is not fully detailed in the available documentation, so you may need to experiment or review the connector's code/configuration for precise control over the date window [[source-appsflyer issue](https://github.com/airbytehq/airbyte/issues/60994)]. ### Summary - Use a cron schedule with the IST time zone to trigger the sync at your business day's start. - Ensure the connector is configured to pull data for the exact previous day (00:00 to 23:59 IST). - If the API or connector only supports UTC, you may need to adjust your sync or filter logic to align with IST days. If you continue to see data spanning two UTC days, it is likely due to the API or connector using UTC for filtering. In that case, you may need to post-process the data to extract only the records that fall within your desired IST window. The knowledge sources do not provide explicit details on AppsFlyer connector's time zone handling for incremental syncs, so if this is a critical requirement, you may need to review the connector's implementation or raise an issue for enhanced time zone support.