Re: Importing from CSV, auto creating table?

Поиск
Список
Период
Сортировка
От Reid Thompson
Тема Re: Importing from CSV, auto creating table?
Дата
Msg-id 63fceab68d2de019f4de26a8be43686ce2ebf3e9.camel@omnicell.com
обсуждение исходный текст
Ответ на Re: Importing from CSV, auto creating table?  (Reid Thompson <Reid.Thompson@omnicell.com>)
Ответы Re: Importing from CSV, auto creating table?  (Reid Thompson <Reid.Thompson@omnicell.com>)
Список pgsql-general
On Thu, 2019-08-22 at 08:25 -0400, Reid Thompson wrote:
> On Wed, 2019-08-21 at 17:15 -0400, stan wrote:
> > [EXTERNAL SOURCE]
> > 
> > 
> > 
> > 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.
> > 
> > 
> > --
> > "They that would give up essential liberty for temporary safety deserve
> > neither liberty nor safety."
> >                                                 -- Benjamin Franklin
> > 
> > 
> 
> https://csvkit.readthedocs.io/en/latest/tutorial/3_power_tools.html#csvsql-and-sql2csv-ultimate-power
> 
> csvsql and sql2csv: ultimate power
> ...snip...
> By default, csvsql will generate a create table statement for your data. You can specify what sort of database you
areusing with the -i flag:
 
> ...snip...
> 

Example

https://stackoverflow.com/questions/35243432/how-to-generate-a-schema-from-a-csv-for-a-postgresql-copy


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

Предыдущее
От: Reid Thompson
Дата:
Сообщение: Re: Importing from CSV, auto creating table?
Следующее
От: Reid Thompson
Дата:
Сообщение: Re: Importing from CSV, auto creating table?