|
27 | 27 | "cell_type": "markdown",
|
28 | 28 | "metadata": {},
|
29 | 29 | "source": [
|
30 |
| - "Creating SQLAlchemy `create_engine` object" |
| 30 | + "## Generate report via `create_db_report(sqlite_engine)`\n", |
| 31 | + "\n", |
| 32 | + "Here we provide with an example using SQLite database to demonstrate the functionality:" |
31 | 33 | ]
|
32 | 34 | },
|
33 | 35 | {
|
|
40 | 42 | "db_engine = load_db('sakila.db')"
|
41 | 43 | ]
|
42 | 44 | },
|
43 |
| - { |
44 |
| - "cell_type": "markdown", |
45 |
| - "metadata": {}, |
46 |
| - "source": [ |
47 |
| - "## Generate report via `create_db_report(database_engine)`\n", |
48 |
| - "\n", |
49 |
| - "Here we provide with an example using SQLite database to demonstrate the functionality:" |
50 |
| - ] |
51 |
| - }, |
52 | 45 | {
|
53 | 46 | "cell_type": "code",
|
54 | 47 | "execution_count": null,
|
|
63 | 56 | "from dataprep.eda import create_db_report\n",
|
64 | 57 | "create_db_report(db_engine)"
|
65 | 58 | ]
|
| 59 | + }, |
| 60 | + { |
| 61 | + "cell_type": "markdown", |
| 62 | + "metadata": {}, |
| 63 | + "source": [ |
| 64 | + "## Generate report via `create_db_report(mysql_engine)`\n", |
| 65 | + "\n", |
| 66 | + "Here we provide with an example using a MySQL database to demonstrate the functionality:" |
| 67 | + ] |
| 68 | + }, |
| 69 | + { |
| 70 | + "cell_type": "markdown", |
| 71 | + "metadata": {}, |
| 72 | + "source": [ |
| 73 | + "Creating SQLAlchemy `create_engine` connector for MySQL" |
| 74 | + ] |
| 75 | + }, |
| 76 | + { |
| 77 | + "cell_type": "code", |
| 78 | + "execution_count": null, |
| 79 | + "metadata": {}, |
| 80 | + "outputs": [], |
| 81 | + "source": [ |
| 82 | + "user = 'user'\n", |
| 83 | + "password = 'password'\n", |
| 84 | + "database_url=\"database-2.cnpnvdy4yt13.us-west-2.rds.amazonaws.com:3306/classicmodels\"\n", |
| 85 | + "mysql_engine = create_engine('mysql://' + user + ':' + password + database_url)" |
| 86 | + ] |
| 87 | + }, |
| 88 | + { |
| 89 | + "cell_type": "markdown", |
| 90 | + "metadata": {}, |
| 91 | + "source": [ |
| 92 | + "Running `create_db_report` on MySQL database hosted on Amazon RDS" |
| 93 | + ] |
| 94 | + }, |
| 95 | + { |
| 96 | + "cell_type": "code", |
| 97 | + "execution_count": null, |
| 98 | + "metadata": {}, |
| 99 | + "outputs": [], |
| 100 | + "source": [ |
| 101 | + "from dataprep.eda import create_db_report\n", |
| 102 | + "create_db_report(mysql_engine)" |
| 103 | + ] |
| 104 | + }, |
| 105 | + { |
| 106 | + "cell_type": "markdown", |
| 107 | + "metadata": {}, |
| 108 | + "source": [ |
| 109 | + "## Generate report via `create_db_report(postgreSQL_engine)`\n", |
| 110 | + "\n", |
| 111 | + "Here we provide with an example using a local postgreSQL database to demonstrate the functionality:" |
| 112 | + ] |
| 113 | + }, |
| 114 | + { |
| 115 | + "cell_type": "markdown", |
| 116 | + "metadata": {}, |
| 117 | + "source": [ |
| 118 | + "Creating SQLAlchemy `create_engine` connector for PostgreSQL" |
| 119 | + ] |
| 120 | + }, |
| 121 | + { |
| 122 | + "cell_type": "code", |
| 123 | + "execution_count": null, |
| 124 | + "metadata": {}, |
| 125 | + "outputs": [], |
| 126 | + "source": [ |
| 127 | + "user = 'user'\n", |
| 128 | + "password = 'password'\n", |
| 129 | + "database_url='@localhost:5432/classicmodels'\n", |
| 130 | + "postgresql_engine = create_engine('postgresql://' + user + ':' + password + database_url)" |
| 131 | + ] |
| 132 | + }, |
| 133 | + { |
| 134 | + "cell_type": "markdown", |
| 135 | + "metadata": {}, |
| 136 | + "source": [ |
| 137 | + "Running `create_db_report` on local PostgreSQL database" |
| 138 | + ] |
| 139 | + }, |
| 140 | + { |
| 141 | + "cell_type": "code", |
| 142 | + "execution_count": null, |
| 143 | + "metadata": {}, |
| 144 | + "outputs": [], |
| 145 | + "source": [ |
| 146 | + "from dataprep.eda import create_db_report\n", |
| 147 | + "create_db_report(postgresql_engine)" |
| 148 | + ] |
66 | 149 | }
|
67 | 150 | ],
|
68 | 151 | "metadata": {
|
|
0 commit comments