Skip to content

Commit fd72614

Browse files
Fix enriched value ingestion error and also save the original value
1 parent 7c0d102 commit fd72614

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/models/enrichment.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ class PocRecord < ActiveRecord::Base # rubocop:disable Rails/ApplicationRecord
88

99
class Enrichment < PocRecord
1010
serialize :enriched_value, coder: JSON
11+
serialize :original_value, coder: JSON
1112
end

db/enrichments.sqlite3

380 KB
Binary file not shown.

lib/tasks/enrichment.rake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,16 @@ namespace :enrichment do
6464
data.each do |item|
6565
count += 1
6666

67-
break if count == 1001
67+
break if count == 2001
6868

6969
enrichment = Enrichment.new(
7070
doi: item["doi"],
7171
source: "COMET",
72-
process: "10.000/FAKE.PROCESS",
72+
process: "10.0000/FAKE.PROCESS",
7373
field: "types",
7474
action: "update",
75-
enriched_value: item["currentTypes"],
75+
original_value: item["currentTypes"],
76+
enriched_value: item["reclassifiedTypes"],
7677
created: Time.current.utc,
7778
updated: Time.current.utc,
7879
produced: Time.current.utc - 5.days,

0 commit comments

Comments
 (0)