2
votes

I'm attempting to import csv or json data based on examples in the ArangoDB Documentation however I keep receiving errors with my attempts and I'm unable to discover the cause. It's as though I'm not even invoking arangoimp from the Arango Shell at all. It seems as though it just can't find it. I can see right in the \bin folder that there exists an arangoimp.exe file.

> arangoimp --file "data.json" --type json --collection "users"

My question first is to know what the default folder is set to. If I only specify the file name what folder does the shell look at? My assumption is that the root is the folder that the arangosh.exe file is. Is this true?

C:\Program Files\ArangoDB3 3.3.3\usr\bin\arangosh.exe

If I am needing/wanting to specify a folder path do I escape the folders by one, two, or four backslashes? If my file I wish to import for example is located in C:\Data\Arango.... would my arangoimp syntax look like this?

> arangoimp --file "C:\\Data\\Arango\\dataImport.json" --type json --collection "users"

Lastly, the error I am consistently receiving is: stacktrace: SyntaxError: Unexpected identifier. I feel like there's something simple I'm missing here. I've pasted a screenshot of the error with this post.

Command Line - Arango Shell

1

1 Answers

3
votes

It seems you are invoking arangoimp from inside the ArangoShell. This is not how it is supposed to work.

arangoimp is a separate executable (arangoimp.exe) that needs to be invoked from the command-line (MS-DOS command prompt, Powershell, etc.) with the correct parameters. If arangoimp.exe is not in your current path and cannot be found by the shell, please run a quick search for where the file is and invoke it from that directory.