27.1.1 Graph Configuration for Loading from File

For graphs in the CSV format, the columns used to specify the key column, source column, destination column (for partitioned graphs) need to be either all specified, or none. If none are specified, the graph server (PGX) assumes the key column is the first (for vertex files) or missing (for edge files), followed by source and destination column (for edge files), and then by the property columns according to their order in the graph configuration.

Partitioned Graphs

In order to load a partitioned graph from supported files, you must set the following additional graph configuration fields.

Table 27-1 Loading a Partitioned Graph From File - Additional Graph Configuration Options

Field Type Description Default
format enum[pgb, csv, rdbms, es] Provider format. required
name string Entity provider name. required
attributes object Additional attributes needed to read/write the graph data. null
destination_vertex_provider string Name of the destination vertex provider to be used for this edge provider. null
detect_gzip boolean Enable or disable automatic gzip compression detection when loading graphs. true
error_handling object Error handling configuration. null
has_keys boolean Indicates if the provided entities data have keys. true
header boolean First line of file is meant for headers, such as EdgeId, SourceId, DestId, EdgeProp1, and EdgeProp2 false
key_type enum[int, integer, long, string] Type of the keys. long
keystore_alias string Alias to the keystore to use when connecting to database. null
label string Label for the entities loaded from this provider. null
loading object Loading specific configuration. null
local_date_format array of string Array of local_date formats to use when loading and storing local_date properties. See DateTimeFormatter for a documentation of the format string. []
password string Password to use when connecting to database. null
point2d string Longitude and latitude as floating point values separated by a space. 0.0 0.0
props array of object Specifies the properties associated with this entity provider. []
separator string A series of single-character separators for tokenizing. The characters ", {, }, and \n cannot be used as separators. Default value is , for CSV files, and \t for other formats. The first character will be used as a separator when storing. null
source_vertex_provider string Name of the source vertex provider to be used for this edge provider. null
storing object Storing specific configuration. null
time_format array of string The time format to use when loading and storing time properties. See DateTimeFormatter for a documentation of the format string. []
time_with_timezone_format array of string The time with timezone format to use when loading and storing time with timezone properties. See DateTimeFormatter for a documentation of the format string. []
timestamp_format array of string The timestamp format to use when loading and storing timestamp properties. See DateTimeFormatter for a documentation of the format string. []
timestamp_with_timezone_format array of string The timestamp with timezone format to use when loading and storing timestamp with timezone properties. See DateTimeFormatter for a documentation of the format string. []
uris array of string List of unified resource identifiers. []
vector_component_delimiter character Delimiter for the different components of vector properties. ;

The key column, source column, destination column can be configured with the following CSV specific fields:

Table 27-2 CSV Specific Options for Partitioned Graphs

Field Type Description Default
format enum[pgb, csv, rdbms, es] Provider format. required
name string Entity provider name. required
attributes object Additional attributes needed to read/write the graph data. null
destination_column value Name or index (starting from 1) of column corresponding to edge destination (for CSV format only). null
destination_vertex_provider string Name of the destination vertex provider to be used for this edge provider. null
detect_gzip boolean Enable or disable automatic gzip compression detection when loading graphs. true
error_handling object Error handling configuration. null
has_keys boolean Indicates if the provided entities data have keys. true
header boolean First line of file is meant for headers, such as EdgeId, SourceId, DestId, EdgeProp1, EdgeProp2. false
key_column value Name or index (starting from 1) of column corresponding to keys (for CSV format only) null
key_type enum[int, integer, long, string] Type of the keys. long
keystore_alias string Alias to the keystore to use when connecting to database. null
label string Label for the entities loaded from this provider. null
loading object Loading-specific configuration. null
local_date_format array of string Array of local_date formats to use when loading and storing local_date properties. See DateTimeFormatter for a documentation of the format string. []
password string Password to use when connecting to database. null
point2d string Longitude and latitude as floating point values separated by a space. 0.0 0.0
props array of object Specifies the properties associated with this entity provider. []
separator string A series of single-character separators for tokenizing. The characters , {, }, and \n cannot be used as separators. Default value is , for CSV files, and \t for other formats. The first character will be used as a separator when storing. null
source_column value Name or index (starting from 1) of column corresponding to edge source (for CSV format only). null
source_vertex_provider string Name of the source vertex provider to be used for this edge provider. null
storing object Storing-specific configuration. null
time_format array of string The time format to use when loading and storing time properties. See DateTimeFormatter for a documentation of the format string. []
time_with_timezone_format array of string The time with timezone format to use when loading and storing time with timezone properties. See DateTimeFormatter for a documentation of the format string. []
timestamp_format array of string The timestamp format to use when loading and storing timestamp properties. See DateTimeFormatter for a documentation of the format string. []
timestamp_with_timezone_format array of string The timestamp with timezone format to use when loading and storing timestamp with timezone properties. See DateTimeFormatter for a documentation of the format string. []
vector_component_delimiter character Delimiter for the different components of vector properties. ;