Skip to content

normalise-measures apparently incompatible with add_computed_field #8

@jbothma

Description

@jbothma

In order to submit an issue, please ensure you can check the following. Thanks!

  • Declare which version of Python you are using (python --version)
  • Declare which operating system you are using
measures:
  currency: ZAR
  title: Amount
  mapping:
    "2013/14 Audited outcome":
      budget_phase: "Audited Outcome"
      financial_year: "2013"
    "2014/15 Audited outcome":
      budget_phase: "Audited Outcome"
      financial_year: "2014"

#deduplicate: true

postprocessing:
  - processor: add_computed_field
    parameters:
      resources: dedupe-measures-test
      fields:
        - operation: constant
          target: multiplication_factor
          with: 1000
        - operation: multiply
          source:
            - value
            - multiplication_factor
          target: value2

results in

ERROR log from processor fiscal.model:
+--------
| ERROR   :Missing OS Type for field multiplication_factor
| Traceback (most recent call last):
|   File "/home/jdb/proj/code4sa/treasury-portal/fiscal-data-package/env/src/datapackage-pipelines-fiscal/datapackage_pipelines_fiscal/processors/model.py", line 21, in <module>
|     field['type'] = os_types[field_name]
| KeyError: 'multiplication_factor'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions