Acquire data with labels person, company and holding in Neo4j database test, import into Ultipa graphset shareholding:

1. Generate sample configuration file
./ultipa-importer --sample
2. Modify configuration file
# Configure data source type
mode: neo4j
# Configure data source information
neo4j:
  host: "192.168.1.1:5432"
  username: "admin"
  password: "abcd1234"
  database: "test"
# Configure Ultipa server
server:
  # Ultipa server, use comma ',' to separate multiple server nodes of cluster
  host: "192.168.2.149:60075"
  username: "admin"
  password: "abcd1234"
  # Graphset name, or use graphset 'default' by default
  graphset: "shareholding"
  # The directory of the SSL certificate when both Ultipa server and client-end are in SSL mode
  crt: ""
# Configure node data
nodeConfig:
  - schema: "human"
    label: "person"
    where: n.type = 1
    properties:
      - name: id
        type: _id
      - name: name
        type: string
  - schema: "firm"
    label: "company"
    where: n.type = 3
    properties:
      - name: id
        type: _id
      - name: name
        type: string
# Configure edge data
edgeConfig:
  - schema: "hold"
    relationship: "holding"
    where: NOT n:obsolete
    properties:
      - name: from
        type: _from
      - name: to
        type: _to
      - name: shareInt
        type: int32
        new_name: share
        
# Configure global settings
settings:
  batchSize: 10000
  importMode: insert
  # auto-create graph, schema, and properties if not existent
  yes: true
3. Execute import
./ultipa-importer --config ./import.sample.neo4j.yml
In case auto-increment IDs (identity) in Neo4j are to be imported as node IDs in Ultipa, replace
id,fromandtoin the above yml file with<id>,<start>and<end>.