报错

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. 重学c#系列——委托和匿名函数[二十五]

    前言 简单介绍一下什么是委托. 正文 以前也写过委托,这次算是重新归档,和新的补充吧. https://www.cnblogs.com/aoximin/p/13940125.html 有些人说委托是函 ...

  2. Spring Security(5)

    您好,我是湘王,这是我的博客园,欢迎您来,欢迎您再来- 经常上网的人都应该有这样的体验:很多网站或者APP只需要第一次登录时输入用户名和密码之后,后面很长一段时间内就不需要再次输入密码了.这确实是一个 ...

  3. linux server设置开机自动连接WIFI

    1.前言 之前买了一个工控机,装过几个OS(linux 发行版),但是一直没有细研究过流程,只是停留在能用就不管了,工控机自带无线网卡(和俩个有线网口),所以这篇文章好好介绍如何开机自动连接WIFI( ...

  4. 【Java SE进阶】Day10 缓冲流、转换流、序列化流 、打印流

    一.缓冲流 1.概述 比普通流更强大的IO流,可以增加读写的效率 组成 缓冲输入流:BufferedInputStream.BufferedReader 缓冲输出流:BufferedOutputStr ...

  5. Python异步爬虫(aiohttp版)

    异步协程不太了解的话可以去看我上篇博客:https://www.cnblogs.com/Red-Sun/p/16934843.html PS:本博客是个人笔记分享,不需要扫码加群或必须关注什么的(如果 ...

  6. if-else 的优美写法

    前言‍♂️ 相信大家或多或少都接触过拥有庞大 if else 的项目代码吧,多重嵌套的 if else 在维护的时候真的让人很恼火,有时候一个 bug 排查下来,严重感觉身体被掏空. 本文并未有消灭或 ...

  7. windows 、linux文件互传-FileZilla

    1.下载免安装FileZilla并解压 2.打开.exe文件 3.点击左上角的文件->站点管理 4.点击新站点->进行配置相应的服务地址信息 5.连接上服务后,若需要将windows中的文 ...

  8. Git强制覆盖master

    场景 由于公司的项目中,有一个开发分支(这里假设dev​)是一个严重偏离master​,需要我去强制覆盖master​. 问题 这个场景带来了两个问题: ​master​是受保护不能强推 ​dev​分 ...

  9. anaconda peompt 、labalimg 数据标注

    安装anaconda,进行数据标注 1.安装前准备:下好安装包和所需文件 https://www.aliyundrive.com/s/XyH2JQ5TjCz 提取码: 3c2w 2.运行anacond ...

  10. [python] CairoSVG使用教程

    1 CairoSVG介绍 代码下载地址 CairoSVG是一个将SVG1.1转为PNG,PDF, PS格式的转化.SVG算目前火热的图像文件格式了,它的英文全称为Scalable Vector Gra ...