ORA-39142: incompatible version number 5.1 in dump file

The Problem

Trying to export schema/tables from higher Database version 12.2.0.1.0 and import to version 12.1.0.1.0, causing following error message.

ERROR:
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file “xxx.dmp”

The Solution

Please set parameter Version=12.1 in export command and import the data without issue.

Source Database(12.2.0.1):

$ expdp scott/tiger@PRIM directory=DATAPUMP tables=scott.testtb Version=12.1 dumpfile=Exp_Scott_test.dmp logfile=Exp_Scott_test.log

Target Database(12.1.0.1):

$ impdp scott/tiger@TEST directory=DATAPUMP tables=scott.testtb dumpfile=Exp_Scott_test.dmp logfile=Imp_Scott.log