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"}
partition_colum=["gf_cutoff_date"]
generated_dummy_table_datum(spark=spark,
path=path,
table_name=table_name,
storage_zone=storage_zone,
sample_parquet=sample_parquet,
partition_colum=partition_colum
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
============================================================
sample_parquet = 10
table_name = ""
env = "work"
phase = "master"
code_country = "pe"
is_uuaa_tag = False
is_sandbox = False
token_artifactory = ""
partition_colum = None
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,
table_name=table_name,
env=env,
phase=phase,
code_country=code_country,
is_uuaa_tag=is_uuaa_tag,
is_sandbox=is_sandbox,
token_artifactory=token_artifactory,
partition_colum=partition_colum,
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
File details
Details for the file spark_dummy_tools-0.8.3.tar.gz
.
File metadata
- Download URL: spark_dummy_tools-0.8.3.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd252be9f269d79db72718c8e38846b998b0433da97b9b965c4084fb0be90de2 |
|
MD5 | 33386304c14d59ab4af87cfddf3dbd0f |
|
BLAKE2b-256 | 2fb94a8ade7df9fe73969c90c1e1d1943c04de0c7bf9fd01af1c4ffef9dc2b34 |
File details
Details for the file spark_dummy_tools-0.8.3-py3-none-any.whl
.
File metadata
- Download URL: spark_dummy_tools-0.8.3-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09425cc53343462c38f7864e31f04fe42252db910592e4eea7745464044221db |
|
MD5 | 52fe8a79b4ac636fc3befaa4ef4db4cd |
|
BLAKE2b-256 | bca5b2aa8aed2547cb3f99af01b64834ec870509042baa98af275e32c03d9149 |