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

Add support for file preview #9354

Open
wants to merge 1 commit into
base: feature/data-importer
Choose a base branch
from

Conversation

huyaboo
Copy link
Member

@huyaboo huyaboo commented Feb 7, 2025

Description

This PR adds two new routes:

  • _preview
  • _cat_indices

And modifies two routes:

  • _import_file
  • _import_text

in order to support a file-preview like experience. Chiefly, the _preview route is used for parsing the file and returning the best guess index mapping that the documents will have. This PR does not cover the case where the existing index mapping and predicted index mapping differ. This is up to UI

Issues Resolved

Screenshot

Testing the changes

Changelog

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

github-actions bot commented Feb 7, 2025

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

@huyaboo huyaboo force-pushed the feature/data-importer branch from ec250a7 to 8de0008 Compare February 7, 2025 22:16
Copy link
Contributor

github-actions bot commented Feb 7, 2025

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 72.28916% with 23 lines in your changes missing coverage. Please review.

Please upload report for BASE (feature/data-importer@74dc8cc). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...a_importer/public/components/data_importer_app.tsx 11.11% 8 Missing ⚠️
src/plugins/data_importer/public/lib/preview.ts 0.00% 5 Missing ⚠️
...plugins/data_importer/server/parsers/csv_parser.ts 76.47% 3 Missing and 1 partial ⚠️
src/plugins/data_importer/server/utils/util.ts 89.65% 1 Missing and 2 partials ⚠️
...lugins/data_importer/server/parsers/json_parser.ts 83.33% 2 Missing ⚠️
...gins/data_importer/server/parsers/ndjson_parser.ts 90.90% 1 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##             feature/data-importer    #9354   +/-   ##
========================================================
  Coverage                         ?   61.75%           
========================================================
  Files                            ?     3832           
  Lines                            ?    92144           
  Branches                         ?    14596           
========================================================
  Hits                             ?    56902           
  Misses                           ?    31572           
  Partials                         ?     3670           
Flag Coverage Δ
Linux_1 28.99% <ø> (?)
Linux_2 56.46% <ø> (?)
Linux_4 28.91% <ø> (?)
Windows_1 29.02% <ø> (?)
Windows_2 56.41% <ø> (?)
Windows_3 39.35% <72.28%> (?)
Windows_4 28.91% <ø> (?)

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.

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

Successfully merging this pull request may close these issues.

1 participant