Henry-Richard7
Henry-Richard7

Reputation: 1

Create external table using Parquet files (partitioned) in Oracle ADW

I am trying to create an external table using partitioned parquet files stored in Oracle Object Storage. These parquet files are written using Pyspark.

The folder structure is below:

enter image description here

Getting error like this:

ORA-20000: ORA-00904: : invalid identifier
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD$PDBCS_240301_0", line 2034
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD$PDBCS_240301_0", line 8662
ORA-06512: at line 2
Error at Line: 7 Column: 0

The query I tried:

BEGIN
  DBMS_CLOUD.CREATE_EXTERNAL_PART_TABLE(
  TABLE_NAME => 'spotify_daily',
  CREDENTIAL_NAME => '<THE_CREDS_NAME>',
  FILE_URI_LIST => 'https://objectstorage.<REGION_NAME>.oraclecloud.com/n/<NAMESPACE>/b/<BUCKET_NAME>/o/spotify_daily/*.parquet',
  FORMAT => '{"type":"parquet", "schema": "first","partition_columns":[{"name":"year","type":"number"},{"name":"month","type":"varchar2(100)"},{"name":"date","type":"varchar2(100)"}]}');
END;

I followed the below guide from Oracle: https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/query-external-partition-hive.html#GUID-E2BE9922-4AAC-43C1-B619-8817515646E4

I am a beginner to Oracle Autonomous Data Warehouse.

Upvotes: 0

Views: 220

Answers (0)

Related Questions