Skip to main content

Popsink transformer

Project description

Transformer Library

This library provides a set of tools to transform Avro schemas into various formats such as JSON schema, SQL for Apache Flink, and PostgreSQL SQL. Additionally, it can transform data from these formats back into Avro schemas. Whether you're working with Avro schemas in your data pipeline or database schema, this library aims to simplify the conversion process for you.

Features

  • Convert Avro schema to JSON schema.
  • Generate SQL statements for Apache Flink based on Avro schema.
  • Generate PostgreSQL SQL statements based on Avro schema.

Usage

Here's a quick guide on how to use the library:

1. Convert Avro Schema to JSON Schema

transformer = Transformer(from_source=avro_schema)
json_schema = transformer.avro_to_json.convert()
print(json_schema)

2. Generate SQL for Apache Flink

transformer = Transformer(
    from_source=avro_schema,
    sql_type=SqlType.FLINK,
)
flink_sql = transformer.avro_to_sql.convert()
print(flink_sql)

3. Generate PostgreSQL SQL

transformer = Transformer(
    from_source=avro_schema,
    sql_type=SqlType.POSTGRES,
)
postgres_sql = transformer.avro_to_sql.convert()
print(postgres_sql)

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

popsink_transformer-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

popsink_transformer-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file popsink_transformer-0.1.0.tar.gz.

File metadata

  • Download URL: popsink_transformer-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.5 Darwin/23.2.0

File hashes

Hashes for popsink_transformer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a54200053f061d3cca8442d48426f85e8f5c19d05d6102a7632caf8305c01e45
MD5 e17575584c81151960c650e7de97711b
BLAKE2b-256 345499779c51ad356b0aace20a18875a807698b2fe8595e2a2f682032c8aab58

See more details on using hashes here.

File details

Details for the file popsink_transformer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for popsink_transformer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2bf7c00211e59e07fe8447f61e24f840abed6df4b99661cbe80e8d22d7d6e74
MD5 0e9f520e396960acfa4826201a996a7b
BLAKE2b-256 ff2032155c1cb22d2d0c8de753f41e824afa6577025f20d421fed2a455d1d136

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