Export JSONL file(s) from Ultipa graphset Movie to folder exportData located in SFTP or local directory:
1. Generate sample configuration file
Execute the following command in your command line tool.
./ultipa-exporter --sample
The export.sample.yml
file will be generated in the same directory as ultipa-exporter.exe. If a export.sample.yml
file already exists in that directory, it will be overwritten.
2. Modify configuration file
Modify the configuration file according to your needs.
Note: If SFTP is not used, remove the section involving SFTP server configurations from the configuration file below.
# Ultipa Server Configurations
server:
# Host Address or URI : Port
host: "192.168.1.xx:60061"
# Username
username: "***"
# Password
password: "***"
# Target Graphset
graphset: "Movie"
shards: "1,2,3"
# partitionBy algorithm :Crc32/CityHash64...
partitionBy: "Crc32"
# Crt File for TLS
crt: ""
# SFTP Server Configurations
sftp:
# Host Address or URI : Port
host: 10.132.3.xx:22
# Username
username: root
# Password for SFTP authentication (if no key is provided)
password: root
# SSH Key path for SFTP (if set, password will not be used)
key: ./my_secret
# Node and Edge Configurations
# Set schema to "*" to export all node/edge schemas
nodeConfig:
- schema: movie
properties:
- name: _id
- name: name
- name: rating
- schema: director
properties:
- name: _id
- name: name
- name: nationality
edgeConfig:
- schema: direct
properties:
- name: _from
- name: _to
- name: directedIn
# Other Settings
settings:
# Support csv/json/jsonl/graphml
fileType: jsonl
writeHeader: true
# Export output folder path
# If SFTP is configured, the path is the SFTP path
outPath: "./exportData"
# Whether to stop process if an error occurs
stopWhenError: true
# Maximum number of threads (suggested: 32)
threads: 32
# Maximum RPC message size in MB (default: 40MB)
maxPacketSize: 40
# The maximum time (in seconds) to export data. If set to 0, default value 1000 is used;if timeout<0, disable timeout for data export.
timeout: 1000
# Timestamp data unit, supports "ms" or "s" (default: "s")
timestampUnit: s
3. Execute export
The import process uses the configuration file specified by the -config
parameter to export data from the target server.
./ultipa-exporter --config export.sample.yml