clickhouse輸入輸出格式之不常用資料格式

2021-10-22 22:32:15 字數 722 閱讀 5009

資料以二進位制資料塊的方式進行讀寫。

資料的匯出:

clickhouse-client --query=「select * from tsv_demo format native」 > a.native

資料的匯入:

clickhouse-client --query=「insert into tsv_demo format native」 < a.native

主要用於測試效能。 查詢會被處理,並且資料會被傳送到客戶端,但是什麼也不輸出。

null格式只能用於查詢, 不能用於資料的匯入。

prettycompact:在互動式模式下,預設的資料顯示格式。

prettyspace

每行之間使用逗號分隔,列之間也是使用逗號分隔。在括號中列印每一行。

insert into xx values

insert into xx format values

insert into tsv_demo format values (『115.248.158.231』, 『115.248.158.232』, 『2020-07-12 17:22:56』), (『115.248.158.231』, 『115.248.158.232』, 『2020-07-12 17:22:56』);

資料以垂直的格式進行展示。 \g

xml只支援資料的檢視。

select * from tsv_demo limit 2 format xml;

c 輸入輸出格式控制

使用這些格式需要宣告包含 long flags const 返回當前的格式標誌。long flays long newflag 設定格式標誌為newflag,返回舊的格式標誌。long setf long bits 設定指定的格式標誌位,返回舊的格式標誌。long setf long bits,lo...

python的輸入輸出格式

1.輸入格式 1 直接輸入 raw input 提示詞 2 將輸入的值賦值給passwd passwd raw input 請輸入你的密碼 3 將輸入的值轉換型別賦值給price price float raw input 水果的單價 2.輸出格式 1 print 格式化字串 變數1 print 你...

ACM常用輸入輸出格式

因為acm新人對於acm題目中處理輸入輸出存在一些疑惑,於是在這裡記錄幾種常用的輸入輸出方法。int n scanf d n while n c int a while scanf d a eof c int a while cin a c int n while scanf d n n 0 c i...