Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neo4jRelation
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qiuchaofei
neo4jRelation
Commits
8e7c2769
Commit
8e7c2769
authored
Jan 13, 2022
by
qiuchaofei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
先注释掉column,sql等模型
parent
1ab4c956
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
57 deletions
+57
-57
MetadataServiceImpl.java
...ta/metadataRelation/service/impl/MetadataServiceImpl.java
+56
-56
application-test.yml
src/main/resources/application-test.yml
+1
-1
No files found.
src/main/java/com/keymobile/metadata/metadataRelation/service/impl/MetadataServiceImpl.java
View file @
8e7c2769
...
@@ -1356,35 +1356,35 @@ public class MetadataServiceImpl implements IMetadataService {
...
@@ -1356,35 +1356,35 @@ public class MetadataServiceImpl implements IMetadataService {
compositionRelationList
.
add
(
compositionRelation
);
compositionRelationList
.
add
(
compositionRelation
);
}
}
List
<
MongoData
>
eltSqlMongoList
=
mongoDbServiceImpl
.
findDataByparentId
(
etlScriptMongo
.
get_id
(),
catalogName
);
//
List<MongoData> eltSqlMongoList = mongoDbServiceImpl.findDataByparentId(etlScriptMongo.get_id(),catalogName);
for
(
MongoData
eltSqlMongo:
eltSqlMongoList
){
//
for (MongoData eltSqlMongo:eltSqlMongoList){
//
String
etlSqlId
=
eltSqlMongo
.
get_id
();
//
String etlSqlId = eltSqlMongo.get_id();
Neo4jETLSql
neo4jETLSql
=
null
;
// neo4jETLSqlRepository.findNeo4jETLSqlByMetadataId(etlSqlId);
//
Neo4jETLSql neo4jETLSql =null;// neo4jETLSqlRepository.findNeo4jETLSqlByMetadataId(etlSqlId);
if
(
neo4jETLSql
==
null
){
//
if(neo4jETLSql == null){
neo4jETLSql
=
new
Neo4jETLSql
();
//
neo4jETLSql = new Neo4jETLSql();
//
neo4jETLSql
.
setMetadataId
(
eltSqlMongo
.
get_id
());
//
neo4jETLSql.setMetadataId(eltSqlMongo.get_id());
neo4jETLSql
.
setName
(
neo4jETLJob
.
getName
());
//
neo4jETLSql.setName(neo4jETLJob.getName());
neo4jETLSql
.
setCnName
(
neo4jETLJob
.
getCnName
());
//
neo4jETLSql.setCnName(neo4jETLJob.getCnName());
neo4jETLSqlArrayList
.
add
(
neo4jETLSql
);
//
neo4jETLSqlArrayList.add(neo4jETLSql);
//
CompositionRelation
compositionRelation
=
new
CompositionRelation
();
//
CompositionRelation compositionRelation = new CompositionRelation();
compositionRelation
.
setStart
(
neo4jETLScript
);
//
compositionRelation.setStart(neo4jETLScript);
compositionRelation
.
setEnd
(
neo4jETLSql
);
//
compositionRelation.setEnd(neo4jETLSql);
compositionRelation
.
setName
(
"Script--sql"
);
//
compositionRelation.setName("Script--sql");
compositionRelationList
.
add
(
compositionRelation
);
//
compositionRelationList.add(compositionRelation);
//
etlSqlCount
++;
//
etlSqlCount++;
//
}
//
}
//
if
(
etlSqlCount
%
200
==
0
){
//
if(etlSqlCount%200==0){
neo4jETLSqlRepository
.
saveAll
(
neo4jETLSqlArrayList
);
//
neo4jETLSqlRepository.saveAll(neo4jETLSqlArrayList);
neo4jETLSqlArrayList
.
clear
();
//
neo4jETLSqlArrayList.clear();
}
//
}
//
}
//
}
}
}
if
(
neo4jETLScriptList
!=
null
&&
neo4jETLScriptList
.
size
()!=
0
){
if
(
neo4jETLScriptList
!=
null
&&
neo4jETLScriptList
.
size
()!=
0
){
...
@@ -1503,32 +1503,32 @@ public class MetadataServiceImpl implements IMetadataService {
...
@@ -1503,32 +1503,32 @@ public class MetadataServiceImpl implements IMetadataService {
compositionRelationList
.
add
(
schem2Table
);
compositionRelationList
.
add
(
schem2Table
);
tableCount
++;
tableCount
++;
List
<
MongoData
>
columnMongoDataList
=
mongoDbServiceImpl
.
findDataByparentId
(
metadataId
,
catalogName
);
//
List<MongoData> columnMongoDataList = mongoDbServiceImpl.findDataByparentId(metadataId, catalogName);
for
(
MongoData
columnMongoData:
columnMongoDataList
){
//
for(MongoData columnMongoData:columnMongoDataList){
String
columnId
=
columnMongoData
.
get_id
();
//
String columnId = columnMongoData.get_id();
Neo4jColumn
neo4jColumnList1
=
null
;
//neo4jColumnRepository.findNeo4jColumnByMetadataId(columnId);
//
Neo4jColumn neo4jColumnList1 = null;//neo4jColumnRepository.findNeo4jColumnByMetadataId(columnId);
//
if
(
neo4jColumnList1
==
null
){
//
if(neo4jColumnList1==null){
Neo4jColumn
neo4jColumn
=
new
Neo4jColumn
();
//
Neo4jColumn neo4jColumn = new Neo4jColumn();
neo4jColumn
.
setMetadataId
(
columnId
);
//
neo4jColumn.setMetadataId(columnId);
neo4jColumn
.
setName
(
columnMongoData
.
getName
());
//
neo4jColumn.setName(columnMongoData.getName());
neo4jColumn
.
setCnName
(
columnMongoData
.
getCnName
());
//
neo4jColumn.setCnName(columnMongoData.getCnName());
neo4jColumnList
.
add
(
neo4jColumn
);
//
neo4jColumnList.add(neo4jColumn);
//
CompositionRelation
table2Column
=
new
CompositionRelation
();
//
CompositionRelation table2Column = new CompositionRelation();
table2Column
.
setStart
(
neo4jTable
);
//
table2Column.setStart(neo4jTable);
table2Column
.
setEnd
(
neo4jColumn
);
//
table2Column.setEnd(neo4jColumn);
table2Column
.
setName
(
"Table--Column"
);
//
table2Column.setName("Table--Column");
compositionRelationList
.
add
(
table2Column
);
//
compositionRelationList.add(table2Column);
//
columnCount
++;
//
columnCount++;
}
//
}
if
(
columnCount
%
100
==
0
){
//
if(columnCount %100==0){
logger
.
info
(
"同步了:"
+
columnCount
+
"个字段。"
);
//
logger.info("同步了:"+columnCount+"个字段。");
neo4jColumnRepository
.
saveAll
(
neo4jColumnList
);
//
neo4jColumnRepository.saveAll(neo4jColumnList);
neo4jColumnList
.
clear
();
//
neo4jColumnList.clear();
}
//
}
}
//
}
}
}
}
else
if
(
metadataId
.
startsWith
(
"View="
)){
}
else
if
(
metadataId
.
startsWith
(
"View="
)){
if
(
viewCount
%
100
==
0
){
if
(
viewCount
%
100
==
0
){
...
@@ -1669,7 +1669,7 @@ public class MetadataServiceImpl implements IMetadataService {
...
@@ -1669,7 +1669,7 @@ public class MetadataServiceImpl implements IMetadataService {
String
targetId
=
relation
.
getString
(
"target"
);
// relationMongo.getTarget();
String
targetId
=
relation
.
getString
(
"target"
);
// relationMongo.getTarget();
//本身的字段级关系也要同步
//本身的字段级关系也要同步
edgeIdMap
.
put
(
sourceId
+
"_"
+
targetId
,
""
);
//
edgeIdMap.put(sourceId+"_"+targetId,"");
Map
<
String
,
Object
>
sourceData
=
metadataRepoRemoteService
.
getMetadata
(
sourceId
);
Map
<
String
,
Object
>
sourceData
=
metadataRepoRemoteService
.
getMetadata
(
sourceId
);
Map
<
String
,
Object
>
targetData
=
metadataRepoRemoteService
.
getMetadata
(
targetId
);
Map
<
String
,
Object
>
targetData
=
metadataRepoRemoteService
.
getMetadata
(
targetId
);
...
...
src/main/resources/application-test.yml
View file @
8e7c2769
...
@@ -30,7 +30,7 @@ spring:
...
@@ -30,7 +30,7 @@ spring:
eureka
:
eureka
:
client
:
client
:
registerWithEureka
:
tru
e
registerWithEureka
:
fals
e
region
:
default
region
:
default
registryFetchIntervalSeconds
:
5
registryFetchIntervalSeconds
:
5
serviceUrl
:
serviceUrl
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment