You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Can DBMS_CLOUD.COPY_DATA function picks up all the columns from the target table automatically?

Received Response
106
Views
2
Comments

Summary:

Hi Team,

I am trying to load a JSON zipped file placed in Object Storage to a ADW DB Table using the DBMS_CLOUD package.

Below is the sample code -

DECLARE

table_name varchar2(200);

uri_list CLOB;

BEGIN

table_name := '****_TEST2';

uri_list:= 'oci://bucket_name/position_topic_dev1.json.gz';

 dbms_cloud.copy_data(  schema_name => 'OLAP',  table_name => table_name,  file_uri_list => uri_list,

  credential_name =>'xx_API',  format => json_object(  'type' VALUE 'json',  'compression' VALUE 'gzip','characterset' VALUE 'UTF8', 'columnpath' VALUE '["$.id"]'

  ) );END;


Now my question is - Can we pass column names dynamically or do we need to use

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!