Example

This example demonstrates how to use this Context Provider to return contextual movie data from Neo4j's in-built example graph database of movies and actors.

Refer to configuration to understand all configuration options of this Agent.

Step 1: Add the Agent

  1. Drag the Neo4j Context Provider onto the Canvas.

  2. Rename the Agent and link the output endpoint to the printer.

  3. Save the Data Stream.

  4. Double-click to configure the Agent.

Step 2: Configure Server

Enter the server details: Server Uri, Username, and Password. In this case, the Neo4j database is on the local machine so we are not using variables.

Step 3: Configure Database

Set the Database, Label, and Return Properties. In this case, set the database to "neo4j" and the label to "Movie". Leave Specify Query unchecked and Return Properties blank.

Step 4: Configure Filtering and Sorting

Enter how you would like to limit the number of rows returned, an optional filter, and an optional sort.

In this case, set the Limit Rows By to "Number of Rows", the Number of Rows to 10, and add a row in the Sort By table for the released property, ordered by Descending.

Step 5: Results

Apply the changes, save the Data Stream, and publish it.

Let's take a look at the Live Data View. Observe that the 10 most recently released movies are printed.

Files

See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.

Last updated