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

Something wrong with the -file option #50

Closed
randomJoe211 opened this issue Nov 19, 2020 · 4 comments
Closed

Something wrong with the -file option #50

randomJoe211 opened this issue Nov 19, 2020 · 4 comments
Assignees

Comments

@randomJoe211
Copy link
Contributor

randomJoe211 commented Nov 19, 2020

As shown in the image, I imported an ngql file, created tags and edge types, but can't insert vertices.
image

The lines at the beginning are as follows.

drop space nba;
create space nba(partition_num=10,replica_factor=1,vid_type=fixed_string(32));
use nba;
create tag player(name string,age int);
create tag team(name string);
create edge serve(start_year int,end_year int);
create edge like(likeness int);
insert vertex player(name,age) values "player100":("Tim Duncan", 42);
insert vertex player(name,age) values "player101":("Tony Parker", 36);
insert vertex player(name,age) values "player102":("LaMarcus Aldridge", 33);
insert vertex player(name,age) values "player103":("Rudy Gay", 32);

Please take a look. Thank you.

@randomJoe211
Copy link
Contributor Author

If I manually use nba and use the same statement to insert a vertex, it works well.
image

@jievince
Copy link
Contributor

There is a time delay before graphd service knows new schema is created. So if you use -f mode, please add the local command :sleep 3, which means wait for 3 seconds, between creating a schema and using schema(such as insert data). The reason why you manually do this works well is manual operation is inherently delayed

@randomJoe211
Copy link
Contributor Author

randomJoe211 commented Nov 24, 2020

There is a time delay before graphd service knows new schema is created. So if you use -f mode, please add the local command :sleep 3, which means wait for 3 seconds, between creating a schema and using schema(such as insert data). The reason why you manually do this works well is manual operation is inherently delayed

@jievince Thank you for your reply. Could you show me how to use the command with :sleep 3? My original command is ./nebula-console -port <port> -u nebula -p whatever -f testspace.ngql

@jievince
Copy link
Contributor

Have a look at https://github.com/vesoft-inc/nebula-console/blob/master/data/nba.ngql.
You should add :sleep 3 in testspace.ngql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants