Note
This view is available starting with V4.2.0.
Purpose
This view displays the list of files for external tables that the current user has access to.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TABLE_NAME | varchar(256) | NO | The name of the external table. |
| TABLE_SCHEMA | varchar(128) | NO | The name of the database to which the external table belongs. |
| PARTITION_NAME | varchar(2) | NO | The name of the partition of the external table. |
| FILE_URL | varbinary(16384) | NO | The URL of the external table file. |
| FILE_SIZE | bigint(20) | NO | The size of the file, in bytes. |
Sample query
Query the list of files for external tables that the current user has access to.
obclient [oceanbase]> SELECT * FROM oceanbase.ALL_OB_EXTERNAL_TABLE_FILES;
The query result is as follows:
+------------+--------------+----------------+------------------------------+-----------+
| TABLE_NAME | TABLE_SCHEMA | PARTITION_NAME | FILE_URL | FILE_SIZE |
+------------+--------------+----------------+------------------------------+-----------+
| ext_t3 | test | P0 | xx.xx.xx.208:2882%data.csv | 34 |
| ext_t2 | test | P0 | xx.xx.xx.208:2882%data.csv | 34 |
| ext_t1 | test | P0 | xx.xx.xx.208:2882%data.csv | 34 |
+------------+--------------+----------------+------------------------------+-----------+
3 rows in set
References
Query the list of files for external tables created in all tenants: CDB_OB_EXTERNAL_TABLE_FILES
Query the list of files for external tables created in the current tenant: DBA_OB_EXTERNAL_TABLE_FILES
For more information about external tables and how to operate on them, see Manage external files.