Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix): added details of postgres and mysql in docs #880

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
103 changes: 93 additions & 10 deletions docs/source/user_guide/eda/create_db_report.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Creating SQLAlchemy `create_engine` object"
"## Generate report via `create_db_report(sqlite_engine)`\n",
"\n",
"Here we provide with an example using SQLite database to demonstrate the functionality:"
]
},
{
Expand All @@ -40,15 +42,6 @@
"db_engine = load_db('sakila.db')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Generate report via `create_db_report(database_engine)`\n",
"\n",
"Here we provide with an example using SQLite database to demonstrate the functionality:"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -63,6 +56,96 @@
"from dataprep.eda import create_db_report\n",
"create_db_report(db_engine)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Generate report via `create_db_report(mysql_engine)`\n",
"\n",
"Here we provide with an example using a MySQL database to demonstrate the functionality:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Creating SQLAlchemy `create_engine` connector for MySQL"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"user = 'user'\n",
"password = 'password'\n",
"database_url=\"database-2.cnpnvdy4yt13.us-west-2.rds.amazonaws.com:3306/classicmodels\"\n",
"mysql_engine = create_engine('mysql://' + user + ':' + password + database_url)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Running `create_db_report` on MySQL database hosted on Amazon RDS"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from dataprep.eda import create_db_report\n",
"create_db_report(mysql_engine)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Generate report via `create_db_report(postgreSQL_engine)`\n",
"\n",
"Here we provide with an example using a local postgreSQL database to demonstrate the functionality:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Creating SQLAlchemy `create_engine` connector for PostgreSQL"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"user = 'user'\n",
"password = 'password'\n",
"database_url='@localhost:5432/classicmodels'\n",
"postgresql_engine = create_engine('postgresql://' + user + ':' + password + database_url)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Running `create_db_report` on local PostgreSQL database"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from dataprep.eda import create_db_report\n",
"create_db_report(postgresql_engine)"
]
}
],
"metadata": {
Expand Down