Skip to content
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

Where can I download the example datasets? #4617

Closed
Zzzz-zz opened this issue Sep 5, 2022 · 5 comments
Closed

Where can I download the example datasets? #4617

Zzzz-zz opened this issue Sep 5, 2022 · 5 comments
Labels
type/question Type: question about the product

Comments

@Zzzz-zz
Copy link

Zzzz-zz commented Sep 5, 2022

I want to download the example datasets of nebula graph in the offical website. But I only find the datasets of "Game of Throne" in the online demo demostration. If you can provide the download link of other demos' datasets will help me a lot. Hope you can update the document in the offical site where you can provide the datasets' download link.

@xtcyclist
Copy link
Contributor

xtcyclist commented Sep 5, 2022

Hi, after cloning the code, try execute make up in the nebula/tests folder, the database would be started automatically with example datasets loaded into the database, such as the 'nba' dataset.

When starting up the database, the scripts will pick a random port for the graphd service and show it in the standard screen output like this:

xuntao@nebula-dev-84:~/dev/nebula/tests$ make up
PYTHONPATH=$PYTHONPATH:/home/xuntao.cheng/dev/nebula/tests/.. /home/xuntao.cheng/dev/nebula/tests/nebula-test-run.py --cmd=start \
	--build_dir=/home/xuntao.cheng/dev/nebula/tests/../build \
	--debug=true \
	--multi_graphd=true \
	--enable_ssl=false \
	--enable_graph_ssl=false \
	--enable_meta_ssl=false \
	--ca_signed=false \
	--containerized=false \
	--query_concurrently=false
work directory: /home/xuntao.cheng/dev/nebula/tests/../build/server_2022-09-05T23-21-54
exec: bin/nebula-metad --flagfile conf/nebula-metad.conf --log_dir=logs0 --pid_file=pids0/nebula-metad.pid --port=18672 --ws_http_port=19113 --data_path=data0/metad --heartbeat_interval_secs=1 --expired_time_factor=60 --cert_path=share/resources/test.ca.pem --key_path=share/resources/test.ca.key --password_path=share/resources/test.ca.password --v=4 --enable_ssl=false --enable_graph_ssl=false --enable_meta_ssl=false --containerized=false --meta_server_addrs=127.0.0.1:18672
exec: bin/nebula-storaged --flagfile conf/nebula-storaged.conf --log_dir=logs0 --pid_file=pids0/nebula-storaged.pid --port=15634 --ws_http_port=11853 --data_path=data0/storaged --heartbeat_interval_secs=1 --expired_time_factor=60 --cert_path=share/resources/test.ca.pem --key_path=share/resources/test.ca.key --password_path=share/resources/test.ca.password --v=4 --local_config=false --raft_heartbeat_interval_secs=30 --skip_wait_in_rate_limiter=true --enable_ssl=false --enable_graph_ssl=false --enable_meta_ssl=false --containerized=false --meta_server_addrs=127.0.0.1:18672
exec: bin/nebula-graphd --flagfile conf/nebula-graphd.conf --log_dir=logs0 --pid_file=pids0/nebula-graphd.pid --port=17885 --ws_http_port=18460 --heartbeat_interval_secs=1 --expired_time_factor=60 --cert_path=share/resources/test.ca.pem --key_path=share/resources/test.ca.key --password_path=share/resources/test.ca.password --v=4 --local_config=false --enable_authorize=true --system_memory_high_watermark_ratio=0.95 --num_rows_to_check_memory=4 --session_reclaim_interval_secs=2 --failed_login_attempts=5 --password_lock_time_in_secs=10 --max_expression_depth=128 --enable_ssl=false --enable_graph_ssl=false --enable_meta_ssl=false --containerized=false --meta_server_addrs=127.0.0.1:18672
exec: bin/nebula-graphd --flagfile conf/nebula-graphd.conf --log_dir=logs1 --pid_file=pids1/nebula-graphd.pid --port=14485 --ws_http_port=19504 --heartbeat_interval_secs=1 --expired_time_factor=60 --cert_path=share/resources/test.ca.pem --key_path=share/resources/test.ca.key --password_path=share/resources/test.ca.password --v=4 --local_config=false --enable_authorize=true --system_memory_high_watermark_ratio=0.95 --num_rows_to_check_memory=4 --session_reclaim_interval_secs=2 --failed_login_attempts=5 --password_lock_time_in_secs=10 --max_expression_depth=128 --enable_ssl=false --enable_graph_ssl=false --enable_meta_ssl=false --containerized=false --meta_server_addrs=127.0.0.1:18672
begin to add hosts
Connect 127.0.0.1:17885 failed: socket error connecting to host 127.0.0.1, port 17885 (('127.0.0.1', 17885)): ConnectionRefusedError(111, 'Connection refused')
Connect 127.0.0.1:17885 failed: socket error connecting to host 127.0.0.1, port 17885 (('127.0.0.1', 17885)): ConnectionRefusedError(111, 'Connection refused')
Connect 127.0.0.1:17885 failed: socket error connecting to host 127.0.0.1, port 17885 (('127.0.0.1', 17885)): ConnectionRefusedError(111, 'Connection refused')
add hosts cmd is ADD HOSTS 127.0.0.1:15634
Start nebula successfully

