sr2.5.3创建oracle外表问题咨询

【详述】问题详细描述
sr 2.5.3按照文档创建jdbc 外表,oralce外表,报错表不存在。
create external resource oracle_rs
properties (
“type” = “jdbc”,
“user” = “xxx”,
“password” = “xxx”,
“jdbc_uri” = “jdbc:oracle:thin:@xxx:1521/aaa”,
“driver_url” = “https://download.oracle.com/otn-pub/otn_software/jdbc/1815/ojdbc8.jar”,
“driver_class” = “oracle.jdbc.driver.OracleDriver”
);
创建完成后,查询报错表不存在,因为实际没有指定该表所在是数据库,请问下哪里指定?

创建表的时候在properties里面添加database也没有用
ENGINE=jdbc
properties (
“resource” = “oracle_rs”,
“table” = “xxx”,
“database” = “xxx”
);

您这个语句只是创建了jdbc资源 这个资源创建的时候有报错吗 ? 后续查询报错的: 表不存在的 建表语句麻烦发下 我确认下创建是否有问题

create external resource oracle_rs
properties (
“type” = “jdbc”,
“user” = “xxx”,
“password” = “xxx”,
“jdbc_uri” = “jdbc:oracle:thin:@//xxx:1521/sid”,
“driver_url” = “https://download.oracle.com/otn-pub/otn_software/jdbc/1815/ojdbc8.jar”,
“driver_class” = “oracle.jdbc.driver.OracleDriver”
);

建表语句:
create external table ets_auth_org(
id varchar(32) ,
org_name varchar(256) ,
org_code varchar(5) ,
province varchar(8) ,
city varchar(8) ,
address varchar(256) ,
comments varchar(256) ,
create_user varchar(32) ,
create_time DATETIME ,
update_user varchar(32) ,
update_time DATETIME ,
buy_without_credit varchar(2) ,
org_cert_no varchar(128) ,
org_cert_type varchar(2) ,
org_type varchar(1) ,
status char(1) ,
check_user varchar(32) ,
check_time varchar(14) ,
audit_user varchar(32) ,
audit_time varchar(14) ,
org_static_code varchar(100) ,
static_code_organization_type varchar(10) ,
static_code_industry_type varchar(10) ,
static_code_region_code varchar(10) ,
static_code_org_type varchar(10) ,
static_code_org_code varchar(10) ,
static_code_virtual_code varchar(10) ,
static_code_account_attr varchar(10) ,
buy_without_limit decimal(38,10)
)
ENGINE=jdbc
properties (
“resource” = “oracle_rs”,
“table” = “ets_auth_org”
);
都不报错,
查询报错

建表不报错,在oracle数据库中可以查询到表

好的 麻烦您查看下创建的这个资源 截个图

方便加下联系方式吗

可以的 我加下您 麻烦能发下对应时间的be.INFO 日志吗 这个在be.INFO或者是 be.out 里面可能会有更加具体的错误,我拉研发的同学看下

fe的日志:
2023-07-07 09:07:57,551 WARN (starrocks-mysql-nio-pool-6697|23842) [Coordinator.getNext():1545] get next fail, need cancel. status errorCode INTERNAL_ERROR open JDBCScanner failed, error: java.sql.SQLSyntaxErrorException: ORA-00942: 表或视图不存在
[oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494), oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446), oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1052), oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:540), oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:256), oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:610), oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:213), oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:37), oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:724), oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:921), oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1099), oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1754), oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1709), oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:300), com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95), com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java), com.starrocks.jdbcbridge.JDBCScanner.open(JDBCScanner.java:51)], query id: b5aa663d-1c62-11ee-973d-84160cac0e32
2023-07-07 09:07:57,551 WARN (starrocks-mysql-nio-pool-6697|23842) [Coordinator.updateStatus():1525] one instance report fail throw updateStatus(), need cancel. job id: -1, query id: b5aa663d-1c62-11ee-973d-84160cac0e32, instance id: NaN
2023-07-07 09:07:57,552 INFO (starrocks-mysql-nio-pool-6697|23842) [Coordinator.cancelInternal():1626] unfinished instance: b5aa663d-1c62-11ee-973d-84160cac0e33
2023-07-07 09:07:57,552 WARN (starrocks-mysql-nio-pool-6697|23842) [Coordinator.getNext():1566] query failed: open JDBCScanner failed, error: java.sql.SQLSyntaxErrorException: ORA-00942: 表或视图不存在
[oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494), oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446), oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1052), oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:540), oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:256), oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:610), oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:213), oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:37), oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:724), oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:921), oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1099), oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1754), oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1709), oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:300), com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95), com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java), com.starrocks.jdbcbridge.JDBCScanner.open(JDBCScanner.java:51)]
2023-07-07 09:07:57,552 INFO (starrocks-mysql-nio-pool-6697|23842) [QeProcessorImpl.unregisterQuery():91] deregister query id b5aa663d-1c62-11ee-973d-84160cac0e32
2023-07-07 09:07:57,552 INFO (starrocks-mysql-nio-pool-6697|23842) [StmtExecutor.execute():529] execute Exception, sql: select * from dm_dcfund_info limit 10, error: open JDBCScanner failed, error: java.sql.SQLSyntaxErrorException: ORA-00942: 表或视图不存在

求大佬解答!!!

数据库名称不是aaa ,aaa是oracle的sid

能看下sqlplus登录查询正常的截图以及tns的配置,还有就是对应用户的权限吗

使用external resource 里面的账户密码,登陆oracle是可以查询数据的,只是需要加下数据库名称。


你试试把“table” = “ets_auth_org”改为schema.table试试

可以了,多谢啦!

请教一下,当时怎么解决的,我也遇到了同样的问题Version: 3.1.14,改为schema.table还是创建失败

image