Re: Importing from CSV, auto creating table?

Поиск
Список
Период
Сортировка
От Steve Atkins
Тема Re: Importing from CSV, auto creating table?
Дата
Msg-id 55fecc3f-813d-9414-8875-d63044a878bf@blighty.com
обсуждение исходный текст
Ответ на Importing from CSV, auto creating table?  (stan <stanb@panix.com>)
Список pgsql-general
On 21/08/2019 22:15, stan wrote:
> I have a situation where we need to import data, as an interim measure,
> from spreadsheets.
>
> I have read up on \copy and COPY, but I do not see that either of these can
> use the header from a CSV file to define a new table. Am I missing
> something?
>
> Also downloaded something called pgfutter, which I thought would do this,
> but have not had any success with this. After I (thought) I had figured out
> the arguments, it just seams to hag forever.
>
You might find https://github.com/wttw/csvpg useful. It creates tables 
with column names based on the CSV header, and data types intuited from 
the data.

(The only pre-built binary there is for Mac right now; I should at least 
add one for Windows).

Cheers,
   Steve





В списке pgsql-general по дате отправления:

Предыдущее
От: "Georg H."
Дата:
Сообщение: Re: Question on pgwatch
Следующее
От: Devrim Gündüz
Дата:
Сообщение: Re: How to install Postgres 12 beta with YUM