-
Notifications
You must be signed in to change notification settings - Fork 0
Libcal Training Events Import
We are using the built in Drupal Migration API to import data about training that will occur in the future and training that has previously occurred.
We have two migrations CSV and RSS. Past events are retrieved from libcal in CSV format. Future events are retrieved from libcal in RSS format.
We will run a one time import of past events when we set the system up using the CSV migration. Upload the csv to the server you are running this on. It will likely be staging and the database will be copied to prod.
cd /var/www/researchdata/current
drush config:status # make sure the status is in sync
sudo -u nginx vi sites/default/config/migrate_plus.migration.event_csv_importer.yml # change line 13 to the file location
drush config:import
drush migrate:import -y event_csv_importer
This should run a migration and import data from a CSV file that has been uploaded to the server.
We will run a migration hourly via cron to pick up the latest rss events with the following command. Note:
The locations fields in libcal is required for this data to display properly.
10 * * * * sudo -u nginx /var/www/researchdata/current/vendor/bin/drush migrate:import -y event_rss_importer