age icon indicating copy to clipboard operation
age copied to clipboard

Is there any Good documentation how age load works

Open Munmud opened this issue 1 year ago • 4 comments

Is there any documentation of age load ? I was going through the code any didn't found useful comments regardig how the algorithm works. Is there any good documentation regarding these function as below :

  • load_labels_from_file()
  • load_edges_from_file()

Munmud avatar Jun 07 '23 04:06 Munmud

parsing the data from the CSV file goes in a

1. CSV file structure:

First row: Header row describing the content of each column.

Subsequent rows: Edge data with the following fields:

  1. Start node ID (integer)
  2. Start node label (string)
  3. End node ID (integer)
  4. End node label (string)
  5. Additional properties (optional)

here is the detailed info about each function used csv_edge_reader struct: This structure holds the state of the CSV parser, including the fields, header, graph name, graph ID, object name, object ID, and other related information.

edge_field_cb(): This is a callback function called for each field in the CSV file. It stores the field in the csv_edge_reader struct, reallocating memory as needed.

edge_row_cb(): This is a callback function called for each row in the CSV file. If the row is the first row (header row), it stores the header information. For other rows, it processes the fields to extract start and end nodes, properties, and other edge-related information. It then calls insert_edge_simple() to insert the edge into the graph.

is_space() and is_term(): These are utility functions used to customize the CSV parser's behavior when detecting space and line terminator characters, respectively.

create_edges_from_csv_file(): This is the main function responsible for reading the CSV file and processing it using the CSV parser. It initializes the parser, reads the file in chunks, calls the appropriate callbacks (edge_field_cb() and edge_row_cb()), and cleans up memory after processing is comp

I have read the code and I found this might be useful the CSV file should follow these constraints:

Header row: The CSV file must have a header row that describes the content of each column. The code assumes that the first row of the file is the header row.

Field values: The start and end node IDs must be integers. The start and end node labels should be strings.

i believe it is kinda the same for the load_edges_from_file() the same processing of parsing a file

Amr-Shams avatar Jun 07 '23 08:06 Amr-Shams

I dont think there is at this time. This on the documentation doesn't explain the algorithms just how to functions for age_load work.

titoausten avatar Jun 07 '23 08:06 titoausten

Hello,

Here is the documentation link for AGE LOAD.

https://age.apache.org/age-manual/master/intro/agload.html

muhammadshoaib avatar Jun 07 '23 16:06 muhammadshoaib

you can reach it in: AGE LOAD

M4rcxs avatar Jun 08 '23 00:06 M4rcxs

As shoaib and mrrcxs said you can view this link for detailed documentation of load_labels_from_file() and load_edges_from_file().

talhahahae avatar Jun 12 '23 12:06 talhahahae

@Munmud for a detailed documentation on the age load function and its usage, I recommend referring to the AGE manual. It provides comprehensive information on how the algorithm works. You can find the relevant documentation at the following link: AGE Docs - Importing graph from files. It should provide you with the insights you're looking for.

dukeofhazardz avatar Jun 12 '23 17:06 dukeofhazardz

You can find the documentation here. However, the link only explains usage of tool, you can refer the AGE manual for explanation of working of algorithm

Zeesh-an avatar Jun 12 '23 22:06 Zeesh-an

I would refer you to the detailed documentation for deeper insights on the function

humzakt avatar Jun 13 '23 05:06 humzakt