Data Export

This document mainly introduces the data export function of TuGraph.

1.Introduction

TuGraph can use the tool lgraph_export to export data from the database that has been imported successfully. The ‘lgraph_export’ tool can export the data of the specified TuGraph database to the specified directory in the form of ‘csv’ or ‘json’ file, and export the configuration file ‘import.config’. That required for re-importing the data.

2.Data Export

The following is an example of a command for the tool:

$ lgraph_export -d {database_dir} -e {export_destination_dir} -g {graph_to_use} -u {username} -p {password} -f {output_format}

Details:

  • -d {database_dir} specifies the directory of the database from which the data will be exported. The default value is./testdb ‘.

  • -e {export_destination_dir} specifies the directory where the export file is stored. The default value is./exportdir.

  • -g {graph_to_use} specifies the type of graph database. default is’ default ‘.

  • -u {username} Specifies the name of the user who performs the export operation.

  • -p {password} Specifies the password of the user who performs the export operation.

  • -s {field_separator} specifies the separator for the exported file. The default is comma.

  • -f {output_format} specifies the format of the exported data. It can be ‘json’ or ‘csv’.

  • -h In addition to the specified parameters, you can also use this parameter to view the help of the tool.