Acquire data from tables entity and relation in BigQuery project transporter-demo-388303, import into Ultipa graphset shareholding:
- Generate a sample of configuration file
./ultipa-importer --sample
- Modify configuration file
# Configure data source type
mode: bigQuery
bigQuery:
# string of project id on BigQuery
projectID: "transporter-demo-388303"
# the json file that stores KEY of Service Account used to access the project on BigQuery
cert: "./transporter-demo-388303-fe9e5800c1b8.json"
# 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"
sql: "select id, name from entity where type = 1"
properties:
- name: id
type: _id
- name: name
type: string
- schema: "firm"
sql: "select id, name from entity where type = 3"
properties:
- name: id
type: _id
- name: name
type: string
# Configure edge data
edgeConfig:
- schema: "hold"
sql: "select from, to, shareInt from relation where type = 'holding'"
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
- Execute import operation
./ultipa-importer --config ./import.sample.bigQuery.yml
projectID
: Create BigQuery project in Google Cloud and acquire project ID
cert
: Create Service Account with BigQuery Admin privilege and generate KEY in JSON format