exchange 导入关系报错(节点能导进去,关系导不进去)

  • nebula 版本:1.1.0
  • Exchange 版本:1.1.0
{
  # Spark relation config
  spark: {
    app: {
      name: Spark Writer
    }

    driver: {
      cores: 1
      maxResultSize: 1G
    }

    cores {
      max: 16
    }
  }

  # Nebula Graph relation config
  nebula: {
    address:{
      graph:[XXX]
      meta:["XXX"]
    }
    user: user
    pswd: password
    space: eureka

    connection {
      timeout: 3000
      retry: 3
    }

    execution {
      retry: 3
    }

    error: {
      max: 32
      output: /tmp/errors
    }

    rate: {
      limit: 1024
      timeout: 1000
    }
  }

  # Processing tags
  tags: [

    # Loading tag from neo4j
    {
      name: BVD_company
      type: {
        source: neo4j
        sink: client
      }
      server: "bolt://XXXXXXXXX"
      user: XXX
      password: 3XXX
ch (n:BVD公司)XXXX"
      fields: [bvd_id_number,name]
      nebula.fields: [bvd_id_number,name]
      vertex: {
        field:bvd_id_number
        policy: "hash"
      }
      partition: 10
      batch: 1000
      check_point_path: /tmp/test
    }

{
      name: BVD_person
      type: {
        source: neo4j
        sink: client
      }
      server: "bolt:/XXX"
      user:XXX
      password:XXX
      exec: "Match (n:XXX) return n.cpycontacts_header_iddirector as cpycontacts_header_iddirector,n.name as name"
      fields: [cpycontacts_header_iddirector,name]
      nebula.fields: [cpycontacts_header_iddirector,name]
      vertex: {
        field:cpycontacts_header_iddirector
        policy:"hash"
      }
      partition: 10
      batch: 1000
      check_point_path: /tmp/test
    }



  ]

  # Processing edges
  edges: [

    # Loading from neo4j
    {
      name: isShareholderOf
      type: {
        source: neo4j
        sink: client
      }
      server: "XXX"
      user: XXX
      password: XXX
      exec: "MATCH p=(n:`XXX`)-[r:isShareholderOf]->(m:`BVD公司`) RETURN n.bvd_id_number,m.bvd_id_number,r.minus9009 as minus9009,r.minus9010 as minus9010 order by n.bvd_id_number"
      fields: [direct_pct, total_pct]
      nebula.fields: [direct_pct, total_pct]
      source: {
        field: n.bvd_id_number
        policy: "hash"
      }
      target: {
        field: m.bvd_id_number
        policy: "hash"
      }
      partition: 10
      batch: 1000
      check_point_path: /tmp/test
    }
   
  ]
}

exec语句中用 as 对n.bvd_id_number 起别名