Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding JSON / JSON Lines Export Support #538

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

dtulga
Copy link
Collaborator

@dtulga dtulga commented Oct 24, 2024

This PR adds the functions to_json and to_jsonl to export to JSON / JSON lines from DataChain. These functions support remote fsspec filesystems / URLs (such as s3://), similar to to_csv and to_parquet, and implement streaming writing as well, to enable writing data larger than memory. This also adds tests for these functions, tests for the existing from_json and from_jsonl functions, and tests for both of these on remote filesystems (such as S3).

This has been tested locally and fixes #533

@dtulga dtulga self-assigned this Oct 24, 2024
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.82%. Comparing base (34e7c2b) to head (bea5710).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #538      +/-   ##
==========================================
+ Coverage   87.39%   87.82%   +0.42%     
==========================================
  Files          97       97              
  Lines       10197    10223      +26     
  Branches     1396     1402       +6     
==========================================
+ Hits         8912     8978      +66     
+ Misses        923      884      -39     
+ Partials      362      361       -1     
Flag Coverage Δ
datachain 87.76% <100.00%> (+0.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dtulga dtulga marked this pull request as ready for review October 24, 2024 20:15
@dtulga dtulga requested a review from a team October 24, 2024 20:15
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.

Add JSON / JSON lines export support
1 participant