0

I'm trying to do my first CSV export into an existing AWS S3 bucket. Calling with type CSV:

call dbms_cloud.export_data(credential_name => 'cred', file_uri_list => 'https://s3.us-east-2.amazonaws.com/bucket/test/object.csv',
format => json_object('type' value 'csv', 'compression' value 'gzip'), query => 'select * from table');

Produces this error:


ERROR at line 1:
ORA-20000: Export operation is only allowed for Oracle Datapump
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 1181
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 3943
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 3962
ORA-06512: at line 1

I'm able to get it to work with type: JSON and with compression disabled. Any idea why CSV doesn't work?

New contributor
AC' is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

2 Answers 2

1

DBMS_CLOUD.EXPORT_DATA cannot export CSV.
Even though the documentation isn't super obvious, Oracle ATP/ADW only supports:

  • type => 'datapump' (the only format allowed for export)

  • type => 'json' (for copying data out, not full export)

When you specify:

type => 'csv'

Oracle treats it as a non-Datapump export, and raises:

ORA-20000: Export operation is only allowed for Oracle Datapump

That’s why JSON works (because JSON export is implemented), but CSV doesn’t.

CSV is only supported by DBMS_CLOUD.COPY_DATA, not EXPORT_DATA

If you want CSV output, you must use:

call dbms_cloud.copy_data( credential_name => 'cred', file_uri_list => 'https://s3.../object.csv', format => json_object('type' value 'csv'), query => 'select * from table' );

Sign up to request clarification or add additional context in comments.

1 Comment

AI generated content is banned on Stack Overflow. Please read the AI Policy for more information.
0

cloud export data is only determined by its new value credentials

this is the json_object

this is basically how gmail works

i did know this long ago, but i dont know if i really like gmail that much

export dump pumps line 1 and calls dbs_cloud

New contributor
prashant G is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.