I am creating a Load Job after installing the Tigergrpah in Docke and i got the following error

I checked the site , all info given for Linux, but no where seen how to rectify in docker, can someone help me on the same, becuase i have stuck this step and not moving further.

GSQL > CREATE LOADING JOB friends_data FOR GRAPH friends { DEFINE FILENAME people = “C:/Users/rstemp/tigergraph/mydata/people.csv”; DEFINE FILENAME friendship = “C:/Users/rstemp/tigergraph/mydata/friendship.csv”; LOAD people TO VERTEX person VALUES ("id", “first_name”, "last_name", “age”, "email", “gender”, "phone") USING header="true", separator=","; LOAD friendship TO EDGE friendship VALUES (“from_id”, "to_id", “friendship_date”) USING header=“true”, separator=","; }
Semantic Check Fails: The server name of FILENAME = ‘C:/Users/rstemp/tigergraph/mydata/people.csv’ has server name ‘C’, which is not a valid server with RESTPP installed.

You cannot access your operating system folders from the docker containers running on that OS directly. You will have to use volumes (using docker run -v flag) to link a directory inside a container to an OS directory.

e.g.

docker run ...... -v c:\users\rstemp\tigergraph\mydata:/mytgdata .....

Then refer to the file as “/mytgdata/people.csv” in your load job

Thanks for update, I will update and let you know the resukt

I have tried, the same command given above it says invalid , could you please specify steps so that i can run the same
I have tried the following steps

#1

I have the following file in windows :

C:\Users\rstemp\tigergraph\mydata\

#2

In windows command prompt i have the following

C:\Users\rstemp>docker ps -a

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
82b901305a75 docker.tigergraph.com/tigergraph:latest “/bin/sh -c '/usr/sb…” 45 hours ago Up 43 hours 0.0.0.0:9000->9000/tcp, 0.0.0.0:14240->14240/tcp, 0.0.0.0:14022->22/tcp tigergraph

In Docker I am trying the given command

C:\Users\rs186090>docker run -v c:\users\rstemp\tigergraph\mydata:/tigergraph
“docker run” requires at least 1 argument.
See ‘docker run --help’.

Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG…]

Run a command in a new container

could you please help me in detail on the same

This is turning more into a docker question than TigerGraph, but I will try to answer.

The -v option is an addition to the current docker run command you are using to start the TigerGraph docker container. So the final command should be like the following:

docker run -d ^
  -p 14022:22 ^
  -p 9000:9000 ^
  -p 14240:14240 ^
  --name tigergraph ^
  --ulimit nofile=1000000:1000000 ^
  -v c:\users\rstemp\tigergraph\mydata:/home/tigergraph/mydata ^
  -t docker.tigergraph.com/tigergraph:latest

When you run it the first time, windows will ask if you are willing to allow sharing this directory with Docker.

Alternatively you can use docker predefined volumes.

You also need to stop and remove the previous TigerGraph instance before starting this new one, because there would be a collision. If there is already data loaded, you will have to make sure you have processes to reload the schema and the data.

1 Like

Thank you , I will try and let you know .

it worked thanks so much ,

Any question in SQL what is command to check files in direcotry .

ls or dir not working

Are you asking if there is a gsql command to list files in a directory? I don’t think gsql offers any such command, but I may be wrong!

then how could we know the files are loaded in the directory , by doing tab key in keyboard it lists all the files and folders , from there to see inside of any directory , no where find what is the command to do it

example
in
GSQL> [press tab key] in key board
##output is :
.profile .bash_logout .bashrc .cache .gsql_client_log mydata tigergraph
tutorial .tg.cfg .gsql_fcgi .ssh .bash_tigergraph gsql-graph-algorithms

So if we want to go to mydata or turotial or any folder to see what files are inside that directory and see the context of file what are the commands

so looking at the documentation it is not use-friendly and the open sources materials has no enough info to practice this product like other open soource products.

PS: I thought documentation will help , but in every I am getting stuck and requesting for help which is very odd

You can always find out what files are there in a directory by running a ls command on the OS shell. Since you are mounting a windows directory, you can also see these files on windows explorer.

If you are thinking about some sort of automation, gsql shell should not be your go to solution. You can use Python, Java or other programming/ETL tools for that.