Fast 48hrs!!! Topcoder - Update srms mapping In ElasticSearch Feeder

Register
Submit a solution
The challenge is finished.

Challenge Overview

For this challenge, we'd like to revise the mapping and queries for srms type. the change mainly related to 
- srms_mapping.sh
- srms_scheduler.sh

Background

For SRM(Single Round Match) related information, it is mainly created and stored in informixoltp database. 

1. contest table - group logic for SRMs, like for Topcoder Open, there can be several rounds.
2. round table - the major table for each SRM( with round_type_id as 1)
3. round_segment table - defines different phases, like Registration Phase, Coding Phases etc
following are different phases
INSERT INTO 'informix'.segment(segment_id,segment_desc) VALUES (1, 'Registration');
INSERT INTO 'informix'.segment(segment_id,segment_desc) VALUES (2, 'Coding Phase');
INSERT INTO 'informix'.segment(segment_id,segment_desc) VALUES (3, 'Intermission Phase');
INSERT INTO 'informix'.segment(segment_id,segment_desc) VALUES (4, 'Challenge Phase');
INSERT INTO 'informix'.segment(segment_id,segment_desc) VALUES (5, 'System Test Phase');
INSERT INTO 'informix'.segment(segment_id,segment_desc) VALUES (6, 'Moderated Chat Phase');
INSERT INTO 'informix'.segment(segment_id,segment_desc) VALUES (7, 'Room Assignment Phase');
Change Requirements

1. Change Mappings
we'd like to update the mapping to include the following information and its corresponding field

id -  round.id
name - round.name
status - round.status
invitational - round.invitational
forumId - round.forum_id
directProjectId - round.tc_direct_project_id
directProjectName - query from tc_direct_project table by using round.tc_direct_project_id
isRated - round.rated_ind
registrationStartAt - query from round_segment table with round_id and segment_id as 1
registrationEndAt - query from round_segment table with round_id and segment_id as 1
codingStartAt - query from round_segment table with round_id and segment_id as 2
codingEndAt - query from round_segment table with round_id and segment_id as 2
systemTestStartAt - query from round_segment table with round_id and segment_id as 5
systemTestEndAt - query from round_segment table with round_id and segment_id as 5
track - Data Science
subTrack - SRM
registrants - query from round_registration table, should include the userId and userHandle properties.
languages - query from round_language table
createdBy - round.creator_id

2. Update the Queries in srm_scheduler.sh to retrieve the information needed in the mapping

3. Verify that the elaticsearch feeder is working properly

Final Submission Guidelines

- Changes to the docker-elasticsearch-feeder repo
- Clear Verification Steps for verifying the srms data are feeded into the elasticsearch service.

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30057537