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.2.tar.gz (32.6 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.2-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ckanext_transmute-2.1.2.tar.gz
  • Upload date:
  • Size: 32.6 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.2.tar.gz
Algorithm Hash digest
SHA256 19f61660cd7515f9e9b48a2b27f07ee3c05bd748187b2050ccce8595704a4526
MD5 44c512dc09c0c736bab9ce859b80a26c
BLAKE2b-256 d330af9c8d73a7d9429a942c86ab09c95b7abc75120ce5b21556e37a1431207e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ckanext_transmute-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 514287e6346bbd1cdf32c41226701cb9095abbd79c57f6ba587ee3765016780f
MD5 b8ccab624fe1a82258b85904ccade94d
BLAKE2b-256 a0dbc25663533b2e8f51a875d36ee3fd59cf094e05787f232df337545c8a1d75

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