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

Import Error #1316

Closed
ouzensang opened this issue Nov 22, 2019 · 15 comments
Closed

Import Error #1316

ouzensang opened this issue Nov 22, 2019 · 15 comments
Assignees

Comments

@ouzensang
Copy link

Describe the bug(must be provided)
I deploy Nebula on a cluster of 3 machines(Centos7), when I import data from csv by using https://github.com/vesoft-inc/nebula-importer. I met some error info, but I can't find any solution to solve it.

Your Environments(must be provided)

  • OS: Centos7.6
  • Compliler: gcc version 4.8.5
  • CPU:

How To Reproduce(must be provided)
Steps to reproduce the behavior:

  1. deploy Nebula cluster
  2. define config
  3. run command to import data

Expected behavior
Import csv files successfully

Additional context
My config file:
config.txt
My command:
go run importer.go --config ../example/config.txt
My error:
image

@jievince
Copy link
Contributor

image
The config file format is .yaml(config.txt is wrong)and make sure you have the right config.yaml in the path that --path appoints to.

@ouzensang
Copy link
Author

@jievince Thanks for your kindly advice! I know the config file format is .yaml, but .yaml file can't upload to this issue, so I change its format. But actually I run it in a correct formal like this...
image

@whitewum
Copy link
Contributor

whitewum commented Nov 23, 2019

some possible solutions:

1 check log

can you paste some log message:
the importer log can be found in logPath: ./err/test.log
the server log can be found in /usr/local/nebula/log/nebula-graphd.INFO

2 check schema

the E_SYNTAX_ERROR looks like your csv file schema is inconsistent with server side.

Can you run the nebula console to verify your schema is correct.

/usr/local/nebula/bin/nebula -u user -p password
> use xxx --- your space name, maybe test
> describe tag tag_xxx_name  --- your tag name

and

head your_csv_file

to make sure the csv file, the config.yaml, and your server side schema are consistent with each other.

3 wechat (weixin)

You are welcome to add wechat friend NebulaGraphBot. So we can contact you to help.

@whitewum
Copy link
Contributor

Thank you for your report.

@yixinglu
Copy link
Contributor

Hi @ouzensang , I have checked your configuration file and don't find any syntax errors. So, I guess the problem you are experiencing should be that the order of the props of the schema in configuration file is inconsistent with the order of the data columns in the csv file.

@ouzensang
Copy link
Author

@whitewum Thanks for your kindly reply! :)
Actually, there is no some special info in its logs.

  1. the info in the importer log is :2019/11/23 16:20:30 cmd.go:25: Finish import data, consume time: 0.00s
  2. the file /usr/local/nebula/logs/nebula-graphd.INFO is empty
  3. my schema
    image
    my data file
    image

When I first read the doc of nebula-importer, I can't understand the preparation work "Schema is created" whether means I need to create this schema in Nebula shell first, so I didn't create it.
I thought maybe I need to define the schema of data first. But when I create it successfully and reimport my data, the same error still exists. So I have some questions:

  1. Whether the identified id of data need to be defined in the schema or config file. Actually, I didn't define it.
  2. Whether there are some keywords that user can't use to define attributes.
  3. The parameter "concurrency" whether means the number of machines in cluster and "address" whether is the address of one machine in cluster.

I even change the order of data file in the file, but the same error still exists. =.=

@ouzensang
Copy link
Author

When I ran the example which nebula-importer provided, I met the same error. And I just changed the address parameter in th config file.
image

@whitewum
Copy link
Contributor

whitewum commented Nov 23, 2019

1. Sorry for the inconvenient.

There might be some new changes in the nebula-importer (or the configuration and sample files). So @yixinglu @wilsonyou please check them again ( the code, the md, the csv, etc).

2. possible solution

to open log:

> curl "http://127.0.0.1:13000/set_flags?flag=v&value=2"
> curl "http://127.0.0.1:13000/set_flags?flag=minloglevel&value=0"

This will help to provide nebula-graphd.LOG.

to close log

> curl "http://127.0.0.1:13000/set_flags?flag=v&value=0"
> curl "http://127.0.0.1:13000/set_flags?flag=minloglevel&value=1"

can you try to import the comment.csv first.

Answers to your questions:

  1. Whether there are some keywords that user can't use to define attributes.

Yes. there are some reserved keywords to name an attribute. But the namings in your config.yaml looks good. (id is not a reserved keywords. but 'timestamp', 'int', etc, are keywords.)

  1. The parameter "concurrency" whether means the number of machines in cluster and "address" whether is the address of one machine in cluster.

in your config.yaml, ( concurrency: 3 # number of graph clients), it means there are three writing-threads to write to the server(192.168.2.9:3699).

1.Whether the identified id of data need to be defined in the schema or config file. Actually, I didn't define it.

we call identified id as VID (vertex id)

In the Nebula shell schema definition, yes. I must create the schema before you write any data.

In the config file: a bit complicated (depending on the csv header)

P. S .

We're working on a web UI to improve the importer progress. The config.yaml and command line are quite error-prone. I hope the web UI will help for the beginners.
@nianiaJR

You are welcome to contact us by

https://user-images.githubusercontent.com/38887077/67449282-4362b300-f64c-11e9-878f-7efc373e5e55.jpg

and

https://nebulagraph.slack.com/?redir=%2Farchives%2FDJQC9P0H5%2Fp1557815158000200

@ouzensang
Copy link
Author

@whitewum Thanks for your help! :)

@wilsonyou
Copy link

@ouzensang Please refer to the following link which provides step-by-step guide to import csv files:
https://github.com/wilsonyou/nebula/blob/importer2/docs/manual-EN/1.overview/2.quick-start/4.import-csv-file.md

@whitewum
Copy link
Contributor

whitewum commented Nov 25, 2019

@whitewum Thanks for your help! :)

BTW,can you star Nebula if you like it. :)

@ouzensang
Copy link
Author

@wilsonyou Thanks for your kindly help!
I reinstalled the newest version of Nebula and imported example data successfully :). I will try to import my own data again!

@ouzensang
Copy link
Author

@whitewum No problem! I have solved my problem successfully! Thank you again! :)

@whitewum
Copy link
Contributor

@wilsonyou Thanks for your kindly help!
I reinstalled the newest version of Nebula and imported example data successfully :). I will try to import my own data again!

You are welcome to contact us for any questions.

@wilsonyou
Copy link

@ouzensang No problem. Glad to hear that you made it! Congratulations!

yixinglu pushed a commit to yixinglu/nebula that referenced this issue Jan 31, 2023
Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>
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

6 participants