FAILED: SemanticException [Error 10072]: Database does not exist: case_db

文章讲述了如何将Hive的配置文件hive-site.xml链接到Sqoop的配置目录下,或者直接复制到该目录,以便Sqoop能够正确读取Hive的设置,进行数据交互。

1、

 红色框内是hive数据库名

2、

ln -s /opt/hive/conf/hive-site.xml  /opt/sqoop/conf/

或者:cp /opt/hive/conf/hive-site.xml  /opt/sqoop/

Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7ce40831] was not registered for synchronization because synchronization is not active JDBC Connection [com.mysql.jdbc.JDBC4Connection@1fe8f4c4] will not be managed by Spring ==> Preparing: select date_format(cur_time, '%Y%m%d%H%i') as time, sum(trade_amount) as count from stock_market_index_info as smi where cur_time between '2022-01-03 09:30:00' and '2022-01-03 14:40:00' and market_code ( ? , ? ) group by cur_time order by cur_time asc ; ==> Parameters: sh000001(String), sz399001(String) Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7ce40831] 2025-06-22 16:26:42.873 ERROR 14836 --- [nio-8091-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION stock_db.market_code does not exist ### The error may exist in file [E:\workspace\ProjectCodings\stock_parent\stock_common\target\classes\mapper\StockMarketIndexInfoMapper.xml] ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: select date_format(cur_time, '%Y%m%d%H%i') as time, sum(trade_amount) as count from stock_market_index_info as smi where cur_time between '2022-01-03 09:30:00' and '2022-01-03 14:40:00' and market_code ( ? , ? ) group by cur_time order by cur_time asc ; ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION stock_db.market_code does not exist ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION stock_db.market_code does not exist] with root cause
最新发布
06-23
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值