Skip to main content

Singer.io encodings library - PipelineWise and Meltano compatible

Project description

realit-singer-encodings

PyPI version PyPI - Python Version License: MIT

Writes the Singer format from Python.

This is a fork of Singer's singer-encodings made for PipelineWise and Meltano.

Usage

Setup environment

This library depends on python3. We recommend using a virtualenv like this:

python3 -m venv ~/.virtualenvs/realit-singer-encodings

Installation

Next, install this library:

source ~/.virtualenvs/realit-singer-encodings/bin/activate
git clone http://github.com/s7clarke10/realit-singer-encodings
cd realit-singer-encodings
pip install .

Usage example

This package is used by tap-s3-csv. One of the key configurable items is the table field. The table field consists of one or more objects, that describe how to find files and emit records. A more detailed (and unescaped) example below:

[
    {
        "search_prefix": "exports"
        "search_pattern": "my_table\\/.*\\.csv",
        "table_name": "my_table",
        "key_properties": ["id"],
        "date_overrides": ["created_at"],
        "delimiter": ",",
        "guess_types": true,
        "string_overrides": ["field_1","field_2"],
        "remove_character": "\""
    },
    ...
]

The following specific settings influence the behaviour of the singer-encodings package.

  • string_overrides: Specifies field names in the files that should be parsed as a string regardless of what was discovered.
  • guess_types: (default true) By default, column data types will be determined via scanning the first file in a table_spec. Set this to false to disable this and set all columns to string.
  • remove_character: Specifies a character which can be removed from each line in the the file e.g. "\"" will remove all double-quotes.
  • encoding: The encoding to use to read these files from codecs -> Standard Encodings

Developer Resources

Initialize your Development Environment

pip install poetry
poetry install

Create and Run Tests

Create tests within the tests/ directory and then run:

poetry run pytest

or

poetry run coverage run --parallel -m pytest

Continuous Integration

Run through the full suite of tests and linters by running

poetry run tox

These must pass in order for PR's to be merged.

License

Distributed under the Apache License Version 2.0

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

realit_singer_encodings-2.1.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

realit_singer_encodings-2.1.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file realit_singer_encodings-2.1.1.tar.gz.

File metadata

File hashes

Hashes for realit_singer_encodings-2.1.1.tar.gz
Algorithm Hash digest
SHA256 c564f2403e2bc74c7df83f805faa6cb508ca620b41f787c62c6f0473e313974c
MD5 936d1cb6f8cd9a9d07a10f7434ed0efc
BLAKE2b-256 9fb83dae8dc8715619846e7dd233a940da4bf4ccc1eab04c427c07caba461593

See more details on using hashes here.

File details

Details for the file realit_singer_encodings-2.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for realit_singer_encodings-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eb813537b4660a59de0e3f9ad8086759c72e1a8bd4e69cafef8289f510e90e44
MD5 2f46e93e45428d6227252ba2df697113
BLAKE2b-256 c2040d9a50de0a9213d08cf3c46c62421a42434faa2ee6e11205ecab33b6fe6d

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