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
Close
Hashes for spark_gaps_date_rorc_tools-0.0.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16007f29d2990113c887456fe5faa7091497bd6b1179ecf0a029e0406a72ae5b |
|
MD5 | f54b00a2695dcb0ba16f3672c1d2dfda |
|
BLAKE2b-256 | 7ba61e47f7dec6f860499c2e6770fb8cbe905156e1f1bdd673a5cfcf7c3c0b54 |
Close
Hashes for spark_gaps_date_rorc_tools-0.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dc1232674d99ccf5eedbe4a39876fb16116e7faab8c8c6dc8944accf62f4d6e |
|
MD5 | 915718bfddc998929f3bc3189d9bcbc6 |
|
BLAKE2b-256 | 086ffa00bc94982bf78af72a011d0067ea617e538177fbe0004b4231c369b485 |