Contents

dask.dataframe.read_sql

dask.dataframe.read_sql(sql, con, index_col, **kwargs)[source]

Read SQL query or database table into a DataFrame.

This function is a convenience wrapper around read_sql_table and read_sql_query. It will delegate to the specific function depending on the provided input. A SQL query will be routed to read_sql_query, while a database table name will be routed to read_sql_table. Note that the delegated function might have more specific notes about their functionality not listed here.

Parameters:
sqlstr or SQLAlchemy Selectable

Name of SQL table in database or SQL query to be executed. TextClause is not supported

constr

Full sqlalchemy URI for the database connection

index_colstr

Column which becomes the index, and defines the partitioning. Should be a indexed column in the SQL server, and any orderable type. If the type is number or time, then partition boundaries can be inferred from npartitions or bytes_per_chunk; otherwise must supply explicit divisions.

Returns:
dask.dataframe

See also

read_sql_table

Read SQL database table into a DataFrame.

read_sql_query

Read SQL query into a DataFrame.