Skip to main content

Formats spark schema output into a schema definition

Project description

Summary


Sometimes when converting a Pandas DataFrame to a Spark DataFrame variables are not interpreted correctly
which can lead a programmer to have to type many lines of code and then provide the schema when building the
Spark DataFrame.

Additionally this is true for defining a Delta Table before loading your parquet files. This package contains
two functions aimed at creating these definitions which will hopefully cut down on a lot of typing and speed
up development time for the user.

Installation

pip install SparkSchemafy

Usage

from schemafy import make_spark_schema, make_delta_schema

Make a Spark DataFrame Schema from a Pandas DataFrame

make_spark_schema(str(spark.sql.DataFram().schema))

Make a delta table schema from parquet file

make_delta_schema('.parquet')

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

SparkSchemafy-0.1.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SparkSchemafy-0.1.4-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file SparkSchemafy-0.1.4.tar.gz.

File metadata

  • Download URL: SparkSchemafy-0.1.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/1.5.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for SparkSchemafy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 78403318f9b8b6e62e1f55ecc0c44185592b26abb373b0dde771982d886c3fa7
MD5 9e784a39d76cf2587ac04ef59678005b
BLAKE2b-256 6466a6b27a7bf9d693ee406bd3f350f2c40f7021cc0ed5e4bf155c9e59ba74fe

See more details on using hashes here.

File details

Details for the file SparkSchemafy-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: SparkSchemafy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/1.5.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for SparkSchemafy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3a13bc6be5feacaad7ed179ce1c90cd862dfb1dd1880113ec1d4ca703042fad9
MD5 fa1a85b9cdb7d901e3a8b7b8e730f82f
BLAKE2b-256 452923ba7a60e953d47d275781bd3275b71afba30022cd7f00f974d2dac04be9

See more details on using hashes here.

Supported by

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