spark_dummy_tools
Project description
spark_dummy_tools
spark_dummy_tools is a Python library that implements for dummy table
Installation
The code is packaged for PyPI, so that the installation consists in running:
pip install spark-dummy-tools --user
Usage
wrapper take Dummy
from spark_dummy_tools import generated_dummy_table_artifactory
from spark_dummy_tools import generated_dummy_table_datum
import spark_dataframe_tools
Generated Dummy Table Datum
============================================================
path = "fields_pe_datum2.csv"
table_name = "t_kctk_collateralization_atrb"
storage_zone = "master"
sample_parquet = 10
columns_integer_default={}
columns_date_default={"gf_cutoff_date":"2026-01-01"}
columns_string_default={}
columns_decimal_default={"other_concepts_amount":"500.00"}
generated_dummy_table_datum(spark=spark,
path=path,
table_name=table_name,
storage_zone=storage_zone,
sample_parquet=sample_parquet,
partition_colum=["gf_cutoff_date"],
columns_integer_default=columns_integer_default,
columns_date_default=columns_date_default,
columns_string_default=columns_string_default,
columns_decimal_default=columns_decimal_default
)
Generated Dummy Table Artifactory
============================================================
path = "lclsupplierspurchases.output.schema"
sample_parquet = 10
columns_integer_default={}
columns_date_default={"gf_cutoff_date":"2026-01-01"}
columns_string_default={}
columns_decimal_default={"other_concepts_amount":"500.00"}
generated_dummy_table_artifactory(spark=spark,
path=path,
sample_parquet=sample_parquet,
columns_integer_default=columns_integer_default,
columns_date_default=columns_date_default,
columns_string_default=columns_string_default,
columns_decimal_default=columns_decimal_default
)
import os, sys
is_windows = sys.platform.startswith('win')
path_directory = os.path.join("DIRECTORY_DUMMY", table_name)
if is_windows:
path_directory = path_directory.replace("\\", "/")
df = spark.read.parquet(path_directory)
df.show2(10)
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_dummy_tools-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7af5f71c673f78a92945ed75cad10eb94282022d5f31a69b24977d806ca3eebb |
|
MD5 | 1a6874ad6a04c0c88a525245219e4b9b |
|
BLAKE2b-256 | be41cd688d714c4bac45b1cafe4a0826d21a8d6b905eb20e57821fc82112af46 |