Curiosity

CSV recipe

Source: CsvSample/ · flat CSV file with one student record per row.

Owns in the academic graph: students, universities, departments, degrees, majors, subjects, skills, advisors, countries, cities — plus the edges between them.

What it teaches

  • Composite keys for entities whose name only makes sense under a parent (Department = <University>/<Department>, City = <Country>/<City>).
  • TryAdd for "vocabulary" nodes that may be referenced elsewhere; AddOrUpdate for entity-specific records.
  • Pipe-delimited array splitting inside a CSV cell.
  • Bidirectional edges with graph.Link(a, b, forward, reverse).

Schema (excerpt)

[Node]
public class Student
{
    [Key]      public string Id             { get; set; } = string.Empty;
    [Property] public string Name           { get; set; } = string.Empty;
    [Property] public int    BirthYear      { get; set; }
    [Property] public int    EnrollmentYear { get; set; }
    [Property] public double Gpa            { get; set; }
}

[Node]
public class Department
{
    [Key]      public string Id   { get; set; } = string.Empty;  // "<University>/<Department>"
    [Property] public string Name { get; set; } = string.Empty;
}

Ingest pattern

var student = graph.AddOrUpdate(new Nodes.Student
{
    Id             = row.StudentId,
    Name           = row.StudentName,
    BirthYear      = row.BirthYear,
    EnrollmentYear = row.EnrollmentYear,
    Gpa            = row.Gpa,
});

var university = graph.TryAdd(new Nodes.University { Name = row.University });
graph.Link(student, university, Edges.EnrolledAt, Edges.EnrolledStudent);

var department = graph.TryAdd(new Nodes.Department
{
    Id   = $"{row.University}/{row.Department}",
    Name = row.Department,
});
graph.Link(department, university, Edges.PartOf, Edges.HasDepartment);

Configuration

Variable Purpose Default
CURIOSITY_URL Workspace URL http://localhost:8080/
CURIOSITY_API_TOKEN API token (required)
CURIOSITY_CONNECTOR_NAME Display name in the workspace CSV Sample (Students)
RECIPE_CSV_PATH Path to the CSV file data/students.csv

Reuse notes

  • CsvSource.cs is reusable for any tabular CSV; replace Schema.cs and the ingest method for your data.
  • Use composite keys whenever the same name appears under different parents (Departments under universities, Cities under countries, etc.).
  • Run alongside the JSON/SQL/Mongo recipes against the same workspace — Skill.Name, University.Name, Advisor.Email will merge automatically.