Saturday, 29 May 2021

Importing data from postgresql with Dask

So I have a large (7GB) dataset stored in postgres that I'm trying to import into Dask. I'm trying the read_sql_table function, but keep getting ArgumentErrors.

My info in postgres is the following:

  • database is "my_database"
  • schema is "public"
  • data table is "table"
  • username is "fred"
  • password is "my_pass"
  • index in postgres is 'idx'

I am trying to get this piece of code to work:

df = dd.read_sql_table('public.table', 'jdbc:postgresql://localhost/my_database?user=fred&password=my_pass', index_col='idx') 

Am I formatting something incorrectly?



from Importing data from postgresql with Dask

No comments:

Post a Comment