Андрей Морозов
10/06/2025, 12:09 PMkapa.ai
10/06/2025, 12:10 PMsql select * from table where cursor_field > 'last_sync_max_cursor_field_value' This means that, in principle, Airbyte should not read the entire table and then filter in memory; instead, it should push down the filter to the database and only fetch the relevant rows. This is the expected behavior for incremental syncs using a cursor field, as documented for the Incremental Append + Deduped sync mode across multiple Airbyte versions [see documentation](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append-deduped#known-limitations). However, there are several reports of out-of-memory (OOM) errors during syncs with large tables or high row counts, especially when using ClickHouse as a destination. These OOM errors often occur during the normalization step or when handling large result sets, even when the source query should be limited by the cursor filter. For example, users have reported OOM issues with ClickHouse during normalization, even with substantial memory allocated (e.g., 32GB or 64GB RAM), and with relatively moderate data volumes (millions to hundreds of millions of rows) [see issue](https://github.com/airbytehq/airbyte/issues/15352), [see issue](https://github.com/airbytehq/airbyte/issues/33281), [see forum post](https://discuss.airbyte.io/t/3401). There is no explicit evidence in the knowledge sources that Airbyte always reads the full table and applies the filter in memory for ClickHouse sources. The intended behavior is to push down the filter. However, OOM errors can still occur due to: - Inefficient query execution or large result sets being buffered in memory. - The normalization step in ClickHouse, which can be memory-intensive, especially for deduplication or SCD (slowly changing dimension) models. - Java connectors' memory management, which may require tuning environment variables like JOB_MAIN_CONTAINER_MEMORY_LIMIT and JOB_MAIN_CONTAINER_MEMORY_REQUEST to allocate more memory to the connector process [see forum post](https://discuss.airbyte.io/t/3401). If you are seeing OOM errors even when your cursor filter should limit the result set to 1200 rows, it suggests there may be an issue with how the query is constructed or executed, or with the normalization step in ClickHouse. It is not expected that Airbyte reads the entire table and filters in memory, but practical issues or connector bugs could cause this behavior. Summary: Airbyte is supposed to apply the cursor filter in the source query and only read the relevant rows. If you are experiencing OOM errors with a small result set, it may be due to connector or normalization inefficiencies, not because Airbyte is intentionally reading the full table and filtering in memory. If this persists, it may be worth opening a GitHub issue with detailed logs and configuration for further investigation. If you need to tune memory, refer to the documentation on scaling and configuring connector resources [see scaling guide](https://docs.airbyte.com/operator-guides/scaling-airbyte), [see resource configuration](https://docs.airbyte.com/operator-guides/configuring-connector-resources).Андрей Морозов
10/06/2025, 12:13 PMkapa.ai
10/06/2025, 12:13 PMkapa.ai
10/06/2025, 12:14 PMbash docker exec -it airbyte-server /bin/bash 3. Locate the SQL File: Use the following command to view the SQL used for normalization (replace <job_id> and <attempt_id> with your actual values): bash cat /tmp/workspace/<job_id>/<attempt_id>/build/run/airbyte_utils/models/generated/airbyte_incremental/public/<your_table>.sql This file contains the SQL Airbyte used to process the incremental data for your table. For example: bash cat /tmp/workspace/149/0/build/run/airbyte_utils/models/generated/airbyte_incremental/public/table_one.sql This will show you the SQL query, including how the cursor is applied and how data is selected and transformed during the sync. 4. Check the dbt Log for Temporary Table Creation: To see the SQL for creating temporary tables (which may include the incremental query logic), check the dbt log: bash cat /tmp/workspace/<job_id>/<attempt_id>/logs/dbt.log Search for the creation of the relevant temporary table in this log. This process allows you to see exactly what SQL Airbyte is executing for incremental extraction and normalization, which is helpful for debugging and understanding how the cursor is being used in your syncs. [See detailed steps and examples](https://airbyte.com/tutorials/incremental-data-synchronization#step-7).Андрей Морозов
10/06/2025, 12:42 PMkapa.ai
10/06/2025, 12:42 PMkapa.ai
10/06/2025, 12:42 PMairbyte-abctl-control-plane container and do not see the /tmp/workspace/ directory, this is expected in certain Airbyte deployments—especially on Kubernetes. According to the knowledge sources, the /tmp/workspace/ directory is typically present in the Airbyte server or normalization containers during a sync job, but these directories are often ephemeral and only exist for the life of the job. In Kubernetes deployments, these files are not persisted after the job completes, and you cannot access them from the control plane container after the job has finished. This limitation is confirmed in the Airbyte community and official responses: - On Kubernetes, the /tmp/workspace/ directory is present only in the normalization job pods, and those volumes are ephemeral. There is no way to look at the generated files later, and you cannot change the volume configuration to persist them with config files, as the volumes are configured inside the Java code. This is a known limitation of Airbyte on Kubernetes deployments, and there are open feature requests to address it ([see discussion](https://discuss.airbyte.io/t/2013), [see issue](https://github.com/airbytehq/airbyte/issues/8090)). Summary: If you are running Airbyte on Kubernetes and only have access to the airbyte-abctl-control-plane container, you will not be able to access the /tmp/workspace/ directory or the SQL/log files after the job completes. This is a current limitation of Airbyte's Kubernetes deployment model, and there is no supported workaround to persist or access these files post-job at this time. If you need to debug the queries or normalization logic, you would need to capture the files/logs during the job's execution, or consider running Airbyte in a Docker deployment where these files are accessible after the job completes.