In a bash shell or script, you want to exclude a table from you oracle import using
EXCLUDE=TABLE:"IN ('MY_TABLE')"
But you get the following error
ORA-39001: invalid argument value
ORA-39071: Value for EXCLUDE is badly formed.
ORA-00920: invalid relational operator
Because you are in a shell, the quotes needs to be escaped:
impdp USER/****@DB1 directory=import_dir dumpfile=dump.dpdmp exclude=TABLE:\"NOT IN \(\'MY_TABLE\'\)\"
If you want to run this command for a python script, you just have to use a raw-string:
command = r''' impdp USER/****@DB1 directory=import_dir dumpfile=dump.dpdmp exclude=TABLE:\"NOT IN \(\'MY_TABLE\'\)\" '''