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-1.8.0.tar.gz (30.1 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-1.8.0-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ckanext_transmute-1.8.0.tar.gz
Algorithm Hash digest
SHA256 8b60642a14f2ff569d0b87541e405ced23dd0a36011c92677f3c074a7008632b
MD5 80fe10c529d88dc680f07f118b52bfca
BLAKE2b-256 87218c64c37a43f34e2302ac0e22e216c360095b8c03dee4cabfd701e340beed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ckanext_transmute-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85e90432d73be81750355cda94ba6c21c7b72fa6776819b8bb5e2cf775ce68d5
MD5 282f6586c964703f89f2682dcb38bdd9
BLAKE2b-256 849738ea7d0fec656d7f701a2fdf25b13885b82a79c46388b74f0e1f1573cdf2

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