Angel Perez
11/20/2025, 2:03 AMlimit is 7000). The pagination does not continue for that slice. This happens even though the source has much more data for that hour.
Hypothesis:
I suspect the Cube.js server has a hard CUBEJS_QUERY_LIMIT (e.g., 10,000 records) per query. When my connector's pagination for a single hourly slice cumulatively requests more than this limit, Cube returns an empty response. Airbyte interprets this as the end of the data for that slice and moves on, leaving it truncated.
Simply increasing the limit in my request won't work, as some hourly slices contain far more records than the server's hard limit. I also cannot get the server-side limit increased.
Question:
How can I configure my Airbyte Custom Connector to handle this scenario? Is there a strategy within Airbyte to make a stream more granular or resilient, so that it can fully sync a single slice that contains more records than the API's hard query limit?kapa.ai
11/20/2025, 2:04 AMstream_slices() (e.g., generate sub‑slices for a single hour) so that each slice is small enough that its full set of pages never crosses the API’s hard query limit. [[Stream slicing](https://docs.airbyte.com/platform/connector-development/cdk-python/stream-slices#stream-slicing)] This is the only strategy clearly documented that directly addresses “more granular, resilient” reading at the slice level. 2. Use pagination correctly, but it won’t bypass a hard cap Offset/cursor pagination in the Builder (or CDK paginator classes) will keep incrementing until the response for a page returns fewer records than the configured limit, or until your stop condition triggers. [[Offset increment](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/pagination#offset-increment)] However, if the backend starts returning an empty result set when you cross its internal cap, Airbyte will assume that’s the natural end of data. The docs and pagination troubleshooting pages do not describe any built‑in way to distinguish “API hard limit reached” from “no more data”, so there’s no documented toggle you can flip to change that behavior. [[Pagination troubleshooting](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/pagination#troubleshooting)] 3. Custom pagination logic (if you can detect the cap condition) If the API exposes some signal that you’ve hit that hard limit (special status, header, or field in the response), you could implement a Custom Pagination Strategy in Python and wire it into a declarative connector. [[Custom pagination](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/pagination#custom-pagination-strategy)] With that: - Your next_page_token logic could detect the “hard limit hit” case. - Instead of returning None (stop), it could “restart” pagination with a new cursor or with a refined time window (essentially creating a new logical sub‑slice in your own paginator). The docs show how to plug in such a class via PaginationStrategy, but they don’t provide a ready‑made example for this exact “hard limit” use case; you’d need to design the logic based on what Cube.js returns. [[Custom pagination](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/pagination#custom-pagination-strategy)] 4. Pattern used elsewhere (non‑documented, code‑level workaround) In a GitHub issue about missing data due to a 100k pagination limit, maintainers mention a pattern where, when a certain record count is hit, they restart pagination with a new cursor, implemented via custom components/CDK logic, and note this pattern could be ported into the CDK/manifest in the future. [[Pardot issue](https://github.com/airbytehq/airbyte/issues/58666)] This confirms your need is recognized, but there is no documented, generalized setting for it yet; it’s custom code. --- ### What you can practically do with a Custom Connector today Based on the docs you provided, the supported approaches are: - Adjust your stream_slices() implementation to: - Generate smaller time windows (e.g. split each hour into multiple smaller windows) until you empirically see that all pages for each slice complete without hitting the API’s hard cap. [[Stream slicing](https://docs.airbyte.com/platform/connector-development/cdk-python/stream-slices#stream-slicing)] - The tradeoff is more requests, but you avoid silent truncation. - Optionally, implement a custom paginator (if you’re using declarative + Python) that: - Inherits from PaginationStrategy. - In next_page_token, detects the “hard limit reached” condition and returns a token that represents “new starting point with a refined time range or new cursor” instead of stopping. [[Custom pagination](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/pagination#custom-pagination-strategy); [Pardot issue](https://github.com/airbytehq/airbyte/issues/58666)] From the documentation and issues you shared, there is no out‑of‑the‑box setting in Airbyte that will automatically further subdivide a time‑based slice once its internal pagination crosses a backend hard limit. The reliable, documented way to make it resilient is to make your slices smaller and/or encode additional sub‑window logic yourself, and, if available, to complement that with a custom pagination strategy that can restart pagination intelligently when it detects the hard cap.