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;