title: Clickhouse Data Import
body: <p>I created a table in Clickhouse:</p>
  
  <pre><code>CREATE TABLE stock
  (
      plant Int32,
      code Int32,
      service_level Float32,
      qty Int32
  ) ENGINE = Log
  </code></pre>
  
  <p>there is a data file</p>
  
  <pre><code>:~$ head -n 10 /var/rs_mail/IN/qv_stock_20160620035119.csv
  2010,646,1.00,13
  2010,2486,1.00,19
  2010,8178,1.00,10
  2010,15707,1.00,4
  2010,15708,1.00,10
  2010,15718,1.00,4
  2010,16951,1.00,8
  2010,17615,1.00,13
  2010,17616,1.00,4
  2010,17617,1.00,8
  </code></pre>
  
  <p>I am trying to load data:</p>
  
  <pre><code>:~$ cat /var/rs_mail/IN/qv_stock_20160620035119.csv | clickhouse-client --query="INSERT INTO stock FORMAT CSV";
  </code></pre>
  
  <p>and I get an error</p>
  
  <pre><code>\n2010: 7615,1.00,13ion: Cannot parse input: expected , before: 2010,646,1.00,13
  
  Row 1:
  Column 0,   name: plant,         type: Int32,   ERROR: text "2010,64" is not like Int32
  
  : (at row 1)
  </code></pre>
  
  <p>what am I doing wrong?</p>
  
  <p>File: <a href="https://yadi.sk/d/ijJlmnBjsjBVc" rel="noreferrer">https://yadi.sk/d/ijJlmnBjsjBVc</a></p>