Skip to content

Commit

Permalink
docs(ingest): Raise error on unsupported sqlite version (datahub-proj…
Browse files Browse the repository at this point in the history
…ect#11921)

Co-authored-by: Harshal Sheth <[email protected]>
  • Loading branch information
asikowitz and hsheth2 authored Nov 22, 2024
1 parent 1bfd4ee commit 80ef541
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 80ef541

Please sign in to comment.