jrgemignani commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2207356787
@dhilst This issue is that you aren't creating a vlabel for the label you
are importing from the CSV. Note how the regression tests do the load -
```
SELECT create_graph('agload_test_graph');
SELECT create_vlabel('agload_test_graph','Country');
SELECT load_labels_from_file('agload_test_graph', 'Country',
'age_load/countries.csv');
SELECT create_vlabel('agload_test_graph','City');
SELECT load_labels_from_file('agload_test_graph', 'City',
'age_load/cities.csv');
SELECT create_elabel('agload_test_graph','has_city');
SELECT load_edges_from_file('agload_test_graph', 'has_city',
'age_load/edges.csv');
```
If applied to your issue -
```
psql-16.2-5432-psql=# drop extension age; create extension age; load 'age';
set search_path TO ag_catalog;
DROP EXTENSION
CREATE EXTENSION
LOAD
SET
psql-16.2-5432-psql=# select create_graph('test_graph');
NOTICE: graph "test_graph" has been created
create_graph
--------------
(1 row)
psql-16.2-5432-psql=# select load_labels_from_file('test_graph', 'Cities',
'/home/jgemignani/POSTGRESQL/cities.csv');
ERROR: label_id must be 1 .. 65535
psql-16.2-5432-psql=# SELECT create_vlabel('test_graph','Cities');
NOTICE: VLabel "Cities" has been created
create_vlabel
---------------
(1 row)
psql-16.2-5432-psql=# select load_labels_from_file('test_graph', 'Cities',
'/home/jgemignani/POSTGRESQL/cities.csv');
load_labels_from_file
-----------------------
(1 row)
psql-16.2-5432-psql=#
```
The issue is that the label you are importing the vertices or edges into,
doesn't exist.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]