Note:
Import the collection data using the
option
CONTENT=DATA_ONLY
.
Specify the collection you want to import using the
INCLUDE
parameter. This is useful if a data file set contains the
entire schema and the SODA collection you need to import is included as part of the dump
file set.
Use REMAP_DATA
to change any of the columns during
import. This example shows using REMAP_DATA
to change the version
column method from SHA256
to UUID
.
impdp admin/password@ADS1_high \
directory=data_pump_dir \
credential=def_cred_name \
dumpfile= https://objectstorage.us-ashburn-1.oraclecloud.com/n/namespace-string/b/bucketname/o/export%u.dmp \
encryption_pwd_prompt=yes \
SCHEMA=my_schema \
INCLUDE=TABLE:\"= \'MyCollectionName\'\" \
CONTENT=DATA_ONLY \
REMAP_DATA=my_schema.'\"MyCollectionName\"'.VERSION:SYS.DBMS_SODA.TO_UUID
Note:
If during the export with
expdp
you used the
encryption_pwd_prompt=yes
parameter then use
encryption_pwd_prompt=yes
and input the same
password at the
impdp
prompt that you specified during the
export.
In this example, namespace-string
is the Oracle
Cloud Infrastructure object storage namespace and
bucketname
is the bucket
name. See Understanding
Object Storage Namespaces for more
information.
In Oracle Data Pump version 19.6 and later, the credential argument
authenticates Oracle Data Pump to the Cloud Object Storage service you are using for
your source files. The credential
parameter cannot be an Azure service
principal, Amazon Resource Name (ARN), or a Google service account. See Accessing Cloud Resources by Configuring Policies and
Roles for more information on resource principal based authentication.
The dumpfile argument is a comma delimited list of URLs for your Data Pump
files.
For the best import performance use the HIGH
database
service for your import connection and set the parallel
parameter
to one quarter the number of ECPUs (.25 x ECPU
count). If you are using OCPU compute model, set
the parallel parameter to the number of OCPUs (1 x OCPU
count).
For information on which database service name to connect to run Data Pump
Import, see Manage Concurrency and Priorities on Autonomous JSON Database.
For the dump file URL format for different Cloud Object Storage services,
see DBMS_CLOUD Package File URI Formats.
Note:
To perform a full import or to import
objects that are owned by other users, you need the
DATAPUMP_CLOUD_IMP
role.
For information on disallowed objects in Autonomous JSON Database, see SQL Commands.
In this import example, the specification for the
REMAP_DATA
parameter uses the function
DBMS_SODA.TO_UUID
to generate UUID values. By default, for on-premise
databases, the version column of a SODA collection is computed using SHA-256 hash of the
document's content. On Autonomous Database the
version column uses UUID generated values, which are independent of the document's
content.
In this example the REMAP_DATA
parameter uses the
DBMS_SODA.TO_UUID
function to replace the source collection version
type with UUID versioning. If in the export dump file set that you are importing the
versionColumn.method
is already set to UUID, then the
REMAP_DATA
for this field is not required.
For detailed information on Oracle Data Pump Import parameters see Oracle Database Utilities.