DBMS_CLOUD Package File URI Formats
Describes the format of the source file URIs in operations with DBMS_CLOUD
. The format depends on the object storage service you are using.
Oracle Cloud Infrastructure Object Storage URI Format
If your source files reside on the Oracle Cloud Infrastructure Object Storage you can use Oracle Cloud Infrastructure native URIs or the Swift URIs. The format for files can be either:
https://objectstorage.region.oraclecloud.com/n/object_storage_namespace/b/bucket/o/filename
https://swiftobjectstorage.region.oraclecloud.com/v1/object_storage_namespace/bucket/filename
Where: object_storage_namespace is a unique and uneditable system-generated string assigned during account creation and applies to all regions. For some older tenancies, the namespace string might be the tenancy name in all lower-case letters.
For example, the Native URI for the file channels.txt
in the
atpc_user
bucket in the atpc
object storage name in the Phoenix
data center:
https://objectstorage.us-phoenix-1.oraclecloud.com/n/idy4veans2xl/b/atpc_user/o/channels.txt
For example, the Swift URI for the file channels.txt
in the
atpc_user
bucket in the atpc
object storage name in the Phoenix
data center:
https://swiftobjectstorage.us-phoenix-1.oraclecloud.com/v1/idy4veans2xl/atpc_user/channels.txt
You can find the URI from the Oracle Cloud Infrastructure Object Storage "Object Details" in the right hand side ellipsis menu in the Object Store:
- From the Oracle Cloud Infrastructure left navigation list click Object Storage → Object Storage.
- From the Name column, select a bucket.
- In the Objects area, click View Object Details.
- On the Object Details page, the URL Path (URI) field shows the URI to access the object.
Note:
The source files need to be stored in an Object Storage tier bucket. Autonomous Transaction Processing does not support buckets in the Archive Storage tier. See Overview of Object Storage for more information.
Oracle Cloud Infrastructure Object Storage URI Format Using Pre-Authenticated Request URL
If your source files reside on the Oracle Cloud Infrastructure Object Storage you can use Oracle Cloud Infrastructure pre-authenticated URIs. When you create a pre-authenticated request, a unique URL is generated. You can then provide the unique URL to users in your organization, partners, or third parties to access the Object Storage resource target identified in the pre-authenticated request.
Note:
Carefully assess the business requirement for and the security ramifications of pre‑authenticated access. When you create the pre-authenticated request URL, note the Expiration and the Access Type to make sure they are appropriate for your use.A pre-authenticated request URL gives anyone who has the URL access to the targets identified in the request for as long as the request is active. In addition to considering the operational needs of pre-authenticated access, it is equally important to manage its distribution.
The format for pre-authenticated request URLs is:
https://objectstorage.region.oraclecloud.com/p/encrypted_string/n/object_storage_namespace/b/bucket/o/filename
For example, a sample pre-authenticated URI for the file
channels.txt
in the atpc_user
bucket in the atpc
object storage name in the
Phoenix
data center:
https://objectstorage.us-phoenix-1.oraclecloud.com/p/2xN-uDtWJNsiD910UCYGue5/n/atpc/b/atpc_user/o/channels.txt
You can use a pre-authenticated URL in any DBMS_CLOUD
procedure that takes a URL to access files in Oracle Cloud
Infrastructure object store, without the need to create a credential. You need to either specify
the credential_name
parameter as NULL
or not
supply a credential_name
parameter.
For example:
BEGIN
DBMS_CLOUD.COPY_DATA
(
table_name =>'CHANNELS',
file_uri_list =>'https://objectstorage.us-phoenix-1.oraclecloud.com/p/2xN-uDtWJNsiD910UCYGue5/n/atpc/b/atpc_user/o/channels.txt',
format => json_object('delimiter' value ',') );
END;
/
Note:
A list of mixed URLs is valid. If the URL list contains both pre-authenticated URLs and URLs that require authentication,DBMS_CLOUD
uses the specified
credential_name
to access the URLs that require authentication
and for the pre-authenticated URLs the specified credential_name
is ignored.
See Using Pre-Authenticated Requests for more information.
URI Format Using Public URL
If your source files reside on an Object Store that provides public
URLs, you can use public URLs with DBMS_CLOUD
procedures. Public
means the Object Storage service supports anonymous, unauthenticated access to the
Object Store files. See your Cloud Object Storage service for details on how to make
an object public in a supported Object Store.
Note:
Carefully assess the business requirement for and the security ramifications of using public URLs. When you use public URLs, due to the file content not being authenticated, make sure this is appropriate for your use.You can use a public URL in any DBMS_CLOUD
procedure
that takes a URL to access files in your object store, without the need to create a
credential. You need to either specify the credential_name
parameter as NULL
or not supply a credential_name
parameter.
For example the following uses DBMS_CLOUD.COPY_DATA
without a
credential_name
:
BEGIN
DBMS_CLOUD.COPY_DATA
(
table_name =>'CHANNELS',
file_uri_list =>'https://objectstorage.us-ashburn-1.oraclecloud.com/n/compartment1/b/atpc/o/chan_v3.dat',
format => json_object('delimiter' value ',') );
END;
/
Note:
A list of mixed URLs is valid. If the URL list contains both public URLs and URLs that require authentication,DBMS_CLOUD
uses the specified
credential_name
to access the URLs that require authentication
and for the public URLs the specified credential_name
is
ignored.
See Public Buckets for information on using Oracle Cloud Infrastructure public buckets.
Oracle Cloud Infrastructure Object Storage Classic URI Format
If your source files reside in Oracle Cloud Infrastructure Object Storage Classic, see the REST page for a description of the URI format for accessing your files: About REST URLs for Oracle Cloud Infrastructure Object Storage Classic Resources.
Amazon S3 URI Format
If your source files reside in Amazon S3, see the following for a description of the URI format for accessing your files: Accessing a Bucket.
For example the following refers to the file channels.txt
in the atpc
bucket in the us-west-2
region.
https://s3-us-west-2.amazonaws.com/atpc/channels.txt
Azure Blob Storage URI Format
If your source files reside in Azure Blob Storage, see the following for a description of the URI format for accessing your files: Resource URI Syntax.
channels.txt
in the atpc
container in the storage account atpc_user
:https://atpc_user.blob.core.windows.net/atpc/channels.txt