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 --timestamp to automagically detect types.
On Fri, Jan 5, 2024 at 12:45 AM Paolo Saudin <paolosaudin@xxxxxxxxx> wrote:
Il giorno mar 2 gen 2024 alle ore 21:17 Adrian Klaver <adrian.klaver@xxxxxxxxxxx> 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 mine.
2) Define "... doesn't like supporting RDS".
a) You can generate an SQL statement without connecting to the database.
Then use that statement directly in the database.
b) If SQLAlchemy can reach the database then csvkit should be able to.
>
> https://csvkit.readthedocs.io/en/latest/
> <https://csvkit.readthedocs.io/en/latest/>
>
> Regards
> Arun
>
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx
You can user pgloader (https://pgloader.io/) as well to load data from CSV to PostgresPaolo