Data Ingestion
Raphtory provides multiple ways to build your temporal graph from existing data. You can work with any columnar data source that implements the Arrow C Stream interface, make direct updates via the API, or import from other graphs.
Creating a graph
To get started, create a Graph object. Printing this graph will show it as empty with no nodes, edges, or update times:
Raphtory supports different time semantics for how updates are recorded. By default, updates are treated as events (point-in-time occurrences). For state-based updates that persist until changed, see Time Semantics.
Adding data
Once you have a graph, you can add data using several approaches:
| Approach | Description |
|---|---|
| Direct Updates | Add nodes and edges programmatically via add_node() and add_edge() |
| Columnar Data | Load from CSV, Parquet, Pandas, Polars, DuckDB, or any Arrow-compatible source |
| Importing | Import nodes and edges from other graphs, including from views |
Saving and loading
Once you've built a graph, you can save it to disk to avoid re-parsing the original data:
| Format | Description |
|---|---|
save_to_file() | Save to a directory (fastest for large graphs) |
save_to_zip() | Save to a single zip file (portable) |
Reload with Graph.load_from_file(). See Saving & Loading for details.
Remote graphs via server
If you're running a RaphtoryServer, you can create, update, send, and download graphs remotely via the GraphQL API. This enables collaborative workflows where multiple clients can query and modify the same graph. See the GraphQL section for more details.