Creating a Table and Associating It with Oracle
Function
This statement is used to create a table and associate it with an existing Oracle table.
Prerequisites
Syntax
1 2 3 4 5 6 7 8 9 |
CREATE TABLE [IF NOT EXISTS] TABLE_NAME USING ORACLE OPTIONS ( 'url'='xx', 'driver'='DRIVER_NAME', 'dbtable'='db_in_oracle.table_in_oracle', 'user' = 'xxx', 'password' = 'xxx', 'resource' = 'obs://rest-authinfo/tools/oracle/driver/ojdbc6.jar' ); |
Keywords
Parameter |
Description |
---|---|
url |
URL of the Oracle database. The URL can be in either of the following format:
|
driver |
Oracle driver class name: oracle.jdbc.driver.OracleDriver |
dbtable |
Name of the table associated with the Oracle database or Username.Table name, for example, public.table_name. |
user |
Oracle username. |
password |
Oracle password. |
resource |
OBS path of the Oracle driver package. Example: obs://rest-authinfo/tools/oracle/driver/ojdbc6.jar If the driver JAR file defined in this parameter is updated, you need to restart the queue for the update to take effect. |
Example
Creating an Oracle datasource table
1 2 3 4 5 6 7 8 9 |
CREATE TABLE IF NOT EXISTS oracleTest USING ORACLE OPTIONS ( 'url'='jdbc:oracle:thin:@//192.168.168.40:1521/helowin', 'driver'='oracle.jdbc.driver.OracleDriver', 'dbtable'='test.Student', 'user' = 'test', 'password' = 'test', 'resource' = 'obs://rest-authinfo/tools/oracle/driver/ojdbc6.jar' ); |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot