Help Center> Data Lake Insight> FAQs> Problems Related to SQL Jobs> Job Development> How Do I Specify an OBS Path When Creating an OBS Table?
Updated on 2023-05-19 GMT+08:00

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.

For details about the syntax for creating OBS tables, see Creating an OBS Table Using the DataSource Syntax.

Correct Example

CREATE TABLE `di_seller_task_activity_30d` (`user_id` STRING COMMENT' user ID...) SORTED as parquet
LOCATION 'obs://akc-bigdata/akdc.db/di_seller_task_activity_30d'

Incorrect Example

CREATE TABLE `di_seller_task_activity_30d` (`user_id` STRING COMMENT' user ID...) SORTED as parquet
LOCATION 'obs://akc-bigdata/akdc.db'

If the specified path is akdc.db, data in this path will be cleared when the insert overwrite statement is executed.

Job Development FAQs

more