使用Dask和Psycog2连接到远程PostGreSql Server

我能够使用pandas和psycopg2连接到远程PostgreSQL服务器。现在,由于知道熊猫读取数据库的速度很慢,我认为使用Dask可以解决此问题。因此,我决定与Psycopg2和Dask一起运行,但收到​​以下错误:

import psycopg2 as pg
from sqlalchemy import create_engine
import dask.dataframe as dd
import pandas.io.sql as psql
import pandas as pd
connection = pg.connect("host='xxx.x.x.x' dbname=xxxx user=xxxx password='xxxx' port = 'xxxx'")

df = dd.read_sql_table(table='xxxx',uri='postgresql+psycopg2://user_name:password@localhost:port_number/database_name',index_col='id',npartitions=20)

df.compute()

c:\users\user_name\miniconda3\lib\site-packages\sqlalchemy\dialects\postgresql\base.py:3323: SAWarning: Skipped unsupported reflection of expression-based index uc_table_name_lower_code
  "expression-based index %s" % idx_name

上述错误是什么意思?即使出现错误,它也会显示表数据框。 如何在没有收到错误消息的情况下运行连接?

leon_hit 回答:使用Dask和Psycog2连接到远程PostGreSql Server

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3068067.html

大家都在问