Repository navigation
feat(files): read Excel, XML and ZIP inputs - #187
Merged
Merged
Conversation
Deploying sqlload with
|
| Latest commit: |
da3ba1a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2fe47224.sqlload.pages.dev |
| Branch Preview URL: | https://feat-xlsx-xml-zip.sqlload.pages.dev |
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.
Adds three file inputs to
kind = "files"sources. SQLLoad reads all of them itself, on every destination.format = "xlsx"withxlsx = { sheet, header, skip_rows }. Cells keep their stored types: int, float, bool, date, timestamp_ntz and time. Empty cells and error cells load as NULL. Cells are streamed with calamine's cell reader rather than a dense range, and a sheet is capped at 20 million values.format = "xml"withxml = { record_path, lists }.record_pathbecomes a row. Its attributes and child elements become columns, matched by local name.xsi:nilloads as NULL. Namespace declarations andxsi:attributes are not columns.record_pathwhose parent elements the document doesn't have.compression = "zip", with amembersglob. Each matching member loads as a file of its own, keyed<archive>/<member>and versioned by its archive.Dependencies: this adds calamine 0.38, quick-xml 0.42 and zip 9 (with deflate). calamine turns on zip's
deflate, which switches flate2 to the zlib-rs backend across the workspace, so gzip output bytes differ from 0.34. No test or feature depends on byte-identical gzip output; tests decompress before comparing.CsvOut::Gzipis boxed to satisfy clippy'slarge_enum_variant.Docs: a new "Excel, XML and ZIP files" section in sources/files.mdx, marked "From 0.35.0 (not released yet)".
Testing:
make checkandmake test-unitpass.appendrerun loaded 0 rows.Closes CHI-1238.