Module: Kiba::Extend::Transforms
- Defined in:
- lib/kiba/extend/transforms.rb,
lib/kiba/extend/transforms/copy.rb,
lib/kiba/extend/transforms/marc.rb,
lib/kiba/extend/transforms/name.rb,
lib/kiba/extend/transforms/sort.rb,
lib/kiba/extend/transforms/take.rb,
lib/kiba/extend/transforms/warn.rb,
lib/kiba/extend/transforms/clean.rb,
lib/kiba/extend/transforms/count.rb,
lib/kiba/extend/transforms/merge.rb,
lib/kiba/extend/transforms/split.rb,
lib/kiba/extend/transforms/append.rb,
lib/kiba/extend/transforms/cspace.rb,
lib/kiba/extend/transforms/delete.rb,
lib/kiba/extend/transforms/rename.rb,
lib/kiba/extend/transforms/allable.rb,
lib/kiba/extend/transforms/compare.rb,
lib/kiba/extend/transforms/explode.rb,
lib/kiba/extend/transforms/extract.rb,
lib/kiba/extend/transforms/helpers.rb,
lib/kiba/extend/transforms/prepend.rb,
lib/kiba/extend/transforms/replace.rb,
lib/kiba/extend/transforms/reshape.rb,
lib/kiba/extend/transforms/collapse.rb,
lib/kiba/extend/transforms/fraction.rb,
lib/kiba/extend/transforms/ms_access.rb,
lib/kiba/extend/transforms/copy/field.rb,
lib/kiba/extend/transforms/deduplicate.rb,
lib/kiba/extend/transforms/filter_rows.rb,
lib/kiba/extend/transforms/fingerprint.rb,
lib/kiba/extend/transforms/rename/field.rb,
lib/kiba/extend/transforms/string_value.rb,
lib/kiba/extend/transforms/delete/fields.rb,
lib/kiba/extend/transforms/rename/fields.rb,
lib/kiba/extend/transforms/combine_values.rb,
lib/kiba/extend/transforms/fingerprint/add.rb,
lib/kiba/extend/transforms/single_warnable.rb,
lib/kiba/extend/transforms/deduplicate/flag.rb,
lib/kiba/extend/transforms/marc/extract_ids.rb,
lib/kiba/extend/transforms/sep_deprecatable.rb,
lib/kiba/extend/transforms/append/nil_fields.rb,
lib/kiba/extend/transforms/deduplicate/table.rb,
lib/kiba/extend/transforms/clean/strip_fields.rb,
lib/kiba/extend/transforms/count/field_values.rb,
lib/kiba/extend/transforms/deduplicate/fields.rb,
lib/kiba/extend/transforms/fingerprint/decode.rb,
lib/kiba/extend/transforms/warn/uneven_fields.rb,
lib/kiba/extend/transforms/action_argumentable.rb,
lib/kiba/extend/transforms/delete/empty_fields.rb,
lib/kiba/extend/transforms/fraction/to_decimal.rb,
lib/kiba/extend/transforms/marc/field_linkable.rb,
lib/kiba/extend/transforms/marc/filter_records.rb,
lib/kiba/extend/transforms/name/split_inverted.rb,
lib/kiba/extend/transforms/sort/by_field_value.rb,
lib/kiba/extend/transforms/compare/field_values.rb,
lib/kiba/extend/transforms/cspace/convert_to_id.rb,
lib/kiba/extend/transforms/deduplicate/flag_all.rb,
lib/kiba/extend/transforms/delete/fields_except.rb,
lib/kiba/extend/transforms/merge/constant_value.rb,
lib/kiba/extend/transforms/reshape/simple_pivot.rb,
lib/kiba/extend/transforms/append/to_field_value.rb,
lib/kiba/extend/transforms/merge/constant_values.rb,
lib/kiba/extend/transforms/string_value/to_array.rb,
lib/kiba/extend/transforms/cspace/address_country.rb,
lib/kiba/extend/transforms/marc/extract_245_title.rb,
lib/kiba/extend/transforms/marc/extract_name_data.rb,
lib/kiba/extend/transforms/merge/multi_row_lookup.rb,
lib/kiba/extend/transforms/prepend/to_field_value.rb,
lib/kiba/extend/transforms/clean/even_field_values.rb,
lib/kiba/extend/transforms/cspace/normalize_for_id.rb,
lib/kiba/extend/transforms/filter_rows/with_lambda.rb,
lib/kiba/extend/transforms/deduplicate/field_values.rb,
lib/kiba/extend/transforms/fingerprint/flag_changed.rb,
lib/kiba/extend/transforms/helpers/org_name_checker.rb,
lib/kiba/extend/transforms/delete/empty_field_groups.rb,
lib/kiba/extend/transforms/delete/empty_field_values.rb,
lib/kiba/extend/transforms/marc/filter_records/by_id.rb,
lib/kiba/extend/transforms/marc/language_code_lookup.rb,
lib/kiba/extend/transforms/merge/compare_fields_flag.rb,
lib/kiba/extend/transforms/merge/multivalue_constant.rb,
lib/kiba/extend/transforms/combine_values/full_record.rb,
lib/kiba/extend/transforms/filter_rows/field_equal_to.rb,
lib/kiba/extend/transforms/helpers/delim_only_checker.rb,
lib/kiba/extend/transforms/helpers/field_value_getter.rb,
lib/kiba/extend/transforms/marc/extract_org_name_data.rb,
lib/kiba/extend/transforms/replace/empty_field_values.rb,
lib/kiba/extend/transforms/filter_rows/field_populated.rb,
lib/kiba/extend/transforms/fingerprint/merge_corrected.rb,
lib/kiba/extend/transforms/helpers/person_name_checker.rb,
lib/kiba/extend/transforms/marc/extract_base_name_data.rb,
lib/kiba/extend/transforms/split/into_multiple_columns.rb,
lib/kiba/extend/transforms/split/publication_statement.rb,
lib/kiba/extend/transforms/warn/if_field_value_matches.rb,
lib/kiba/extend/transforms/prepend/field_to_field_value.rb,
lib/kiba/extend/transforms/count/matching_rows_in_lookup.rb,
lib/kiba/extend/transforms/marc/extract_person_name_data.rb,
lib/kiba/extend/transforms/clean/ensure_consistent_fields.rb,
lib/kiba/extend/transforms/cspace/flag_invalid_characters.rb,
lib/kiba/extend/transforms/filter_rows/field_match_regexp.rb,
lib/kiba/extend/transforms/helpers/field_evenness_checker.rb,
lib/kiba/extend/transforms/marc/extract_meeting_name_data.rb,
lib/kiba/extend/transforms/append/converted_value_and_unit.rb,
lib/kiba/extend/transforms/delete/fieldnames_starting_with.rb,
lib/kiba/extend/transforms/marc/filter_records/with_lambda.rb,
lib/kiba/extend/transforms/warn/unless_field_value_matches.rb,
lib/kiba/extend/transforms/deduplicate/grouped_field_values.rb,
lib/kiba/extend/transforms/explode/rows_from_multival_field.rb,
lib/kiba/extend/transforms/filter_rows/all_fields_populated.rb,
lib/kiba/extend/transforms/filter_rows/any_fields_populated.rb,
lib/kiba/extend/transforms/merge/constant_value_conditional.rb,
lib/kiba/extend/transforms/multival_plus_delim_deprecatable.rb,
lib/kiba/extend/transforms/marc/extract_subfields_from_field.rb,
lib/kiba/extend/transforms/delete/delimiter_only_field_values.rb,
lib/kiba/extend/transforms/delete/field_value_matching_regexp.rb,
lib/kiba/extend/transforms/collapse/fields_to_typed_field_pair.rb,
lib/kiba/extend/transforms/clean/regexp_find_replace_field_vals.rb,
lib/kiba/extend/transforms/collapse/fields_with_custom_fieldmap.rb,
lib/kiba/extend/transforms/delete/field_value_containing_string.rb,
lib/kiba/extend/transforms/fingerprint/delimiter_in_value_error.rb,
lib/kiba/extend/transforms/name/convert_inverted_to_direct_form.rb,
lib/kiba/extend/transforms/fingerprint/delimiter_collision_error.rb,
lib/kiba/extend/transforms/replace/field_value_with_static_mapping.rb,
lib/kiba/extend/transforms/delete/field_value_if_equals_other_field.rb,
lib/kiba/extend/transforms/collapse/fields_to_repeatable_field_group.rb,
lib/kiba/extend/transforms/combine_values/from_fields_with_delimiter.rb,
lib/kiba/extend/transforms/explode/rows_from_grouped_multival_fields.rb,
lib/kiba/extend/transforms/replace/norm_with_most_frequently_used_form.rb,
lib/kiba/extend/transforms/reshape/fields_to_field_group_with_constant.rb
Overview
Namespace for modules that organize Kiba transforms.
Note that a Kiba transform is just a class that implements a public
process
method that takes a row as its parameter and returns the
transformed row.
Because all Kiba transforms require this, that method is commented as “private” for the sake of creating non-repetitive documentation.
Notes on commonly used parameters in tranforms
fields
Expects an Array of field names. The field names should be Symbols unless you have overridden the default CSV converter which symbolizes header values.
transform My::Transform, fields: %i[title author]
Since 2.5.2, you may also pass a single Symbol and it will be wrapped in an Array for you automagically.
transform My::Transform, fields: :title
If a transform mixes in Allable, then you can specify that it should be applied to all fields:
transform My::Transform, fields: :all
Defined Under Namespace
Modules: ActionArgumentable, Allable, Append, Clean, Collapse, CombineValues, Compare, Copy, Count, Cspace, Deduplicate, Delete, Explode, Extract, FilterRows, Fingerprint, Fraction, Helpers, Marc, Merge, MsAccess, MultivalPlusDelimDeprecatable, Name, Prepend, Rename, Replace, Reshape, SepDeprecatable, SingleWarnable, Sort, Split, StringValue, Take, Warn