Revert "Revert "dont strip  datasource metadata,minor code polishing""

This reverts commit 12b403b01db88e8acd3d448efb177ab14910870b.
Revert "Revert "modify new data scope""

This reverts commit 73becffb889b3f06391ab1b2a9ab23a9c524a0ed.