Skip to content

Commit

Permalink
Merge pull request #10 from Senzing/issue-3.dockter.1
Browse files Browse the repository at this point in the history
Shipped with SenzingAPI 2.6.0
  • Loading branch information
docktermj authored Jun 8, 2021
2 parents c9d44b6 + 4dcf657 commit ce0cc2c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 28 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
[markdownlint](https://dlaa.me/markdownlint/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.7.0] - 2021-05-17

### Added to 1.7.0

- Shipped with SenzingAPI 2.6.0

## [1.6.0] - 2019-10-16

### Added to 1.6.0
Expand Down
53 changes: 25 additions & 28 deletions G2ConfigTables.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
import os
import json

#--optional imports
try: import pyodbc
except: pass
try: import sqlite3
except: pass

#======================
class G2ConfigTables:
#======================
Expand All @@ -33,32 +27,35 @@ def loadConfig(self, tableName):
for rowNode in tableNode:
cfgNodeEntry = {}
if tableName.upper() == 'CFG_DSRC':
cfgNodeEntry['ID'] = rowNode['DSRC_ID'];
cfgNodeEntry['DSRC_CODE'] = rowNode['DSRC_CODE'];
cfgDict[cfgNodeEntry['DSRC_CODE']] = cfgNodeEntry
cfgNodeEntry['ID'] = rowNode['DSRC_ID'];
cfgNodeEntry['DSRC_CODE'] = rowNode['DSRC_CODE'];
cfgDict[cfgNodeEntry['DSRC_CODE']] = cfgNodeEntry
elif tableName.upper() == 'CFG_ETYPE':
cfgNodeEntry['ID'] = rowNode['ETYPE_ID'];
cfgNodeEntry['ETYPE_CODE'] = rowNode['ETYPE_CODE'];
cfgDict[cfgNodeEntry['ETYPE_CODE']] = cfgNodeEntry
cfgNodeEntry['ID'] = rowNode['ETYPE_ID'];
cfgNodeEntry['ETYPE_CODE'] = rowNode['ETYPE_CODE'];
cfgDict[cfgNodeEntry['ETYPE_CODE']] = cfgNodeEntry
elif tableName.upper() == 'CFG_FTYPE':
cfgNodeEntry['ID'] = rowNode['FTYPE_ID'];
cfgNodeEntry['FTYPE_CODE'] = rowNode['FTYPE_CODE'];
cfgNodeEntry['DERIVED'] = rowNode['DERIVED'];
cfgDict[cfgNodeEntry['FTYPE_CODE']] = cfgNodeEntry
cfgNodeEntry['ID'] = rowNode['FTYPE_ID'];
cfgNodeEntry['FTYPE_CODE'] = rowNode['FTYPE_CODE'];
cfgNodeEntry['FTYPE_FREQ'] = rowNode['FTYPE_FREQ'];
cfgNodeEntry['FTYPE_EXCL'] = rowNode['FTYPE_EXCL'];
cfgNodeEntry['FTYPE_STAB'] = rowNode['FTYPE_STAB'];
cfgNodeEntry['DERIVED'] = rowNode['DERIVED'];
cfgDict[cfgNodeEntry['FTYPE_CODE']] = cfgNodeEntry
elif tableName.upper() == 'CFG_ERRULE':
cfgNodeEntry['ID'] = rowNode['ERRULE_ID'];
cfgNodeEntry['ERRULE_CODE'] = rowNode['ERRULE_CODE'];
cfgNodeEntry['REF_SCORE'] = rowNode['REF_SCORE'];
cfgNodeEntry['RTYPE_ID'] = rowNode['RTYPE_ID'];
cfgDict[cfgNodeEntry['ID']] = cfgNodeEntry
cfgNodeEntry['ID'] = rowNode['ERRULE_ID'];
cfgNodeEntry['ERRULE_CODE'] = rowNode['ERRULE_CODE'];
cfgNodeEntry['REF_SCORE'] = rowNode['REF_SCORE'];
cfgNodeEntry['RTYPE_ID'] = rowNode['RTYPE_ID'];
cfgDict[cfgNodeEntry['ID']] = cfgNodeEntry
elif tableName.upper() == 'CFG_ATTR':
cfgNodeEntry['ATTR_ID'] = rowNode['ATTR_ID'];
cfgNodeEntry['ATTR_CODE'] = rowNode['ATTR_CODE'];
cfgNodeEntry['ATTR_CLASS'] = rowNode['ATTR_CLASS'];
cfgNodeEntry['FTYPE_CODE'] = rowNode['FTYPE_CODE'];
cfgNodeEntry['FELEM_CODE'] = rowNode['FELEM_CODE'];
cfgNodeEntry['FELEM_REQ'] = rowNode['FELEM_REQ'];
cfgDict[cfgNodeEntry['ATTR_CODE']] = cfgNodeEntry
cfgNodeEntry['ATTR_ID'] = rowNode['ATTR_ID'];
cfgNodeEntry['ATTR_CODE'] = rowNode['ATTR_CODE'];
cfgNodeEntry['ATTR_CLASS'] = rowNode['ATTR_CLASS'];
cfgNodeEntry['FTYPE_CODE'] = rowNode['FTYPE_CODE'];
cfgNodeEntry['FELEM_CODE'] = rowNode['FELEM_CODE'];
cfgNodeEntry['FELEM_REQ'] = rowNode['FELEM_REQ'];
cfgDict[cfgNodeEntry['ATTR_CODE']] = cfgNodeEntry
else:
return None
return cfgDict
Expand Down

0 comments on commit ce0cc2c

Please sign in to comment.