Area: Ingestion
Sub-Area: Dependencies
Applies to: OSS + Cloud
Issue
Ingestion fails during pipeline setup with this error:
PipelineInitError: Failed to configure the source (<source type>): SQLite version 3.24.0 or later is required
The error can affect any source, for example kafka. Setting OVERRIDE_SQLITE_VERSION_REQ in your code did not fix it.
You Might Be Asking
- Why does the SQLite error appear for many different sources?
- Why doesn't OVERRIDE_SQLITE_VERSION_REQ work?
- How do I check which SQLite version Python uses?
- Can I run with an older SQLite version?
Cause
The ingestion framework stores data in a SQLite-backed store. That store uses ON CONFLICT upserts, which need SQLite 3.24.0 or later. If the SQLite library linked into your Python is older than 3.24.0, the store raises this error.
Every source report creates one of these stores (a FileBackedDict named urn_aspects). So the check runs for every source, not only for sources that cache metadata.
Solution
- Check the SQLite version your Python uses:
python -c "import sqlite3; print(sqlite3.sqlite_version)"
The ingestion check compares this value with 3.24.0. Run the command in the same environment that runs ingestion, for example the Airflow worker or the ingestion container.
- Fix it in one of two ways.
Option A: use a Python build linked to SQLite 3.24.0 or later. Use a base image or Python build that ships a newer SQLite, then re-run the command above to confirm.
Option B: set OVERRIDE_SQLITE_VERSION_REQ. Set it to any non-empty value other than false (for example true) in the environment of the process that runs ingestion, before that process starts. For example, set it in the worker or container environment:
export OVERRIDE_SQLITE_VERSION_REQ=true
With the override set, the 3.24.0 check is skipped. The store then uses a fallback that does an INSERT and, on a primary-key collision, an UPDATE, instead of ON CONFLICT.
Setting the variable from os.environ inside DAG code can come too late on older releases, because they read it once at import. Always set it in the process environment before start. That works on every version.
If the override still has no effect, check that the value is not false and that it is set in the environment of the process that actually runs the pipeline.
Cloud managed ingestion: you can't set environment variables on the executor. Contact DataHub Support. If you use a Remote Executor, set the variable in your executor's environment.