mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
rake data:load_survey_responses loads all csv files in the data/survey_responses/ directory
This commit is contained in:
parent
d6fddb9f7b
commit
0dbe05817e
3 changed files with 1 additions and 3 deletions
|
Can't render this file because it is too large.
|
|
Can't render this file because it is too large.
|
|
|
@ -38,9 +38,7 @@ namespace :data do
|
|||
|
||||
desc "load survey responses"
|
||||
task load_survey_responses: :environment do
|
||||
survey_groups = %w(2020-21_teacher 2020-21_student)
|
||||
survey_groups.each do |survey_group|
|
||||
filepath = Rails.root.join('data', 'survey_results', "#{survey_group}_survey_responses.csv")
|
||||
Dir.glob(Rails.root.join('data', 'survey_responses', '*.csv')).each do |filepath|
|
||||
puts "=====================> Loading data from csv at path: #{filepath}"
|
||||
SurveyResponsesDataLoader.load_data filepath: filepath
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue