Skip to content

Commit

Permalink
fix(arangodb): update server endpoint protocol and change import file…
Browse files Browse the repository at this point in the history
… type

The server endpoint protocol is changed from `tcp` to `http+tcp` to
ensure compatibility with the ArangoDB import command. Additionally, the
file type is updated from `json` to `jsonl` to support the correct
format for importing data, which enhances the functionality and
correctness of the import process.
  • Loading branch information
cybersiddhu committed Nov 15, 2024
1 parent 1b194b9 commit 4a8ee5a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/arangodb/cli/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type GenericResponse struct {
func buildArangoImportCmd(params BuildArangoImportParams) *exec.Cmd {
// #nosec G204 -- Using CLI context values that are validated by the CLI framework
return exec.Command("arangoimport",
"--server.endpoint", fmt.Sprintf("tcp://%s:%s",
"--server.endpoint", fmt.Sprintf("http+tcp://%s:%s",
params.Context.String("arangodb-host"),
params.Context.String("arangodb-port")),
"--server.database", params.Context.String("arangodb-database"),
Expand All @@ -57,8 +57,7 @@ func buildArangoImportCmd(params BuildArangoImportParams) *exec.Cmd {
"--collection", params.Collection,
"--create-collection", "true",
"--overwrite", "true",
"--threads", "3",
"--type", "json",
"--type", "jsonl",
"--file", params.FilePath,
)
}
Expand Down

0 comments on commit 4a8ee5a

Please sign in to comment.