报错

ClickHouse exception, code: 62, host: hadoop102, port: 8123; Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 183 (end of query): . Expected one of: storage definition, ENGINE, AS (version 21.1.9.41 (official build))

报错场景

使用spark写入clickhouse

df.write.format("jdbc")
.option("driver","ru.yandex.clickhouse.ClickHouseDriver")
.option("url","jdbc:clickhouse://xxx:8123/xxx")
.option("user","default")
.option("password","xxx")
.option("dbtable","xxxx")
.mode(SaveMode.Overwrite)
.save()

解决方案

加入配置:createTableOptions = ENGINE=Log()

df.write.format("jdbc")
.option("driver","ru.yandex.clickhouse.ClickHouseDriver")
.option("url","jdbc:clickhouse://xxx:8123/xxxx")
.option("user","default")
.option("password","xxx")
.option("dbtable","xxx")
.option("createTableOptions","ENGINE=Log()")
.mode(SaveMode.Overwrite)
.save()

ClickHouse exception, code: 62, host: hadoop102, port: 8123; Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 183 (end of query):的更多相关文章

  1. The connection to the server localhost:8080 was refused - did you specify the right host or port?

    The connection to the server localhost:8080 was refused - did you specify the right host or port? 解决 ...

  2. hbase_异常_05_End of File Exception between local host is: "rayner/127.0.1.1"; destination host is: "localhost":9000;

    一.异常信息 java.io.EOFException: End of File Exception between local host is: "ubuntu/127.0.1.1&quo ...

  3. 【Kubernetes】The connection to the server <master>:6443 was refused - did you specify the right host or port?

    不知道怎么用着用着,使用kubectl 时报错,错误如下: root@R740--:~# kubectl get pod The connection to the server 107.105.13 ...

  4. Could not connect to SMTP host: localhost, port: 25;

    1.错误描写叙述 DEBUG: setDebug: JavaMail version 1.3.3 DEBUG: getProvider() returning javax.mail.Provider[ ...

  5. K8s - 解决主机重启后kubelet无法自动启动问题 错误:The connection to the server 192.168.60.128:6443 was refused - did you specify the right host or port?

    1,问题描述 (1)在安装配置好 Kubernetes 后,正常情况下服务器关机重启,kubelet 也会自动启动的.但最近配置的一台服务器重启后,输入命令 kubectl get nodes 查看节 ...

  6. 关于python3.6上传文件时报错:HTTPSConnectionPool(host='***.org', port=443): Max retries exceeded with url: /post (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAIL解决办法

    第一个报错: 最近在练习post请求中上传文件时遇到了一个奇葩事情,两台电脑上写了一模一样的代码,一个运行正常,另一个一片红. 最后了解了一下原因以及解决办法.先记录下关键代码: files = {& ...

  7. mac connect to host localhost port 22: Connection refused

    在Mac OS X 10.10.5学习hadoop的过程中,输入命令ssh localhost得到 ssh: connect to host localhost port : Connection r ...

  8. kubectl version报did you specify the right host or port

    现象: [root@localhost shell]# kubectl version Client Version: version.Info{Major:", GitVersion:&q ...

  9. Ubuntu下 ssh : connect to host localhost port 22:Connection refused

    Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused 造成这个错误的原因 ...

  10. JDBC 连Sql Server 接数据库--The TCP/IP connection to the host localhost, port 1433 has failed

    原文:https://blog.csdn.net/qq_39241986/article/details/80848855 这样的错误,你有遇到过吗? The TCP/IP connection to ...

随机推荐

  1. AcWing第78场周赛

    今天想起来了,就补一下吧~ 第一题 商品分类 货架中摆放着 n 件商品,每件商品都有两个属性:名称和产地. 当且仅当两件商品的名称和产地都相同时,两件商品才视为同一种商品. 请你统计,货架中一共有多少 ...

  2. 【每日一题】【排序sort重载】【工具类】2021年12月23日-31. 下一个排列

    实现获取 下一个排列 的函数,算法需要将给定数字序列重新排列成字典序中下一个更大的排列(即,组合出下一个更大的整数). 如果不存在下一个更大的排列,则将数字重新排列成最小的排列(即升序排列). 必须 ...

  3. 【离线数仓】Day02-用户行为数据仓库:分层介绍、环境搭建(hive、tez)、LZO压缩、建表查询导入加索引、编写脚本

    一.数仓分层概念 1.为什么要分层 ODS:原始数据层 DWD层:明细数据层 DWS:服务数据层 ADS:数据应用层 2.数仓分层 3.数据集市与数据仓库概念 4.数仓命名规范 ODS层命名为odsD ...

  4. Node.js躬行记(25)——Web自动化测试

    网页在提测流转给 QA 后,如何能帮他们更有效而准确的完成测试,是我一直在思考的一个问题. QA 他们会对网页编写测试用例,在提测之前会让我们将优先级最高的用例跑通,这在一定程度上能够避免频繁的返工, ...

  5. 使用selenium爬取淘宝

    一.出现的问题 前段时间在使用selenium对淘宝进行模拟登陆的时候,输入完正好和密码,然后验证码无论如何都不能划过去.找了好久,原来是因为selenium在浏览器中运        行的时候会暴露 ...

  6. Codeforces Round #838 (Div. 2) D. GCD Queries

    题意 有个长度为n的排列p,[0,1,2,...n-1],你可以进行至多2*n次询问,每次询问两个i,j,返回gcd(pi,pj),让你在规定时间内猜出0在哪两个位置之一 思路 这是一道交互题,询问的 ...

  7. GitHub - 电脑经常无法访问GitHub页面

    来自这里 1.打开Dns检测|Dns查询 - 站长工具2.在检测输入栏中输入http://github.com官网3.把检测列表里的TTL值最小的IP输入到host里,并对应写上github官网域名. ...

  8. JUC并发编程详解(通俗易懂)

    一.JUC简介 在Java5.0提供了java.util.concurrent包,简称JUC,即Java并发编程工具包.JUC更好的支持高并发任务. 具体的有以下三个包: java.util.conc ...

  9. 第k个数【模板题】

    第k个数 给定一个长度为 \(n\) 的整数数列,以及一个整数 \(k\),请用快速选择算法求出数列从小到大排序后的第 \(k\) 个数. 输入格式 第一行包含两个整数 \(n\) 和 \(k\). ...

  10. odoo资料

    https://www.cnblogs.com/smarttony/category/1484288.html