0

I am using Apache ageDB and trying to load data from the CSV file, but the reading operation fails after executing the program for some time.

SELECT * FROM create_graph('neurond');
SELECT create_vlabel('neurond','entity');
SELECT * FROM load_labels_from_file('neurond','entity,'./data_dir/entity.csv');

Note: Data path is correct.

This query produces this error:

ERROR: entry_id must be 1 .. 281474976710655

However, the entry_id ranges from 10,000 to 330,000

cybersam
  • 63,203
  • 6
  • 53
  • 76
Abdul
  • 69
  • 5

4 Answers4

1

Your data may be in the correct format but the header data can also cause some problems sometimes. So, remove the header query and try to use the data in this format.

load_labels_from_file('<graph name>', 
                      '<label name>',
                      '<file path>', 
                      false)

The false indicates that you are not giving the id property in the CSV file while if you are not setting it to false then you have to provide the id property in the CSV file.

For more details, you can view the link below:

Documentation Link

0

Try this for loading:

  SELECT * FROM create_graph('neurond');
SELECT create_vlabel('neurond','entity');
SELECT * FROM load_labels_from_file('neurond', 'entity', './data_dir/entity.csv', 'csv', 'header', 'skip', 'entry_id');
0

I think the error occurs as result of a missing single quote ' after the word entity the second parameter value of load_labels_from_file function used.

So try this after fix ,

SELECT * FROM create_graph('neurond');
SELECT create_vlabel('neurond','entity');
SELECT * FROM load_labels_from_file('neurond','entity','./data_dir/entity.csv');
David George
  • 318
  • 1
  • 5
0

You did a typo in the 'entity.'

SELECT * FROM load_labels_from_file('neurond', 'entity,'./data_dir/entity.csv');

you are using the scape incorrectly

SELECT * FROM load_labels_from_file('neurond','entity', './data_dir/entity.csv');
Marcos Silva
  • 115
  • 5