From 4a8ee5aaffbb2aa782ace4eef9c3863c8420bfe9 Mon Sep 17 00:00:00 2001 From: Siddhartha Basu Date: Fri, 15 Nov 2024 12:52:25 -0600 Subject: [PATCH] fix(arangodb): update server endpoint protocol and change import file 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. --- internal/arangodb/cli/load.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/arangodb/cli/load.go b/internal/arangodb/cli/load.go index 53f258eb..48b07b79 100644 --- a/internal/arangodb/cli/load.go +++ b/internal/arangodb/cli/load.go @@ -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"), @@ -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, ) }