Skip to main content

Converts a dataset based on a specific schema

Project description

Tests

ckanext-transmute

Pipeline for data validation and conversion using schemas.

Read the documentation for a full user guide.

Quickstart

Install the extension

pip install ckanext-transmute

Add transmute to the list of enabled plugins in the CKAN config file.

Transform data using inline schema

ckanapi action tsm_transmute root=example \
    data:'{"greeting": "hello"}' \
    schema:'{
  "root": "example",
  "types": {
    "example": {
      "fields": {
        "message": {
          "validate_missing": true,
          "validators": [
            [
              "tsm_concat",
              "$greeting",
              ", ",
              "$name",
              "!"
            ]
          ],
          "weight": 2
        },
        "name": {
          "default": "transmute"
        },
        "greeting": {
          "default": "Hi"
        }
      },
      "post-fields": {
        "greeting": {
          "remove": true
        },
        "name": {
          "remove": true
        }
      }
    }
  }
}'

Developer installation

Install the extension

git clone https://github.com/DataShades/ckanext-transmute.git
cd ckanext-transmute
pip install -e '.[dev]'

Run tests

pytest

License

AGPL

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

ckanext_transmute-2.1.1.tar.gz (32.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ckanext_transmute-2.1.1-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ckanext_transmute-2.1.1.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ckanext_transmute-2.1.1.tar.gz
Algorithm Hash digest
SHA256 ff35b920752739d188c943fb250895135dd8d425e92845034006534170cd09da
MD5 412aa952b8f997f9db4d505e31a9d9bc
BLAKE2b-256 f87828291267cac656ebf12c5c45a0930829f2768975904ea8438714b2c91e2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ckanext_transmute-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9a3e13bb87b79c3a6d4743998d37dbe7b7982c1b0b6035a463f2865c6072b63c
MD5 c6a3e6829f9789eb8c00545d419da96a
BLAKE2b-256 79e8375b6a84bc70ed84c8e75aeedb310c8e1a55d772635e90321bcd4ac01310

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