报错

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. 单例模式实现的多种方式、pickle序列化模块、选课系统需求分析等

    目录 单例模式实现的多种方式 方式一: 方式二: 方式三 方式四 pickle序列化模块 选课系统需求分析 功能提炼 选课系统架构设计 三层架构 选课系统目录搭建 选课系统功能搭建 单例模式实现的多种 ...

  2. (C++) C++ template笔记 -- template关键字及typename关键字

    在调用C++ template函数时,有时候语法会存在歧义. 调用函数时,使用 obj.template func<...>() 形式的语法,避免歧义: 调用类型时,使用嵌入子类型时,使用 ...

  3. 春秋云境 CVE-2022-24663复现

    靶标介绍: 远程代码执行漏洞,任何订阅者都可以利用该漏洞发送带有"短代码"参数设置为 PHP Everywhere 的请求,并在站点上执行任意 PHP 代码.P.S. 存在常见用户 ...

  4. NLP手札1. 金融信息负面及主体判定方案梳理&代码实现

    这个系列会针对NLP比赛,经典问题的解决方案进行梳理并给出代码复现~也算是找个理由把代码从TF搬运到torch.Chapter1是CCF BDC2019的赛题:金融信息负面及主体判定,属于实体关联的情 ...

  5. goioc:一个使用 Go 写的简易的 ioc 框架

    目录 goioc 介绍 快速上手 接口介绍 使用 goioc 如何使用 生命周期 实例化 获取对象 结构体字段依赖注入 Dispose 接口 反射形式使用 goioc 如何使用 接口.结构体.结构体指 ...

  6. day30-JQuery03

    JQuery03 4.jQuery选择器03 4.4表单选择器 应用实例 <!DOCTYPE html> <html lang="en"> <head ...

  7. pycharm 2021.2.1专业版破解

    1.网址:https://gitee.com/pengzhile/ide-eval-resetter 2.点击下载.下载后直接丢进pycharm中. 3.勾选.重启 .查看

  8. ORM增删改查 django请求生命周期图 django路由层及反向解析

    目录 可视化界面之数据增删改查 1.建表 2.数据展示功能 3.数据添加功能 4.数据编辑功能 5.数据删除功能 django请求生命周期流程图 django路由层 1.路由匹配 2.转换器功能 pa ...

  9. 迁移学习(DANN)《Domain-Adversarial Training of Neural Networks》

    论文信息 论文标题:Domain-Adversarial Training of Neural Networks论文作者:Yaroslav Ganin, Evgeniya Ustinova, Hana ...

  10. python进阶之路7 数据类型的内置方法

    内容回顾 while 循环补充说明 1.死循环 2.while循环嵌套和全局标志位 for循环 1.for 变量名 in 待遍历数据 for循环体代码 2.for 也可以与break continue ...