Skip to content

Instantly share code, notes, and snippets.

@vshank77
Last active December 18, 2015 00:39
Show Gist options
  • Select an option

  • Save vshank77/5698670 to your computer and use it in GitHub Desktop.

Select an option

Save vshank77/5698670 to your computer and use it in GitHub Desktop.
Graphanomy Data-sources
type: map
desc: Graphonomy Datasource Schema
mapping:
"datasource":
type: map
required: true
mapping:
"definition":
type: map
required: true
mapping:
"source-name": { type: str, required: true }
"source-type":
type: seq
sequence:
- { type: str, required: true, enum: [ database, webservice, messaging, proprietary ] }
"source-parent": { type: str }
"version": { type: str, required: true }
"merge": { type: bool, default: false }
"types":
type: seq
sequence:
- &fieldType
type: map
mapping:
"type": { type: str, required: true, enum: [ str, int, long, double, datetime, bool ] }
"required": { type: bool, default: false }
"pattern": { type: str }
"length":
type : map
mapping:
"min": { type: int }
"max": { type: int }
"range":
type : map
mapping:
"min": { type: int }
"max": { type: int }
"enum":
type : seq
sequence:
- type: str
"unique": { type: bool, default: false }
"fields":
type: seq
required: true
sequence:
- type: map
mapping:
"field-id": { type: str, required: true, unique: true }
"source-field": { type: str }
"display-name": { type: str }
"nested": { type: bool, default: false }
"field-type": *fieldType
"properties":
type: seq
sequence:
- type: map
mapping:
"name": { type: str, required: true }
"value": { type: str }
datasource:
definition:
source-name: client
source-type: [ database, messaging ]
version: 1.0-ALPHA
types:
- &Id
type: str
required: true
- &Array
type: seq
sequence:
- type: *Id
- &Array
type: seq
sequence:
- type: str
- &Code
type: int
required: true
- &Bool
type: bool
- &RoleType
type: str
enum: [ Primary_Account, Sales_UK, Sales_US ]
- &Email
type: str
pattern: /@\./
fields:
- field-id: clientId
source-field: CLIENT_ID
display-name: Client Id
field-type: *Id
- field-id: clientName
source-field: CLIENT_NAME
display-name: Client Name
- field-id: parentClientId
source-field: CLIENT_ID
display-name: Parent Client Id
field-type: *Id
- field-id: isParentClient
source-field: IS_PARENT_CLIENT
display-name: Is Parent Client
field-type: *Bool
- field-id: tags
source-field: TAGS
display-name: Tags
field-type: *Array
- field-id: coverage
nested: true
- field-id: coverage.code
source-field: COVERAGE.COVERAGE_CODE
display-name: Coverage Code
field-type: *Code
- field-id: coverage.role
source-field: COVERAGE.COVERAGE_ROLE
display-name: Coverage Role
field-type: *RoleType
- field-id: coverage.guid
source-field: COVERAGE.COVERAGE_EMPL_ID
display-name: Coverage Employee Id
field-type: *Id
datasource:
definition:
source-name: employee
source-type: [ database ]
version: 1.0-ALPHA
types:
- &Id
type: str
required: true
- &Code
type: int
required: true
- &Phone
type: long
range: { min: 100000000000, max: 999999999999 }
- &Email
type: str
pattern: /@\./
fields:
- field-id: guid
source-field: EMPLID
display-name: Guid
field-type: *Id
- field-id: ntUserId
source-field: NT_ID
display-name: Nt User Id
- field-id: businessName
source-field: BUSINESS_NAME
display-name: Business Name
- field-id: firstName
source-field: FIRST_NAME
display-name: First Name
- field-id: lastName
source-field: LAST_NAME
display-name: Last Name
- field-id: locationStreet
source-field: LOCATION_DESCR
display-name: Street
- field-id: locationCity
source-field: LOCN_CITY_DESCR
display-name: City
- field-id: locationCountryCode
source-field: LOCN_CTRY_CD
display-name: Country Code
field-type: *Code
- field-id: locationCountry
source-field: LOCN_CTRY_DESCR
display-name: Country
- field-id: locationPostCode
source-field: LOCN_LOC_POSTAL
display-name: Postal Code
- field-id: locationCode
source-field: LOCATION
display-name: Location
field-type: *Code
- field-id: locationStateCode
source-field: LOCATION_STATE
display-name: State Code
field-type: *Code
- field-id: locationState
source-field: LOCN_STATE_DESC
display-name: State
- field-id: locationRegion
source-field: LOCN_REGN_DESCR
display-name: Region
- field-id: locationFloor
source-field: LOCN_FLOOR
display-name: Floor
- field-id: locationDesk
source-field: LOCN_DESK
display-name: Desk
- field-id: workPhone
source-field: CBUS_PHONE1
display-name: Work Phone
field-type: *Phone
- field-id: workPhone2
source-field: WORK_PHONE2
display-name: Work Phone 2
field-type: *Phone
- field-id: internalPhone
source-field: CEXTENSION1
display-name: Internal Extension
- field-id: internalPhoneDialCode
source-field: INT_DIALCODE
display-name: Dialing Code
- field-id: mobilePhone
source-field: CMOBILE_NUM
display-name: Mobile Phone
field-type: *Phone
- field-id: blackberry
source-field: CBLKBRY
display-name: Blackberry
field-type: *Phone
- field-id: workEmail
source-field: EMAILID
display-name: Email ID
field-type: *Email
- field-id: employeeStatus
source-field: EMPL_STATUS_DESCR
display-name: Status
- field-id: employeeClassCode
source-field: EMPL_CLASS
display-name: Class Code
field-type: *Code
- field-id: employeeClass
source-field: EMPL_CLASS_DESCR
display-name: Class
- field-id: rankCode
source-field: RANK_CD
display-name: Rank Code
field-type: *Code
- field-id: rank
source-field: RANK_DESCR
display-name: Rank
- field-id: businessTitle
source-field: BUSINESS_TITLE
display-name: Business Title
- field-id: businessAreaCode
source-field: MAN_AREA_CD
display-name: Business Area Code
field-type: *Code
- field-id: businessArea
source-field: MAN_AREA_DESCR
display-name: Business Area
- field-id: businessSectorCode
source-field: MAN_SECT_CD
display-name: Business Sector Code
field-type: *Code
- field-id: businessSector
source-field: MAN_SECT_DESCR
display-name: Business Sector
- field-id: costCentreCode
source-field: MAN_CC_CD
display-name: Cost Centre Code
field-type: *Code
- field-id: costCentreDescription
source-field: MAN_CC_DESCR
display-name: Cost Centre
- field-id: assistantGuid
source-field: ASSIST_EMPLID
display-name: Assistant Id
field-type: *Id
- field-id: assistantName
source-field: ASSIST_NAME
display-name: Assistant Name
- field-id: supervisorGuid
source-field: SUPERVISOR_ID
display-name: Supervisor Id
field-type: *Id
- field-id: supervisorName
source-field: SUPERVISOR_NAME
display-name: Supervisor Name
properties:
- name: dev-database
value: EMERALD-01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment