Conversation
|
Review app deployed to https://cpd-ec2-review-1976-web.test.teacherservices.cloud |
dc4477d to
964f973
Compare
This reverts commit 57c48ab.
964f973 to
81cfdee
Compare
- lint - rename :event_type for claims/releases - remove insertion of :local_authority_code and :establishment_number now in GIAS::School - rename :legacy_id to :dqt_id
81cfdee to
5af3b49
Compare
| require "csv" | ||
|
|
||
| module AppropriateBodies::Importers | ||
| class AppropriateBodyImporter |
There was a problem hiding this comment.
This isn't really an Importer, as it doesn't write anything? The import is done exclusively by the Importer class.
This class just provides the data to be imported, as such should, it might be more intention revealing if this class was named something like AppropriateBodyData? or if we wanted to be totally explicit AppropriateBodyFilteredImportData?
| @trns_with_induction_periods = @induction_periods_grouped_by_trn.keys | ||
| @teacher_importer_rows = TeacherImporter.new(teachers_csv, @trns_with_induction_periods).rows_with_wanted_statuses | ||
|
|
||
| @active_abs = @induction_periods_grouped_by_trn.flat_map { |_trn, ips| ips.map(&:legacy_appropriate_body_id) }.uniq |
There was a problem hiding this comment.
It looks like @active_absis @unique_legacy_appropriate_bodies?
|
|
||
| def import_ab_rows | ||
| Rails.logger.info("Active appropriate bodies: #{@active_abs.count}") | ||
| AppropriateBody.insert_all!(@ab_importer_rows.select { |r| r.dqt_id.in?(@active_abs) }.map(&:to_h)) |
There was a problem hiding this comment.
Should we not be filtering the @ab_importer_rows in the AppropriateBodyImporter as it already has the@active_abs to filter on?
- disable importing admin users
|
| @@ -0,0 +1,41 @@ | |||
| appropriate_body_csv = Rails.root.join("tmp/import/appropriatebody.csv") # 537 | |||
| teachers_csv = Rails.root.join("tmp/import/teachers.csv") # 1_799_170 | |||
| @@ -0,0 +1,41 @@ | |||
| appropriate_body_csv = Rails.root.join("tmp/import/appropriatebody.csv") # 537 | |||
| teachers_csv = Rails.root.join("tmp/import/teachers.csv") # 1_799_170 | |||
| induction_period_csv = Rails.root.join("tmp/import/inductionperiods.csv") # 829_189 | |||
| appropriate_body_csv = Rails.root.join("tmp/import/appropriatebody.csv") # 537 | ||
| teachers_csv = Rails.root.join("tmp/import/teachers.csv") # 1_799_170 | ||
| induction_period_csv = Rails.root.join("tmp/import/inductionperiods.csv") # 829_189 | ||
| dfe_sign_in_mapping_csv = Rails.root.join("tmp/import/dfe-sign-in-mappings.csv") # 86 |
| teachers_csv = Rails.root.join("tmp/import/teachers.csv") # 1_799_170 | ||
| induction_period_csv = Rails.root.join("tmp/import/inductionperiods.csv") # 829_189 | ||
| dfe_sign_in_mapping_csv = Rails.root.join("tmp/import/dfe-sign-in-mappings.csv") # 86 | ||
| admin_csv = Rails.root.join("tmp/import/admins.csv") # 30 |
| induction_period_csv = Rails.root.join("tmp/import/inductionperiods.csv") # 829_189 | ||
| dfe_sign_in_mapping_csv = Rails.root.join("tmp/import/dfe-sign-in-mappings.csv") # 86 | ||
| admin_csv = Rails.root.join("tmp/import/admins.csv") # 30 | ||
| cutoff_csv = Rails.root.join("tmp/import/old-abs.csv") # 433 |



Context
Second round of imported data into RIAB.
Considerations:
Changes proposed in this pull request
Guidance to review
TBC