spark_gaps_date_rorc_tools
Project description
spark_gaps_date_rorc_tools
spark_gaps_date_rorc_tools is a Python library that implements get gaps dates
Installation
The code is packaged for PyPI, so that the installation consists in running:
pip install spark-gaps-date-rorc-tools
Usage
wrapper take gaps dates
config.yaml
===========
conf-rorc:
t_psan_test:
table_path: "/data/master/psan/data/t_psan_test/"
supplies : [
"/data/master/psan/data/t_ksag_test/",
"/data/master/psan/data/t_psan_test/"
]
t_kctk_cust_rating_atrb:
table_path: ""
supplies : []
example1: file.py
=================
from spark_gaps_date_rorc_tools import show_gaps_date
df_pivot = show_gaps_date(spark=spark,
config_path_name="config.yaml",
hdfs_uri="hdfs://pedaaslive.scmx2p100.isi",
filter_date_initial="202101",
filter_date_final="202112")
df_pivot.head()
example2: file.py
=================
from spark_gaps_date_rorc_tools import show_gaps_date
df_pivot = show_gaps_date(spark=spark,
config_path_name="config.yaml",
table_rorc=["t_psan_xxx"]
hdfs_uri="hdfs://pedaaslive.scmx2p100.isi",
filter_date_initial="202101",
filter_date_final="202112")
df_pivot.head()
Style Dataframe (Spark): file.py
=========================
import pyspark
from spark_gaps_date_rorc_tools import show_spark_df
pyspark.sql.dataframe.DataFrame.show2 = show_spark_df
df_pivot = show_gaps_date(spark=spark,
config_path_name="config.yaml",
table_rorc=["t_psan_xxx"]
hdfs_uri="hdfs://pedaaslive.scmx2p100.isi",
filter_date_initial="202101",
filter_date_final="202112")
df_pivot.show2()
Style Dataframe (Pandas): file.py
=========================
import pandas as pd
from spark_gaps_date_rorc_tools import show_pd_df
pd.DataFrame.show2 = show_pd_df
df_pivot = show_gaps_date(spark=spark,
config_path_name="config.yaml",
table_rorc=["t_psan_xxx"]
hdfs_uri="hdfs://pedaaslive.scmx2p100.isi",
filter_date_initial="202101",
filter_date_final="202112")
df_pivot2 = df_pivot.toPandas()
df_pivot2.show2()
License
New features v1.0
BugFix
- choco install visualcpp-build-tools
Reference
- Jonathan Quiza github.
- Jonathan Quiza RumiMLSpark.
- Jonathan Quiza linkedin.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file spark_gaps_date_rorc_tools-0.0.12.tar.gz
.
File metadata
- Download URL: spark_gaps_date_rorc_tools-0.0.12.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c3f50a77c6f354feef6f3908b44d5119baccc93bc5ec8ceb39df8a332344d5c |
|
MD5 | d1ea8f6d519a18a322b8e6c8f3e4bd27 |
|
BLAKE2b-256 | 405214131fd494aa9a88513a4a8d4d92142dc35ae06d2116c3e61431ff827aa8 |
File details
Details for the file spark_gaps_date_rorc_tools-0.0.12-py3-none-any.whl
.
File metadata
- Download URL: spark_gaps_date_rorc_tools-0.0.12-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c310c227ebbb3ccb7d4b9f121cda175683f250b4287f38748959bec4b614f11 |
|
MD5 | 2066b27bd7616a81c7fed182dc43d38c |
|
BLAKE2b-256 | de8317d8481abc20292d669b842c15f0c806ff72224f7bbf31414fd9fb6d22c5 |