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

Uploaded Python 3

File details

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

File metadata

  • Download URL: SparkSchemafy-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 ce322b59b228bd53628f03dea6e0157c767e90b67a58fb8660aab1b2fdef5490
MD5 a8abaeb55fbb1eda91bdb6cea323514c
BLAKE2b-256 3d6bd1c7db426858c3c4fb1892107d449e02b74af80bc104c5cff8c3a2756b52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: SparkSchemafy-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d80223d900348c43f6bf0603beb1c02639520f3a40a4de21d36b0c28e1564f79
MD5 ad1f46bf620aa265595cb30cb684875a
BLAKE2b-256 b8d4033d6624dcaca725487fd0f0b32b16a97a4fc23b74cb856d4ac8c1cbba9a

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