??????????
????????flinksql????????A_now????????????????????????????:????A????????????A_now??????A??????????????
????????????
//sql ????????????????????
StatementSet stmtSet = tenv.createStatementSet () ;
stmtSet.addInsertSql ( insertSqlMongoDB ) ;
stmtSet.addInsertSql ( insertSql ) ;
stmtSet.execute () ;
//????????????????
/** ?????????????? */
???? {
MongoUtil2 ???? = MongoUtil2?? ???????? () ;
MongoCollection < Document > oldData = instance.getCollection ( db,
"t_up_tag_data_" +mongoKey ) ;
MongoCollection<Document> oldmetadata = instance.getCollection(db,
"t_up_tag_metadata_"+mongoKey);
???? ?? ????????= null ??{
oldData.drop () ;
}
???? ?? ??????????= null ??{
oldmetadata.drop () ;
}
MongoCollection < ???? > data = instance.getCollection ( db,
"t_up_tag_data_" +mongoKey+ "_now" ) ;
MongoCollection < Document > metadata = instance.getCollection ( db,
"t_up_tag_metadata_" +mongoKey+ "_now" ) ;
MongoCollection < Document > newData = instance.getCollection ( db,
"t_up_tag_data_" +mongoKey ) ;
MongoCollection < ???? > newmetadata = instance.getCollection ( db,
"t_up_tag_metadata_" +mongoKey ) ;
data.renameCollection ( newData.getNamespace ()) ;
metadata.renameCollection ( newmetadata.getNamespace ()) ;
???? ?? ??????= ?? ??{
????.drop () ;
}
???? ?? ????????= null ??{
??????.drop () ;
}
} ???? ?? ???? e ??{
???? .info ( e.getMessage ()) ;
}
??????????????????????????????????????????????????????????????????????
????