Closed judell closed 2 years ago
My excitement about this plugin keeps growing. I've looked around at various ways of bringing CSV into Postgres, including the COPY recipes, and also the built-in file_fdw. I've yet to find one that's dynamic with respect to the table schema, in the way this plugin is.
For type conversion, it can be as easy as this.
cat > fruit.csv name,color,size apple,red,10
create table fruit as ( select name, color, size::int from csv.fruit)
\d fruit
name | text color | text size | integer
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 90 days with no activity.
connection "csv" } plugin = "csv" paths = [ "/home/jon/csv/*.csv" ] }
cat > fruit.csv name,color apple,red
select * from csv.fruit name,color apple,red
rm fruit.csv select * from csv.fruit ... hangs ...
sudo -u root psql -d steampipe -h localhost -p 9193
select * from information_schema.foreign_tables
steampipe, csv, fruit, steampipe, steampipe
drop foreign table csv.fruit
cat > fruit.csv name,color apple,red
select * from csv.fruit name,color apple,red