You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "Morgan Emery (JIRA)" <ji...@apache.org> on 2016/05/16 16:38:12 UTC

[jira] [Commented] (METRON-160) Create Lenel Badge Parser

    [ https://issues.apache.org/jira/browse/METRON-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15284803#comment-15284803 ] 

Morgan Emery commented on METRON-160:
-------------------------------------

I will be working on this ticket. I plan to submit it later this week or next.

> Create Lenel Badge Parser
> -------------------------
>
>                 Key: METRON-160
>                 URL: https://issues.apache.org/jira/browse/METRON-160
>             Project: Metron
>          Issue Type: New Feature
>            Reporter: Morgan Emery
>            Priority: Minor
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Create a parser for Lenel Badge Data. Lenel Badge data uses shorthand field names, so field names should be changed to human-readable and Metron-friendly equivalents. 
> Note: Lenel Badge data is retrieved by a database connection, so the required fields can be retrieved in any order and parsed accordingly. 
> Below is a sample data query, sample data response, and the expected parsed output.
> Example Lenel Badge query: 
> SELECT PANEL_ID,PANEL_EVT_ID,BLDG_NUM,BLDG_NM,BLDG_USGE_DESC,BLDG_DEPT_ID,BLDG_SPACE_PLANR_NM,BLDG_STR_ADR_TXT,BLDG_CITY_NM,BLDG_ST_NM,BLDG_PSTL_CD,CNTRY_NM,BADGE_ID,BADGE_TYPE_DESC,BADGE_STAT_DESC,BADGE_HOLDR_FRST_NM,BADGE_HOLDR_MID_NM,BADGE_HOLDR_LAST_NM,BADGE_HOLDR_TYPE_DESC,EMP_ENT_USER_ID,SUPVR_ENT_USER_ID,SUPVR_FRST_NM,SUPVR_MID_NM,SUPVR_LAST_NM,EMP_DEPT_ID,EMP_DEPT_NM,PRSNL_TYPE_CD,REG_TEMP_TYPE_CD,FULL_TM_PART_TM_TYPE_CD,EVT_TYPE_DESC,EVT_TS,EVT_LOCL_DT,EVT_LOCL_HOUR_NUM,EVT_LOCL_WEEK_NUM,EVT_LOCL_DAY_NM,EVT_LOCL_DAY_HOL_IND,EMP_FRST_DLY_CMPS_SWIPE_IND,EMP_FRST_UNQ_CMPS_SWIPE_IND,WPSDW_PUBLN_ID FROM "PWPSDW"."PL_ACCS_PANEL_EVT" WHERE EVT_LOCL_DT = date - (interval '004' day) 
> Sample Lenel Badge data record: 
> <13> server01.data.com "2016-04-07 17:44:56" PANEL_ID="87223", PANEL_EVT_ID="3458831671", BLDG_NUM="182", BLDG_NM="Kathryn Janeway", BLDG_USGE_DESC="COMMAND", BLDG_DEPT_ID="12421", BLDG_SPACE_PLANR_NM="Tom Paris", BLDG_STR_ADR_TXT=" 24593 Federation Drive", BLDG_CITY_NM="San Francisco", BLDG_ST_NM="CA", BLDG_PSTL_CD="12345", CNTRY_NM="USA", BADGE_ID="123456", BADGE_TYPE_DESC="Associate", BADGE_STAT_DESC="Active", BADGE_HOLDR_FRST_NM="James", BADGE_HOLDR_MID_NM="Tiberius", BADGE_HOLDR_LAST_NM="Kirk", BADGE_HOLDR_TYPE_DESC="Associate", EMP_ENT_USER_ID="JTK578", SUPVR_ENT_USER_ID="JLP626", SUPVR_FRST_NM="Jean", SUPVR_MID_NM="Luc", SUPVR_LAST_NM="Picard", EMP_DE PT_ID="27159", EMP_DEPT_NM="MN - Processing", PRSNL_TYPE_CD="E", REG_TEMP_TYPE_CD="R", FULL_TM_PART_TM_TYPE_CD="F", EVT_TYPE_DESC="Access Granted", EVT_TS="2016-04-07 17:44:56.0", EVT_LOCL_DT="2016-04-07", EVT_LOCL_HOUR_NUM="12", EV T_LOCL_WEEK_NUM="14", EVT_LOCL_DAY_NM="THURSDAY", EVT_LOCL_DAY_HOL_IND="N", EMP_FRST_DLY_CMPS_SWIPE_IND="N", EMP_FRST_UNQ_CMPS_SWIPE_IND="N", WPSDW_PUBLN_ID="20160410220230" 
> Data after parsing Lenel Badge data record: 
> {
> 	"priority": "13",
> 	"panel_id": "87223",
> 	"panel_event_id": "3458831671",
> 	"building_number": "182",
> 	"building_name": "Kathryn Janeway",
> 	"building_usage_description": "COMMAND",
> 	"building_department_id": "12421",
> 	"building_space_planner_name": "Tom Paris",
> 	"building_street_address":  "24593 Federation Drive",
> 	"building_city_name": "San Francisco",
> 	"building_state_name": "CA",
> 	"building_postal_code": "12345",
> 	"building_country_name": "USA",
> 	"badge_id": "123456",
> 	"badge_type_description": "Associate",
> 	"badge_ status_description": "Active",
> 	"badge_holder_first_name": "James",
> 	"badge_holder_middle_name": "Tiberius",
> 	"badge_holder_last_name": "Kirk",
> 	"badge_holder_type_description": "Associate",
> 	"user_id": "JTK578",
> 	"supervisor_user_id": "JLP626",
> 	"supervisor_first_name": "Jean",
> 	"supervisor_middle_name": "Luc",
> 	"supervisor_last_name": "Picard",
> 	"employee_department_id": "27159",
> 	"employee_department_name": "MN - Processing",
> 	"personnel_type_code": "E",
> 	"regular_temp_type_code": "R",
> 	"full_time_part_time_type_code": "F",
> 	"event_type_description": "Access Granted",
> 	"timestamp": "2016-04-07 17:44:56.0 UTC",
> 	"event_local_date": "2016-04-07",
> 	"event_local_hour_num": "12",
> 	"event_local_week_num": "14",
> 	"event_local_day_name": "THURSDAY",
> 	"event_local_day_holiday_indicator": "N",
> 	"emp_first_dly_cmps_swipe_ind": "N",
> 	"emp_first_unq_cmps_swipe_ind": "N",
> 	"wpsdw_publn_id": "20160410220230"
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)