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.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for realit_singer_encodings-2.1.0.tar.gz
Algorithm Hash digest
SHA256 80dba3ef656fc3134b7e4299d54769f3ed6f77255834bf76bea4125ec8ef82d4
MD5 095a1337fe63706987b0030bf08a945d
BLAKE2b-256 71d248cc4aeb8b358fb497311b071520f11db827fffcf087949a7edd892af2a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for realit_singer_encodings-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d43872a073980f7131d6baaa2a636b3dd7b37df76c649529d57ec47a8d282a7
MD5 bb16a7f9ddbb5cf3efa4bb2f68077d39
BLAKE2b-256 931e8094e866de98e74ed63485fe9d1bfc7cfa35af320a6b46924cd28455297f

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