0

I am unable to load empty string values for vertex and edge properties, as far as I know I am following Gremlin Load Format and providing the right request JSON to Neptune loader endpoint.

This is how the vertex csv file(generated using pandas) on s3 looks

enter image description here

The request payload sent to loader endpoint(http://database:8182/loader)

{
   "source": "s3://bucket/dir/or/object/containing/csvfile/",
   "format" : "csv",
   "iamRoleArn" : "arn:sample",
   "region" : "us-east-1",
   "failOnError" : "FALSE",
   "parserConfiguration" : {
       "allowEmptyStrings": true
     }
}

The data is loaded successfully.

  1. Vertex is created.
  2. 'label' and 'id' fields are assigned with values mentioned in the csv.
  3. 'key2' property shows its value as 'value'(mentioned in csv).
  4. 'key1' property is not found/loaded in database in spite of providing allowEmptyStrings as true in request payload.
Sai Kiran
  • 74
  • 5

1 Answers1

0

If you want an empty string, you need to encapsulate it in quotes within the CSV:

~id,~label,key1:String,key2:String
testid1,testlabel,"",value2
testid2,testlabel,value1,""

If the field is not encapsulated in quotes, it is treated as null (which is different than an empty string). Null values are implicit within TinkerPop as it presently stands.

Taylor Riggan
  • 1,963
  • 6
  • 12