Post-import Steps

Results of Data Importer

After you have run the import using the Data Importer, it is important that you review the graph results.

The most important behavior of the Data Importer you must understand is that property values are written as strings, Longs (integer values), Doubles (decimal values), Datetimes, or Booleans.

In addition, the Data Importer creates uniqueness constraints on all nodes based upon the unique ID you specified for each node.

Moving toward the target data model

Again, here is our data model we would like to end up with:

Movie data model

In this target data model we see:

  • Some properties should be lists of strings.

  • We need Genre nodes in our graph.

  • We need Actor and Director labels.

For example, here is what a current Movie node’s properties look like as a result of the Data Importer:

Default Movie properties

Per our target model, we want to change how these properties are stored in the graph for Movie nodes:

  • languages to a list of strings ["English","French:]

  • countries to a list of strings ["Germany","USA"]

  • genres will not exist and will be used to create Genre nodes and their relationships to Movie nodes.

Next steps

After you used the Data Importer to import the data, you will use Cypher to refactor the imported data. Refactoring for this data model will involve:

  • Transforming data types from string to multi-value list of strings.

  • Adding the Actor and Director labels to the Person nodes.

  • Adding more constraints per the graph data model.

  • Creating the Genre nodes from the data in the Movie nodes.

In the next module, you will learn how to write Cypher to refactor the graph.

Check your understanding

Post-processing

What types of changes might you need to perform after you have run the Data Importer?

  • ❏ Convert string property values to maps.

  • ❏ Convert string properties to use single quotes rather than double-quotes.

  • ✓ Create lists from multi-value properties.

  • ✓ Create nodes from some multi-value properties.

Hint

The Data Importer can store data from the CSV files as strings, integers, floats, datetimes, or booleans. Our target data model contains lists of strings, and we want to add the Genre nodes from the genres properties of the Movie nodes.

Solution

After you have run the Data Importer, you may need to:

  1. Create lists from multi-value properties.

  2. Create nodes from some multi-value properties.

Summary

In this lesson, you learned that if you want your properties to be something other than strings, integers, floats, datetimes, or booleans after using the Data Importer, you will need to post-process the graph.

In the next module, you will learn how to refactor the graph to conform to the target data model.