diff --git a/metadata-ingestion/src/datahub/utilities/file_backed_collections.py b/metadata-ingestion/src/datahub/utilities/file_backed_collections.py index b67f9c1a9ffa15..b0f5022446de15 100644 --- a/metadata-ingestion/src/datahub/utilities/file_backed_collections.py +++ b/metadata-ingestion/src/datahub/utilities/file_backed_collections.py @@ -228,6 +228,12 @@ def __post_init__(self) -> None: else: self._conn = ConnectionWrapper() + if sqlite3.sqlite_version_info < (3, 24, 0): + # We use the ON CONFLICT clause to implement UPSERTs with sqlite. + # This was added in 3.24.0 from 2018-06-04. + # See https://www.sqlite.org/lang_conflict.html + raise RuntimeError("SQLite version 3.24.0 or later is required") + # We keep a small cache in memory to avoid having to serialize/deserialize # data from the database too often. We use an OrderedDict to build # a poor-man's LRU cache.