CSV File Format Guide for Cloud Express: Managing Nodes and Edges
Published: 2023-08-31 15:34:53


This guide is part of a series on Cloud Express – the web application that revolutionizes how you interact with Apache Age. If you haven't already, check out our [previous blog](https://dev.to/kamleshmmb45/introducing-cloud-express-access-apache-age-with-ease-on-browser-dhn) for an introduction to Cloud Express and its user-friendly interface.

In Cloud Express, managing your data becomes a breeze, especially with the ability to upload CSV files containing nodes and edges. These CSV files play a pivotal role in constructing and visualizing your projects seamlessly. When you log in using your existing account or Google credentials, you'll step into a world where data organization and project creation are at your fingertips.

**Creating Projects and Uploading CSV Files**
Upon login, you'll be directed to a dedicated page where the magic happens. Here, you can initiate projects and start uploading CSV files containing both nodes and edges. The beauty lies in the structure and naming conventions of these files.

**Distinguishing Between Nodes and Edges**
Cloud Express effortlessly distinguishes between nodes and edges by analyzing the filenames. If your file's name contains 'eg_', it's recognized as an edge file. On the other hand, if it carries 'vt_', it's deemed a vertex (node) file. This intuitive separation streamlines your project setup.

**Predefined Sample Projects**
To make your journey even smoother, Cloud Express offers three predefined project templates you can choose from:

1. **Car Specification**
2. **Cybersecurity**
3. **p2p (Graphs with Crypto-graphs)**

These templates come preconfigured, granting you a head start in your project creation process. You can dive right into these sample projects and tailor them to your specific needs.

**Understanding CSV File Formats for Nodes and Edges**
Now, let's explore the structure of the CSV files you'll be uploading.

**CSV Format for Nodes (Vertices)**

| Field Name | Field Description                                        |
|------------|----------------------------------------------------------|
| id         | Unique identifier for the node (optional if id_field_exists is set to false) |
| Properties | Columns with node properties (header row with property names) |

**CSV Format for Edges**

| Field Name       | Field Description                                        |
|------------------|----------------------------------------------------------|
| start_id         | Node ID where the edge originates                       |
| start_vertex_type| Class of the starting node                               |
| end_id           | Node ID where the edge concludes                        |
| end_vertex_type  | Class of the ending node                                 |
| properties       | Columns with edge properties (header row with property names) |

**Access Sample CSV Formats**
For a hands-on experience, check out our [Sample CSV Format](https://github.com/AGEDB-INC/Cloud-Express/tree/main/backend/uploads/SampleCSVs) that aligns with these guidelines. This will give you a tangible idea of how to structure your own CSV files for nodes and edges.

**Clearing Up the CSV Format**
In summary, when crafting your CSV files, ensure that the structure aligns with the guidelines provided above. For nodes, include an `id` column and subsequent property columns. For edges, list the `start_id`, `start_vertex_type`, `end_id`, `end_vertex_type`, and the edge properties.

Embrace the simplicity of CSV files in Cloud Express – they're your key to organizing nodes, defining edges, and bringing your projects to life. Whether you're an experienced data manager or just starting out, Cloud Express empowers you to effortlessly manage, visualize, and explore your data.