-
Notifications
You must be signed in to change notification settings - Fork 328
Feat: Support iceberg、hudi、delta、hdfs data source. #911
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
Open
Dludora
wants to merge
6
commits into
datajuicer:main
Choose a base branch
from
Dludora:lakehouse
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5d5a983
feat: load_startegy for hdfs iceberg、delta lake、hudi..
Dludora 7f2632d
feat: iceberg export
Dludora e7c2b73
feat: hdfs fs create
Dludora 83c642a
feat: demos
Dludora 9a4f51a
Perf: logger in load_startegy
Dludora de5edee
style: rename demo process remote files
Dludora File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
76 changes: 76 additions & 0 deletions
76
demos/process_remote_sources/config/process_from_hdfs.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # Process config example for dataset | ||
|
|
||
| # global parameters | ||
| project_name: 'demo' | ||
|
|
||
|
|
||
| np: 1 # number of subprocess to process your dataset | ||
|
|
||
| export_path: './outputs/demo/demo-processed-ray' | ||
|
|
||
| dataset: | ||
| configs: | ||
| - type: remote | ||
| source: hdfs | ||
| path: hdfs://your_hdfs_path/demo-dataset.jsonl | ||
| host: your_hdfs_host | ||
| port: 8020 | ||
| user: your_username | ||
|
|
||
| # process schedule | ||
| # a list of several process operators with their arguments | ||
| process: | ||
| # Filter ops | ||
| - alphanumeric_filter: # filter text with alphabet/numeric ratio out of specific range. | ||
| tokenization: false # Whether to count the ratio of alphanumeric to the total number of tokens. | ||
| min_ratio: 0.0 # the min ratio of filter range | ||
| max_ratio: 0.9 # the max ratio of filter range | ||
| - average_line_length_filter: # filter text with the average length of lines out of specific range. | ||
| min_len: 10 # the min length of filter range | ||
| max_len: 10000 # the max length of filter range | ||
| - character_repetition_filter: # filter text with the character repetition ratio out of specific range | ||
| rep_len: 10 # repetition length for char-level n-gram | ||
| min_ratio: 0.0 # the min ratio of filter range | ||
| max_ratio: 0.5 # the max ratio of filter range | ||
| - flagged_words_filter: # filter text with the flagged-word ratio larger than a specific max value | ||
| lang: en # consider flagged words in what language | ||
| tokenization: false # whether to use model to tokenize documents | ||
| max_ratio: 0.0045 # the max ratio to filter text | ||
| flagged_words_dir: ./assets # directory to store flagged words dictionaries | ||
| use_words_aug: false # whether to augment words, especially for Chinese and Vietnamese | ||
| words_aug_group_sizes: [2] # the group size of words to augment | ||
| words_aug_join_char: "" # the join char between words to augment | ||
| - language_id_score_filter: # filter text in specific language with language scores larger than a specific max value | ||
| lang: en # keep text in what language | ||
| min_score: 0.8 # the min language scores to filter text | ||
| - maximum_line_length_filter: # filter text with the maximum length of lines out of specific range | ||
| min_len: 10 # the min length of filter range | ||
| max_len: 10000 # the max length of filter range | ||
| - perplexity_filter: # filter text with perplexity score out of specific range | ||
| lang: en # compute perplexity in what language | ||
| max_ppl: 1500 # the max perplexity score to filter text | ||
| - special_characters_filter: # filter text with special-char ratio out of specific range | ||
| min_ratio: 0.0 # the min ratio of filter range | ||
| max_ratio: 0.25 # the max ratio of filter range | ||
| - stopwords_filter: # filter text with stopword ratio smaller than a specific min value | ||
| lang: en # consider stopwords in what language | ||
| tokenization: false # whether to use model to tokenize documents | ||
| min_ratio: 0.3 # the min ratio to filter text | ||
| stopwords_dir: ./assets # directory to store stopwords dictionaries | ||
| use_words_aug: false # whether to augment words, especially for Chinese and Vietnamese | ||
| words_aug_group_sizes: [2] # the group size of words to augment | ||
| words_aug_join_char: "" # the join char between words to augment | ||
| - text_length_filter: # filter text with length out of specific range | ||
| min_len: 10 # the min length of filter range | ||
| max_len: 10000 # the max length of filter range | ||
| - words_num_filter: # filter text with number of words out of specific range | ||
| lang: en # sample in which language | ||
| tokenization: false # whether to use model to tokenize documents | ||
| min_num: 10 # the min number of filter range | ||
| max_num: 10000 # the max number of filter range | ||
| - word_repetition_filter: # filter text with the word repetition ratio out of specific range | ||
| lang: en # sample in which language | ||
| tokenization: false # whether to use model to tokenize documents | ||
| rep_len: 10 # repetition length for word-level n-gram | ||
| min_ratio: 0.0 # the min ratio of filter range | ||
| max_ratio: 0.5 # the max ratio of filter range |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous logic for handling empty datasets has been removed. If an empty dataset is passed to
_export_impl,dataset.columns()can returnNone. This would causefeature_fieldsto becomeNone(ifcolumnsis not provided), leading to aTypeErroron line 131 whenextra_fields.intersection(feature_fields)is called.Please consider re-introducing a check for empty datasets to prevent this potential runtime error, or ensure that the exporter is never called with an empty dataset. For example, you could restore a check like this: