How Do I Specify an OBS Path When Creating an OBS Table?
Scenario
When creating an OBS table, you must specify a table path in the database.
The path format is as follows: obs://xxx/database name/table name.
Correct Example
CREATE TABLE `di_seller_task_activity_30d` (`user_id` STRING COMMENT' user ID...) SORTED as parquetLOCATION 'obs://akc-bigdata/akdc.db/di_seller_task_activity_30d'
Analysis of a Typical Error Example
CREATE TABLE `di_seller_task_activity_30d` (`user_id` STRING COMMENT' user ID...) SORTED as parquetLOCATION 'obs://akc-bigdata/akdc.db'
Note
If the specified path is akdc.db, data in this path will be cleared when the insert overwrite statement is executed.
Parent topic: SQL Job Development
- Scenario
- Correct Example
- Analysis of a Typical Error Example