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.2.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.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: SparkSchemafy-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 02bf3ab48b3b45eb096836d479ca96f143a1def1c7abac5f5ce389f62e12e563
MD5 fea7c78ca9011ecdc755cb2076dd6b0e
BLAKE2b-256 f73ba03f5b409f37463ac69872ea7a47bed00dd5fda7a1ac3cac2bbb1890cb00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: SparkSchemafy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20bb9f10b9434bde44f6dd24c6c618b943710552d4992de7ab0fd2f830b1a999
MD5 b79b61535201a69cdc7ccc69bed0e8bd
BLAKE2b-256 5649d06cc4ef01c45bb9877cb39f6767ad49c294ba6c8220b079f723f9a41a4c

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