Skip to main content

spark_dummy_tools

Project description

spark_dummy_tools

Github License Updates Python 3 Code coverage

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

Apache License 2.0.

New features v1.0

BugFix

  • choco install visualcpp-build-tools

Reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spark_dummy_tools-0.8.3.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

spark_dummy_tools-0.8.3-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

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

Hashes for spark_dummy_tools-0.8.3.tar.gz
Algorithm Hash digest
SHA256 dd252be9f269d79db72718c8e38846b998b0433da97b9b965c4084fb0be90de2
MD5 33386304c14d59ab4af87cfddf3dbd0f
BLAKE2b-256 2fb94a8ade7df9fe73969c90c1e1d1943c04de0c7bf9fd01af1c4ffef9dc2b34

See more details on using hashes here.

File details

Details for the file spark_dummy_tools-0.8.3-py3-none-any.whl.

File metadata

File hashes

Hashes for spark_dummy_tools-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 09425cc53343462c38f7864e31f04fe42252db910592e4eea7745464044221db
MD5 52fe8a79b4ac636fc3befaa4ef4db4cd
BLAKE2b-256 bca5b2aa8aed2547cb3f99af01b64834ec870509042baa98af275e32c03d9149

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page