Skip to content

Apply dataset formatters to SQL exports - #702

Open
muneikh wants to merge 1 commit into
jazzband:masterfrom
muneikh:fix-sql-export-formatters
Open

muneikh wants to merge 1 commit into
jazzband:masterfrom
muneikh:fix-sql-export-formatters

Conversation

@muneikh

@muneikh muneikh commented Oct 11, 2026

Copy link
Copy Markdown

SQL export bypasses Dataset formatters by iterating stored rows directly. A formatter registered with add_formatter() affects other exports but is silently ignored by SQL, so generated INSERT values differ from the requested export transformations.

Render SQL values from the existing formatted list representation, omitting its header row while preserving column order and duplicate header behavior. The stored Dataset values remain unchanged. Two regressions cover a named-column formatter with headers and an all-column formatter without headers and with explicit SQL column names.

Validation on Python 3.13: both new cases fail before the fix, and all 185 tests pass after it with the format dependencies and pandas installed. Whole source/test Ruff checks and git diff --check pass. Other interpreters and hosted CI results have not been verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant