inV

How to designate the incoming vertex to use when loading data from a data file.

Synopsis

DSE5.1.2 and earlier:
inV "*field_name*", {
  label "*field_name*"
  [ key "*key_name*" | key key1_name: "*key1_name*", key2_name: "*key2_name*" ]
}
DSE5.1.3 and later:
inV {
  label "*field_name*"
  [ key "*key_name*" | key key1_name: "*key1_name*", key2_name: "*key2_name*" ]
  ignore "*field_name*"
}

Description

In DSE versions 5.1.2 and earlier, sets the field name in the input file that will define the incoming vertex of an edge. Both inV and outV must be defined in an edge mapping statement. In DSE 5.1.3 and later, the field_name is deleted from between the inV keyword and the {.

Examples

DSE 5.1.2 and earlier: Sets the field name for the incoming vertex in a mapping script to fridgeSensor.

//Sample line read:
// cityId|sensorId|name
// santaCruz|93c4ec9b-68ff-455e-8668-1056ebc3689f|asparagus
// or JSON
// {"sensor": {"cityId": "santaCruz", "sensorId": "93c4ec9b-68ff-455e-8668-1056ebc3689f"}, "name": "asparagus"}

// The incoming vertex has a vertex label of fridgeSensor, the particular vertex is defined as the one with
// the cityId of santaCruz and a sensorId of 93c4ec9b-68ff-455e-8668-1056ebc3689f
inV "fridgeSensor", {
        label "fridgeSensor"
        key cityId:"cityId", sensorId:"sensorId"

The field name in the input file that defines the outgoing vertex is fridgeSensor, the vertex has a vertex label of fridgeSensor, and the composite key value cityId, sensorId is supplied in the input file field set in this statement. The label and key must be set along with inV.

DSE5.1.3 and later:

//Sample line read:
// cityId|sensorId|homeId|name
// santaCruz|93c4ec9b-68ff-455e-8668-1056ebc3689f|asparagus
// or JSON
// {"sensor": {"cityId": "santaCruz", "sensorId": "93c4ec9b-68ff-455e-8668-1056ebc3689f"}, "name": "asparagus"}

// The incoming vertex has a vertex label of fridgeSensor, the particular vertex is defined as the one with
// the cityId of santaCruz and a sensorId of 93c4ec9b-68ff-455e-8668-1056ebc3689f
inV {
        label "fridgeSensor"
        key cityId: "cityId", sensorId: "sensorId"
        exists()
        ignore "homeId"
        ignore "name"
    }

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com