We've recently been asked to provide a subset of some of our table for transfer to another system - the subsetting to be based on a subquery of some other tables. Difficult? - not with datapump - its a piece of cake - just make sure you use a parameter file - messing about with escape characters on the command line will drive you nuts. The example below takes a whole schema but a subset from just two of the tables
expdp user/password parfile=test.par
Where test.par contains:
SCHEMAS=RISK_CALCULATOR_R2 QUERY=RISK_CALCULATOR_R2.SCENARIO_PROXY_CURVE:" where SCENARIO_BUCKET_CONTAINER_NAME in (select bucket_container_name from RISK_CALCULATOR_R2.SCENARIO where market_unit_name in ('CRN','CRG','CRU_CF'))"
QUERY=RISK_CALCULATOR_R2.SCENARIO_FX_CURVE:" where SCENARIO_BUCKET_CONTAINER_NAME in (select bucket_container_name from RISK_CALCULATOR_R2.SCENARIO where market_unit_name in ('CRN','CRG','CRU_CF'))"
Comments
Post a Comment