pyspark.pandas.
read_sql_table
Read SQL database table into a DataFrame.
Given a table name and a JDBC URI, returns a DataFrame.
Name of SQL table in database.
A JDBC URI could be provided as as str.
Note
The URI must be JDBC URI instead of Python’s database URI.
Name of SQL schema in database to query (if database flavor supports this). Uses default schema if None (default).
Column(s) to set as index(MultiIndex).
List of column names to select from SQL table.
All other options passed directly into Spark’s JDBC data source.
A SQL table is returned as two-dimensional data structure with labeled axes.
See also
read_sql_query
Read SQL query into a DataFrame.
read_sql
Read SQL query or database table into a DataFrame.
Examples
>>> ps.read_sql_table('table_name', 'jdbc:postgresql:db_name')