aic-utils 0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aic_utils-0.1/PKG-INFO +14 -0
- aic_utils-0.1/README.md +1 -0
- aic_utils-0.1/aic_utils/__init__.py +4 -0
- aic_utils-0.1/aic_utils/aic_utils.py +22 -0
- aic_utils-0.1/aic_utils.egg-info/PKG-INFO +14 -0
- aic_utils-0.1/aic_utils.egg-info/SOURCES.txt +9 -0
- aic_utils-0.1/aic_utils.egg-info/dependency_links.txt +1 -0
- aic_utils-0.1/aic_utils.egg-info/requires.txt +1 -0
- aic_utils-0.1/aic_utils.egg-info/top_level.txt +1 -0
- aic_utils-0.1/setup.cfg +4 -0
- aic_utils-0.1/setup.py +26 -0
aic_utils-0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aic_utils
|
|
3
|
+
Version: 0.1
|
|
4
|
+
Summary: A utility package for dataset ID retrieval
|
|
5
|
+
Home-page: https://github.com/dylandoyle11/aic_utils
|
|
6
|
+
Author: Dylan D
|
|
7
|
+
Author-email: dylan.doyle@jdpa.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
Requires-Dist: pandas
|
|
13
|
+
|
|
14
|
+
TEST
|
aic_utils-0.1/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
TEST
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# aic_utils.py
|
|
2
|
+
|
|
3
|
+
import pandas as pd
|
|
4
|
+
|
|
5
|
+
def get_dataset_id(alias, QA):
|
|
6
|
+
# MAP WRITES TO QA OR PROD TABLES
|
|
7
|
+
df = pyspark_utils.get_pandas_from_aic_table('Silver',
|
|
8
|
+
'LKP_QA_TABLE_MAPPING')
|
|
9
|
+
row = df[df['alias'] == alias]
|
|
10
|
+
|
|
11
|
+
# Choose the appropriate column based on QA flag
|
|
12
|
+
if QA:
|
|
13
|
+
target_col = 'qa_dataset'
|
|
14
|
+
else:
|
|
15
|
+
target_col = 'prod_dataset'
|
|
16
|
+
|
|
17
|
+
# Return the dataset ID
|
|
18
|
+
if not row.empty:
|
|
19
|
+
return row.iloc[0][target_col]
|
|
20
|
+
else:
|
|
21
|
+
raise ValueError("Alias not found in mapping table")
|
|
22
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aic_utils
|
|
3
|
+
Version: 0.1
|
|
4
|
+
Summary: A utility package for dataset ID retrieval
|
|
5
|
+
Home-page: https://github.com/dylandoyle11/aic_utils
|
|
6
|
+
Author: Dylan D
|
|
7
|
+
Author-email: dylan.doyle@jdpa.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
Requires-Dist: pandas
|
|
13
|
+
|
|
14
|
+
TEST
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pandas
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
aic_utils
|
aic_utils-0.1/setup.cfg
ADDED
aic_utils-0.1/setup.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# setup.py
|
|
2
|
+
|
|
3
|
+
from setuptools import setup, find_packages
|
|
4
|
+
|
|
5
|
+
setup(
|
|
6
|
+
name='aic_utils',
|
|
7
|
+
version='0.1',
|
|
8
|
+
packages=find_packages(),
|
|
9
|
+
install_requires=[
|
|
10
|
+
'pandas',
|
|
11
|
+
# Add other dependencies here
|
|
12
|
+
],
|
|
13
|
+
author='Dylan D',
|
|
14
|
+
author_email='dylan.doyle@jdpa.com',
|
|
15
|
+
description='A utility package for dataset ID retrieval',
|
|
16
|
+
long_description=open('README.md').read(),
|
|
17
|
+
long_description_content_type='text/markdown',
|
|
18
|
+
url='https://github.com/dylandoyle11/aic_utils',
|
|
19
|
+
classifiers=[
|
|
20
|
+
'Programming Language :: Python :: 3',
|
|
21
|
+
'License :: OSI Approved :: MIT License',
|
|
22
|
+
'Operating System :: OS Independent',
|
|
23
|
+
],
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|