-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add dgraph import command that imports data using bulk loader #9443
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
Merged
Conversation
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
d9f7b0d
to
ebacdee
Compare
ebacdee
to
598a2ab
Compare
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.
Pull Request Overview
Adds a new dgraph import
sub-command that uses the bulk loader under the hood for faster data ingestion.
Key changes:
- Introduce
dgraphimport
command and wire it intoroot.go
along with flags and confirmation logic. - Rename and expand
options
toBulkOptions
across bulk loader code, addingConnStr
and switching to usedgo
for timestamp allocation. - Enhance loader to connect to either Zero or Alpha (
dgo
) for timestamps and schema handling.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
edgraph/multi_tenancy.go | Adjust log call to include colon before namespace value |
dgraph/cmd/root.go | Import and register new dgraph import command |
dgraph/cmd/dgraphimport/run.go | Implement import command with bulk loader invocation |
dgraph/cmd/bulk/schema.go | Update newSchemaStore to accept *BulkOptions |
dgraph/cmd/bulk/run.go | Migrate from options to BulkOptions , call RunBulkLoader |
dgraph/cmd/bulk/merge_shards.go | Rename options param to *BulkOptions |
dgraph/cmd/bulk/mapper.go | Rename mapper buffer factory to accept *BulkOptions |
dgraph/cmd/bulk/loader.go | Refactor loader to use BulkOptions , add dgo integration |
.trunk/trunk.yaml | Bump tool versions (checkov, prettier, renovate, trufflehog) |
Comments suppressed due to low confidence (1)
dgraph/cmd/bulk/loader.go:214
- This
for
loop appears outside of any function and is followed by unmatched braces, which will cause a compile error. It seems misplaced—please move it inside the appropriate function or remove the extraneous braces.
for {
598a2ab
to
7807a34
Compare
harshil-goel
approved these changes
Jun 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/bulk-loader
Issues related to bulk loading.
area/testing
Testing related issues
go
Pull requests that update Go code
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.
No description provided.