# as_files_ingested

## nominal.core.as_files_ingested(files, *, poll_interval=datetime.timedelta(seconds=1))

Iterates over DatasetFiles as they complete their ingestion in a similar fashion to
[`concurrent.futures.as_completed`](https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.as_completed "(in Python v3.15)").

Any files that are already ingested (successfully or with errors) will immediately be yielded.

Parameters:
:   - **files** ([*Sequence*](https://docs.python.org/3/library/typing.html#typing.Sequence "(in Python v3.15)")*[*[*DatasetFile*](https://dev.nominal.io/python/ref/generated/nominal.core.DatasetFile.md#nominal.core.DatasetFile "nominal.core.dataset_file.DatasetFile")*]*)

      Dataset files to monitor for ingestion completion.
    - **poll_interval** ([*timedelta*](https://docs.python.org/3/library/datetime.html#datetime.timedelta "(in Python v3.15)"))

      Interval to sleep between polling the remaining files under watch.

Yields:
:   Yields DatasetFiles as they are ingested. Due to the polling mechanics, the files are not yielded in
    strictly sorted order based on their ingestion completion time. Ensure to check the `ingest_status` of
    yielded dataset files if important.

Return type:
:   [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.15)")[[*DatasetFile*](https://dev.nominal.io/python/ref/generated/nominal.core.DatasetFile.md#nominal.core.DatasetFile "nominal.core.dataset_file.DatasetFile")]
