?????????? 
     
????????flinksql????????A_now????????????????????????????:????A????????????A_now??????A??????????????
 
???????????? 
//sql ???????????????????? 

StatementSet stmtSet = tenv.createStatementSet () ; 
stmtSet.addInsertSql ( insertSqlMongoDB ) ; 
stmtSet.addInsertSql ( insertSql ) ; 
stmtSet.execute () ; 
//???????????????? 
/**  ?????????????? */ 
???? { 
    MongoUtil2 ???? = MongoUtil2?? ???????? () ; 
MongoCollection < Document &gt; oldData = instance.getCollection ( db, 
"t_up_tag_data_" +mongoKey ) ; 
    MongoCollection<Document&gt; oldmetadata = instance.getCollection(db, 
"t_up_tag_metadata_"+mongoKey);

    ???? ?? ????????= null ??{ 
        oldData.drop () ; 
    } 
    ???? ?? ??????????= null ??{ 
        oldmetadata.drop () ; 
    } 
    MongoCollection < ???? &gt; data = instance.getCollection ( db, 
"t_up_tag_data_" +mongoKey+ "_now" ) ; 
MongoCollection < Document &gt; metadata = instance.getCollection ( db, 
"t_up_tag_metadata_" +mongoKey+ "_now" ) ; 

MongoCollection < Document &gt; newData = instance.getCollection ( db, 
"t_up_tag_data_" +mongoKey ) ; 
MongoCollection < ???? &gt; newmetadata = instance.getCollection ( db, 
"t_up_tag_metadata_" +mongoKey ) ; 
data.renameCollection ( newData.getNamespace ()) ; 
metadata.renameCollection ( newmetadata.getNamespace ()) ; 
    ???? ?? ??????= ?? ??{ 
        ????.drop () ; 
    } 
    ???? ?? ????????= null ??{ 
        ??????.drop () ; 
    } 
} ???? ?? ???? e ??{ 
???? .info ( e.getMessage ()) ; 
} 
?????????????????????????????????????????????????????????????????????? 

???? 


&nbsp;
&nbsp;

回复