CYPHER解构之图模型自动解析映射到数据模型

 

Here’s the table of contents:

  1. 图模型CYPHER
  2. 图模型映射逻辑架构
  3. 存储过程自动解析CYPHER-PATTERN生成CYPHER-ASSEMBLE

图模型CYPHER

MATCH p=(com0:公司)<-[:担保]-(com1:公司)<-[:持股]-(com2:公司)-[:持股]->(com3:公司)-[:属于]->(idus:行业)  WHERE idus.name='轻工' RETURN p LIMIT 25

图模型映射逻辑架构

CYPHER-PATTERN -> CYPHER-ASSEMBLE

存储过程自动解析CYPHER-PATTERN生成CYPHER-ASSEMBLE

'MATCH p=(com0:公司)<-[:担保]-(com1:公司)<-[:持股]-(com2:公司)-[:持股]->(com3:公司)-[:属于]->(idus:行业)  WHERE idus.name='轻工' RETURN p LIMIT 25' AS cypherPattern
CALL apoc.load.jdbc('jdbc:mysql://testlab-contentdb-dev.crkldnwly6ki.rds.cn-north-1.alibaba.com.cn:3306/analytics_graph_data?user=dev&password=testlabgogo&useUnicode=true&characterEncoding=utf8&serverTimezone=UTC','SELECT std_schema,data_schema FROM ONGDB_SCHEMA_MAPPING WHERE hisvalid=1') YIELD row WITH COLLECT(row) AS schema_map_list
WITH olab.cypher.assemble(cypherPattern,schema_map_list) AS cypher