首页 > 其他分享 >clickhouse导入csv文件

clickhouse导入csv文件

时间:2023-05-26 19:01:42浏览次数:37  
标签:sanxing 1804 APP 导入 2023 Rscreen 1412 csv clickhouse

clickhouse导入csv格式文件内容参考如下:

UlHtlFVg,2023-04-23 02:13:34,APP,Go1KtO,1682187214,2023-04-23 02:13:34,trunck,APP_START,,,,PURvq4,list2,78IaN6f9,sanxing,x5,sanxing,sanxing,5G,移动,andriod,x4,x1.2,,,10.11.1.11,,,1,1804,1412,china,江西省,九江,,,1412,,1804,"{}"
jIaIwyIj,2023-04-22 12:39:14,APP,Go1KtO,1682138354,2023-04-22 12:39:14,trunck,APP_LOGIN,,,,vlQVPH,list2,78IaN6f9,sanxing,x5,sanxing,sanxing,5G,移动,andriod,x4,x1.2,,,10.11.1.11,,,1,1804,1412,china,江西省,九江,,,1412,,1804,"{}"
gmmiXPsi,2023-05-09 23:48:33,APP,Go1KtO,1683647313,2023-05-09 23:48:33,trunck,APP_CLICK,,,,b1fbou,list2,78IaN6f9,sanxing,x5,sanxing,sanxing,5G,移动,andriod,x4,x1.2,,,10.11.1.11,,,1,1804,1412,china,江西省,九江,,,1412,,1804,"{'title': 'account'}"

gmmiXPsi,2023-05-09 23:48:33,APP,Go1KtO,1683647313,2023-05-09 23:48:33,trunck,APP_CLICK,,,,b1fbou,list2,78IaN6f9,sanxing,x5,sanxing,sanxing,5G,移动,andriod,x4,x1.2,,,10.11.1.11,,,1,1804,1412,china,江西省,九江,,,1412,,1804,"{'Rscreen_name': 'bankcard', 'Rscreen_title': 'bankcard', 'Rscreen_url': '/user/bankcard'}"

导入命令:

insert into event_log from infile 'event_data.csv'  FORMAT CSV

若需要导入Map字段,csv存储内容格式如下:

"{'Rscreen_name': 'bankcard', 'Rscreen_title': 'bankcard', 'Rscreen_url': '/user/bankcard'}"

select expand_property['Rscreen_name'] from event_log;

clickhouse导入csv文件_CSV

标签:sanxing,1804,APP,导入,2023,Rscreen,1412,csv,clickhouse
From: https://blog.51cto.com/u_12760266/6358326

相关文章

  • EasyExcel导入对失败数据进行标红导出
    模板渲染工具类publicclassExcelUtils{/***模板表头样式*@paramtemplateName"classpath:template/"模板文件名称*@paramdata数据*@paramwriteHandler自定额填充策略*/publicstaticStringcommonImport(Stringtemplate......
  • expdp同一个用户下的多表导出导入
    expdpexpuser/oracleparfile=exptable.parcontent=metadata_onlycluster=n编辑exptable.par文件moreexptable.pardumpfile=mdm.dmplogfile=mdm.logschemas=mdmdirectory=expdp_dmpexclude=statisticsflashback_scn=3523577018PARALLEL=4COMPRESSION=allinclude=TA......
  • Springboot+Mybatisplus+ClickHouse集成
    核心依赖引入<dependency><groupId>ru.yandex.clickhouse</groupId><artifactId>clickhouse-jdbc</artifactId><version>0.1.53</version></dependency><!--Mybati......
  • 万字长文详述ClickHouse在京喜达实时数据的探索与实践
    1前言京喜达技术部在社区团购场景下采用JDQ+Flink+Elasticsearch架构来打造实时数据报表。随着业务的发展Elasticsearch开始暴露出一些弊端,不适合大批量的数据查询,高频次深度分页导出导致ES宕机、不能精确去重统计,多个字段聚合计算时性能下降明显。所以引入ClickHouse来处理这......
  • obloader 基于典型场景数据导入
    作者:刘书盛热衷技术分享、编写技术文档原创作品oceanbase数据库原创内容未经授权不得随意使用,转载请联系小编并注明来源,谢谢!预处理函数:函数签名返回类型描述LOWER(char)String对参数值中的字母转换为小写。参数值可以是列名、常量或者嵌套表达式。当参数值是常量......
  • vue自动导入组件和自动导入类库 api
    vue3项目中,使用vue常用的api比如vuex的api或者ref,reactive等,以及导入多个自定义组件、UI组件库的组件,都需要反复的手动导入,注册,很是影响开发体验,这里推荐antfu开源的两个插件,上链接:自动导入组件https://github.com/antfu/unplugin-vue-components自动导入类库a......
  • Elasticsearch与Clickhouse数据存储对比
    1背景京喜达技术部在社区团购场景下采用JDQ+Flink+Elasticsearch架构来打造实时数据报表。随着业务的发展Elasticsearch开始暴露出一些弊端,不适合大批量的数据查询,高频次分页导出导致宕机、存储成本较高。Elasticsearch的查询语句维护成本较高、在聚合计算场景下出现数据不精确......
  • 在终端运行查询clickhouse的方式
    执行的语法和命令如下:timeclickhouse-client-hlocalhost-udefault--password"root"--port9000-dtpch-q"selectcount(*)fromcustomer;"打印的结果显示如下:root@test-stonedata-ck02:~#timeclickhouse-client-hlocalhost-udefault--password&q......
  • clickhouse-查询的22条SQL
    selectl_returnflag,l_linestatus,sum(l_quantity)assum_qty,sum(l_extendedprice)assum_base_price,sum(l_extendedprice*(1-l_discount))assum_disc_price,sum(l_extendedprice*(1-l_discount)*(1+l_tax))assum_charge,avg(l_quantity)asavg_q......
  • BootStrap导入excel
    BootStrap_实现导入Excel(BootStrap-InputFile)【实例】weixin_40877388于2020-03-3114:52:47发布5505收藏19分类专栏:BootStrap版权BootStrap专栏收录该内容2篇文章0订阅订阅专栏一、前言在批量加入学生信息的时候,我们通常采用Excel导入的方式,方便,快......