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 want to take a look at: Polars https://pola.rs/ and Duckdb https://duckdb.org/ They both allow you to query CSV(and other format) files directly. I have found them very useful for looking at CSV files and you can transfer data elsewhere later. Then there is: Pandas https://pandas.pydata.org/pandas-docs/stable/index.html which has read_csv(https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html) and to_sql(https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_sql.html#pandas.DataFrame.to_sql) to pull from a CSV into a table. > > > Best regards, -- Adrian Klaver adrian.klaver@aklaver.com
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных