<@U04S8PLJWMT> what does this mean for source-sftp...
# ask-ai
m
@kapa.ai what does this mean for source-sftp-bulk "When the state history of the file store is full, syncs will only read files that were last modified in the provided day range."
k
It means how incremental state works once the connector’s “history” is at capacity. The behavior is described for S3, and SFTP Bulk uses the same model: Airbyte keeps a history of up to 10,000 files that have been synced. Each file is recorded in the connection’s state (oldest → newest). Once this history is full, Airbyte stops tracking every file and instead: - Looks at the newest file in the history (its last-modified timestamp). - Then, for the next sync, it only reads files whose last-modified time falls within a rolling window of
Days to Sync if History is Full
days before that newest timestamp
. So if
Days to Sync if History is Full = 3
and the newest file in history is from
2025‑01‑10
, the sync will only consider files last modified between
2025‑01‑07
and
2025‑01‑10
. [[S3 state](https://docs.airbyte.com/integrations/sources/s3#state)] This is to keep state size manageable while still giving a sliding window of re-checks for “recent” files.
m
@kapa.ai how to reset the high watermarks when using "Start Date" in source-sftp-bulk?
k
A message from kapa.ai
For
source-sftp-bulk
, the docs only describe how Start Date and connection state affect incremental syncs, but they do not document a direct, connector‑specific way to “reset high watermarks” other than editing the connection’s state. What is documented: - Start Date: for SFTP Bulk, this is used so that “Incremental syncs will only sync files modified/added after this date.” [[SFTP Bulk cloud](https://docs.airbyte.com/integrations/sources/sftp-bulk#for-airbyte-cloud)] - Connection state: holds the most recent cursor / high watermark values for incremental syncs; changing it lets you “start from any date in the past.” [[Manage state (Cloud)](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/manage-connection-state)] To effectively “reset” high watermarks when using Start Date, the documented option is: 1. Open the connection in the Airbyte UI. 2. Go to Settings → Advanced → Connection State. 3. Manually edit the state (for example, adjust or clear the stored cursor values / dates) so that the next sync will behave as if starting from your desired point in time. [[Manage state (Cloud)](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/manage-connection-state)] 4. Save with Update state. The docs explicitly warn that editing state can break syncs and may require a full historical resync to fix, and recommend doing it only as directed by the Airbyte team. [[Manage state (Cloud)](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/manage-connection-state)] The knowledge sources do not provide more granular, SFTP‑Bulk‑specific instructions (for example, exact state JSON shape or a “reset high watermark” button), so for anything beyond the above, I’m afraid there’s no documented procedure in the provided material.
m
@kapa.ai source-sftp-bulk complains that a file is empty while schema discovery?
k
A message from kapa.ai
This is a known class of issue in Airbyte’s file-based connectors: empty or effectively empty files (for example, only headers, or no rows) can cause schema discovery or read failures because the connector can’t infer column types or row structure. In similar S3 CSV cases, the connector throws errors like “CSV parse error: Empty CSV file or block: cannot infer number of columns” or datatype mismatch when it can’t see any data rows. [[S3 CSV empty](https://discuss.airbyte.io/t/1155); [S3 multi-file error](https://discuss.airbyte.io/t/3689)] For SFTP Bulk specifically: - The connector is file-based and supports bulk ingestion of multiple files, with behavior driven by file content and metadata. [[SFTP Bulk intro](https://docs.airbyte.com/integrations/sources/sftp-bulk)] - There is a recent change: version 1.0.1 “Avoid error on empty stream when running discover”, which explicitly fixes an error encountered during discovery when a stream is empty. [[SFTP Bulk changelog](https://docs.airbyte.com/integrations/sources/sftp-bulk#changelog)] So if
source-sftp-bulk
is complaining that a file (or resulting stream) is empty during schema discovery, it likely means: 1. You’re on a version before 1.0.1, where an empty stream during discovery would surface as an error. 2. Or the file set matched by your glob / configuration yields no usable rows, causing discovery to fail similarly to the S3 behavior. What you can do, based on the docs: 1. Upgrade the SFTP Bulk connector to at least 1.0.1, which specifically includes “Avoid error on empty stream when running discover.” [[SFTP Bulk changelog](https://docs.airbyte.com/integrations/sources/sftp-bulk#changelog)] 2. After upgrading to ≥ 1.0.0 (low-code migration), follow the migration guide: re‑test the source configuration, refresh the schema on affected connections, and clear affected streams as instructed. [[SFTP Bulk migration](https://docs.airbyte.com/integrations/sources/sftp-bulk-migrations)] 3. If possible, avoid feeding truly empty files to the connector (this is the only workaround explicitly mentioned for S3 empty CSV issues). [[S3 CSV empty](https://discuss.airbyte.io/t/1155)] The knowledge sources do not provide SFTP‑Bulk‑specific configuration flags to skip empty files or change this behavior beyond upgrading to 1.0.1+, so if the issue persists on the latest connector, it would likely require opening a new GitHub issue or forum topic.
m
we are using source-sftp-bulk with version 1.7.4. @kapa.ai
k
A message from kapa.ai
On version 1.7.4 of source-sftp-bulk, empty/near‑empty files should generally be handled better than in very old implementations, but there is still limited, explicit documentation about error behavior during schema discovery. What we do know from the docs: - The SFTP Bulk connector was migrated to the File-Based CDK in 1.0.0, and then had a fix in 1.0.1: > “Avoid error on empty stream when running discover.” [[SFTP Bulk changelog](https://docs.airbyte.com/integrations/sources/sftp-bulk#changelog)] - You are on 1.7.4, which is newer than 1.0.1, so that specific “empty stream on discover” bug should already be fixed in your version. [[SFTP Bulk changelog](https://docs.airbyte.com/integrations/sources/sftp-bulk#changelog)] Given that: - If you are still seeing errors mentioning an empty file/stream during discovery on 1.7.4, this is not covered by the existing docs and changelog; it may be: - A new/edge bug not described in the documentation, or - A different issue (e.g., file format/content problem) being surfaced as “empty”. The knowledge sources do not document: - Any SFTP‑Bulk‑specific setting to “skip empty files” or relax discovery for them. - Any known, open issue on 1.7.x around empty files during discover. So, based only on the provided material, the documented next steps are: 1. Confirm connector version and upgrade if possible: Ensure the source is truly running ≥ 1.0.1 (you are on 1.7.4, which qualifies) and, if feasible, try the latest 1.8.x where additional dependency and CDK updates have landed. [[SFTP Bulk changelog](https://docs.airbyte.com/integrations/sources/sftp-bulk#changelog)] 2. Re‑verify configuration & refresh schema after upgrades: Follow the migration/verification flow (re-test source config, refresh schema, clear affected streams if prompted) when changing SFTP Bulk versions. [[SFTP Bulk migration](https://docs.airbyte.com/integrations/sources/sftp-bulk-migrations)] 3. As a practical workaround (by analogy with S3): The S3 connector team explicitly suggests avoiding feeding empty files, since empty CSVs cause inference issues and are not well‑handled. [[S3 empty CSV](https://discuss.airbyte.io/t/1155)] The docs don’t state it for SFTP Bulk, but the same file‑based limitations likely apply. Beyond that, the knowledge sources do not provide enough detail to explain why 1.7.4 would still complain about an empty file or how to configure around it, so if the problem persists on the latest SFTP Bulk version, it likely warrants a new GitHub issue or forum topic with logs and an example file.