Skip to content

Commit b9526be

Browse files
committed
adding comparison notebook and separating out helper functions
1 parent 235adb8 commit b9526be

File tree

6 files changed

+951
-25
lines changed

6 files changed

+951
-25
lines changed

etls/loadHalloween/mapping.ipynb

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,39 @@
1818
},
1919
{
2020
"cell_type": "code",
21-
"execution_count": null,
22-
"id": "0a26a1bc",
21+
"execution_count": 1,
22+
"id": "9e504af7",
2323
"metadata": {},
2424
"outputs": [],
2525
"source": [
26+
"%load_ext dotenv\n",
27+
"%dotenv\n",
28+
"\n",
2629
"import pandas as pd\n",
2730
"import datetime\n",
2831
"import os\n",
29-
"from utils import createEngine\n",
3032
"import uuid\n",
3133
"import numpy as np\n",
3234
"import warnings\n",
33-
"from pangres import upsert\n",
34-
"from urllib.parse import urljoin\n",
3535
"import requests\n",
3636
"import zipfile\n",
3737
"import io\n",
38+
"import sys\n",
39+
"from pathlib import Path\n",
40+
"from pangres import upsert\n",
41+
"from urllib.parse import urljoin\n",
42+
"\n",
43+
"\n",
44+
"# This allows us to use an absolute import for utils\n",
45+
"parent_dir = str(Path().resolve().parents[0])\n",
46+
"if parent_dir not in sys.path:\n",
47+
" sys.path.insert(0, parent_dir)\n",
48+
"\n",
49+
"from utils.db_helpers import createEngine\n",
3850
"\n",
3951
"warnings.simplefilter(action='ignore', category=pd.errors.DtypeWarning)\n",
4052
"warnings.simplefilter(\n",
41-
" action='ignore', category=pd.errors.SettingWithCopyWarning)\n"
53+
" action='ignore', category=pd.errors.SettingWithCopyWarning)"
4254
]
4355
},
4456
{
@@ -95,12 +107,12 @@
95107
},
96108
{
97109
"cell_type": "code",
98-
"execution_count": null,
110+
"execution_count": 2,
99111
"id": "09f9d8b4",
100112
"metadata": {},
101113
"outputs": [],
102114
"source": [
103-
"engine = createEngine()"
115+
"engine = createEngine(\"SOURCE\")"
104116
]
105117
},
106118
{

etls/loadHalloween/utils.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)