I have an script that uses IMPDP over a database link (no expdp used) to import some data from our PROD environment to a DEV environment.
Some tables are rather gigantic and partitioned, and we want just a sample of it like the last 30 days of data. I noticed that even specifying a QUERY parameter, impdp still slowly goes thru every partition displaying several 0 rows imported and taking time to get tot he desired partitions.
Is it possible to specify the partition names inside the INCLUDE parameter (this is where i am listing desired tables, its a subquery of table names on the PROD environment)?
I know there’s a TABLES parameter that is usually used for this, but it can be dinamically populated like the INCLUDE one can, from a query?
I imagine i can generate a string in the script prior to calling impdp, but would prefeer a native solutuion using impdp itself.
Bellow is a sample command structure i am using, its not filtered as it is.
impdp user/"pwd"@bd directorySOMEDIR NETWORK_LINK=somelink schemas=someschema logfile=somefile.log remap_tablespace=TBS_BLA:TBS_BLE CONTENT=DATA_ONLY PARALLEL=40 include=TABLE:\"IN \(\'MY_TABLE\' \)\"
If I use TABLES=MY_TABLE:SYS_P01 it works, but I would like to dynamically define this as everyday a new partition is created.
Would be nice if I could specify partition names in the INCLUDE parameter, but not sure its suported.