I use csv2table almost every day: https://github.com/f0rk/csv2table
to just emit a create table statement: csv2table --file your_csv.csv
pipe output to psql to create.
easily used to import data as: csv2table --file your_csv.csv --copy
--backslash -1 | psql your_database
use arguments like --ti
Il giorno mar 2 gen 2024 alle ore 21:17 Adrian Klaver <
adrian.kla...@aklaver.com> ha scritto:
> On 1/2/24 11:47, arun chirappurath wrote:
>
> Reply to list
> Ccing list
> > Hi Adrian,
> >
> > Love this tool..however it doesn't like supporting RDS.
>
> 1) This was Daniel Vérité's suggestion not mi
On 1/2/24 11:47, arun chirappurath wrote:
Reply to list
Ccing list
Hi Adrian,
Love this tool..however it doesn't like supporting RDS.
1) This was Daniel Vérité's suggestion not mine.
2) Define "... doesn't like supporting RDS".
a) You can generate an SQL statement without connecting to the
On 1/2/24 06:51, Daniel Verite wrote:
arun chirappurath wrote:
Do we have any scripts that create a temp table with column names
from the first row of csv files?
csvkit [1] does that.
[1] https://csvkit.readthedocs.io/en/latest/
In addition to the above which I have used you might
arun chirappurath wrote:
> Do we have any scripts that create a temp table with column names
> from the first row of csv files?
csvkit [1] does that.
[1] https://csvkit.readthedocs.io/en/latest/
Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite
On Tue, Jan 2, 2024 at 7:02 AM arun chirappurath
wrote:
> Dear All,
>
> Do we have any scripts that create a temp table with column names from the
> first row of csv files?
>
How would you determine the data type?
If you assume TEXT for all of them, then it's relatively simple to write
bash whi