jobs/json_job.rb in remi-0.2.37 vs jobs/json_job.rb in remi-0.2.38
- old
+ new
@@ -16,15 +16,11 @@
}
define_transform :main do
Remi::SourceToTargetMap.apply(source_data.df, target_data.df, source_metadata: source_data.fields) do
map source(:json_array) .target(:second_element)
- .transform(->(*values) { values[1] })
- # This is NOT the way I would like it to work, but we need to do some work on STTM first
+ .transform(->(values) { values[1] })
map source(:json_hash) .target(:name_field)
- .transform(->(*json_hash) { json_hash.to_h['name'] })
- # preferred
-# map source(:json_hash) .target(:name_field)
-# .transform(->(json_hash) { json_hash['name'] })
+ .transform(->(json_hash) { json_hash['name'] })
end
end
end