Then, you could coonect to this graphd via this port: 17885. The default user and password are root and 'nebula'. Ignore those failed messages reporting socket errors, it's just the script keeps trying to connect while the service is still starting.

xuntao@nebula-dev-84:~/dev/nebula/tests$ nebula-console --port=17885 -u root -p nebula

Welcome to Nebula Graph!

(root@nebula) [(none)]> show spaces;
+---------------+
| Name          |
+---------------+
| "ldbc_v0_3_3" |
| "nba"         |
| "nba_int_vid" |
| "student"     |
+---------------+
Got 4 rows (time spent 4355/5178 us)

Mon, 05 Sep 2022 23:23:15 CST

(root@nebula) [(none)]> use nba;
Execution succeeded (time spent 4081/4725 us)

Mon, 05 Sep 2022 23:23:16 CST

(root@nebula) [nba]> show tags;
+------------+
| Name       |
+------------+
| "bachelor" |
| "player"   |
| "team"     |
+------------+
Got 3 rows (time spent 4274/4955 us)

Mon, 05 Sep 2022 23:23:18 CST

(root@nebula) [nba]>

For your reference, the tests folder: https://github.com/vesoft-inc/nebula/tree/master/tests

@Zzzz-zz
Copy link
Author

Zzzz-zz commented Sep 6, 2022

Thanks a lot ~ But I want to find the datasets in ".CSV" format. According your description, I need to build a nebula server in my mac and excute the testing case. After that, exports the dataset in specific format?

@xtcyclist
Copy link
Contributor

xtcyclist commented Sep 6, 2022

In the nebula/tests/data/nba folder, there are the *.csv files for the 'nba' dataset, for example.

nebula-importer is needed to load those *.csv files. Please note that the configuration yamls in the above folder are for automatic loading only (because they are using an old format).

If you want to load the data yourself, please refer to this config: https://github.com/vesoft-inc/nebula/pull/4404/files. (I previously run into the same problem that I want to load the data manually, so I wrote this config. But I found out the make up can do what I need for me.)

And, you can find nebula-importer here: https://github.com/vesoft-inc/nebula-importer.

@wey-gu
Copy link
Contributor

wey-gu commented Sep 6, 2022

For basketballplayer dataset, you could execute:
:play basketballplayer in nebula-console

Besides a `.ngql file could be find in docs docs.nebula-graph.com.cn

Also, I created several datasets:

@golfxiao
Copy link

It is difficult for other people's data sets to fully meet their own scenarios. You can try to create a test data set that is suitable for your own business scenario. There is a tool for generating graph data: https://github.com/golfxiao/graph-datagen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question Type: question about the product
Projects
None yet
Development

No branches or pull requests

6 participants