title: Can I get Unix timestamp automatically converted to a DATETIME column when importing from CSV to a (My)SQL database?
body: <p>I created a table that has a <code>timestamp DATETIME</code> column and I am trying to import data from <code>CSV</code> files that have Unix timestamped rows.</p>
  
  <p>However, when I try to use DataGrip's CSV import feature, I get errors to the tune of</p>
  
  <pre><code>1:1: conversion failed: "1394669640" to datetime
  2:1: conversion failed: "1394670060" to datetime
  3:1: conversion failed: "1394670480" to datetime
  4:1: conversion failed: "1394670780" to datetime
  </code></pre>
  
  <p>Maybe dataGrip is not the best tool, but that's pretty much all I can do with, given that I don't have direct access to the machine which runs the DB server[*]. Obviously this works if I set the column to be <code>INT</code>.</p>
  
  <p>Is there a way of configuring the table so that the conversion happens automatically?</p>
  
  <hr>
  
  <p>[*] I do, but the DBMS is running inside a Docker container so, short of copying the CSV files on the host and then inside the container, I can't play tricks like <code>LOAD DATA INFILE</code> and set the column with <code>FROM_UNIXTIME()</code>.</p>