Repository navigation
Add DuckDB support - #68
Merged
Merged
Conversation
This was referenced Oct 16, 2026
gkennos
self-requested a review
October 23, 2026 23:26
MaintenanceContext._foreign_keys_creatable() and reconcile_schema()'s FK-missing check only consulted resolved's static schema-translate map, so a tag claimed only via create_engine(schema_claims=[...]) raised UnregisteredSchemaTagError even though the connection itself already resolves it. Both now build physical_schemas from the connection's own claimed tags before calling foreign_key_can_span().
…to loader backends, staging chunk size and staging retry removed
gkennos
requested changes
Nov 2, 2026
- A failed foreign key validation after a load raises VocabularyLoadError saying the rows are committed and how to recover - --merge-batch-size help and docs say earlier batches stay committed on PostgreSQL and DuckDB - Fixtures add concept_ancestor, concept_relationship and concept_synonym rows, including quoted and non-ASCII names; Postgres load tests cover bulk and non-bulk mode
nicoloesch
added a commit
that referenced
this pull request
Nov 7, 2026
Pulls in DuckDB support (#68). Resolved conflicts in cdm_table_base.py, person.py, and maintenance/tables.py by keeping this branch's CDMTableBase.__init_subclass__ auto-tagging and the extension-owner field, while keeping main's new MaintenanceTable.model_cls field. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
duckdbextra.FeatureNotSupportedError.use_alter=True.foreign-keys validate,reconcileanddoctor --deep.Conceptnow loads beforeRelationship.concept,person,visit_occurrence,providerorcare_sitewithreplaceis rejected up front, with a message pointing toupsert.cache_scopenow resolves relative DuckDB file paths the same way as SQLite ones.person.visit_occurrence_idandperson.visit_detail_idare removed on all dialects, to match CDM 5.4 and break the person/visit cycle.reconcileflags them, so check them for populated rows before migrating.Adapts to orm-loader 3
orm-loader>=3.0.0,<4(One file-to-database pipeline with a single conversion policy orm-loader#46), which replaces the CSV loaders with one file pipeline.CDMTableBaseand the maintenance code useFileLoadableTableInterfaceandFileTableProtocol, and callload_file.resolved, andload_vocabpasses it toload_file, so DuckDB can classify the foreign keys it cannot enforce.load_vocabvalidates the loaded tables withvalidate_foreign_keysinstead ofvalidate_deferred_fks.load_filecreates and drops its own.insert_if_emptymerge strategy is nowinsert, and--merge-strategy insertinserts without checking that the target is empty. A key collision raises the database error, and the crash-retry truncation applies toinsert.--staging-chunk-sizeand theautovalue of--quote-modeare removed. The default quote mode isby_delimiter.relaxed_foreign_keys(session)instead of the old bulk load context.Checklist
breaking,feature,fix,dependencies, orchore)uv run pytest -q)uv run ruff check .)