-
Notifications
You must be signed in to change notification settings - Fork 0
Repo #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Repo #3
Changes from all commits
0383fc7
bb34c9a
d53c8b7
548ff84
b11f621
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| # Docugraphy | ||
| Docugraphy is a framework for modeling a data structure consisting of a wide, although sparsely filled, records. | ||
| The assumption is that the content filling the structure takes many forms, that are quasi-defined subsets of the available attributes/columns. | ||
| The assumption is that the content filling the structure takes many forms, that are quasi-defined subsets of the available attributes/columns. | ||
|
|
||
| ## Schema | ||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,18 +11,22 @@ const ( | |
| Decommisioned // Removed from PROD | ||
| ) | ||
|
|
||
| type ImplementationStatusDictionary struct { | ||
| Id ImplementationStatus `sql:",pk"` | ||
| Status string // Arbitrary name/tag for the source system | ||
| Description string // What the source system represents, it's job/competence | ||
| } | ||
|
|
||
| //Definition of a source system that produces data feeding the wide-row. | ||
| type SourceSystem struct { | ||
| Id uint32 `json:"-"` | ||
| Name string `sql:",unique"` // Arbitrary name/tag for the source system | ||
| Name string `sql:",pk"` // Arbitrary name/tag for the source system | ||
| Description string // What the source system represents, it's job/competence | ||
| } | ||
|
|
||
| // An event type is a data structure consisting of a subset of fields available in the wide-row structure. | ||
| // This structure represents the canonical definition of the event type. | ||
| type EventType struct { | ||
| Id uint64 `json:"-"` | ||
| Name string `sql:",unique"` // The name of a event_type according to the wide-row design | ||
| Name string `sql:",pk"` // The name of a event_type according to the wide-row design | ||
| RecommendedUse string // The explanation of how to use this event type in terms of its universal business definition | ||
| Status ImplementationStatus //What is the status of the event type on a receiving point (data lake) | ||
| } | ||
|
|
@@ -32,18 +36,17 @@ type EventTypeImplementation struct { | |
| PreciseUse string //The explanation of how to use this event type in terms of its business definition according to a certain source system | ||
| Status ImplementationStatus //What is the status of the event type on a sending point (source system) | ||
|
|
||
| EventTypeId uint64 `sql:"on_delete:RESTRICT, on_update: CASCADE, pk"` // Reference to the canonical definition of an event type | ||
| EventTypeName string `sql:"on_delete:RESTRICT, on_update: CASCADE, pk"` // Reference to the canonical definition of an event type | ||
| EventType *EventType | ||
|
|
||
| SourceSystemId uint32 `sql:"on_delete:RESTRICT, on_update: CASCADE, pk"` // Reference to a source system that the implementation refers to | ||
| SourceSystemName string `sql:"on_delete:RESTRICT, on_update: CASCADE, pk"` // Reference to a source system that the implementation refers to | ||
| SourceSystem *SourceSystem | ||
| } | ||
|
|
||
| // Definition of a field/attribute within the wide-row structure. | ||
| // This structure represents the canonical definition of the field. | ||
| type Field struct { | ||
| Id uint64 `json:"-"` | ||
| Name string `sql:",unique"` // The name of a field according to the wide-row design | ||
| Name string `sql:",pk"` // The name of a field according to the wide-row design | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How are you going to distinguish between 2 fields with the same name - the first one being a 'top level' field and the the other one being nested somewhere? Will |
||
| Type string // Data type of the field | ||
| RecommendedUse string // The explanation of how to use this field in terms of its universal business definition | ||
| Status ImplementationStatus //What is the status of the field on a receiving point (data lake) | ||
|
|
@@ -54,11 +57,12 @@ type FieldImplementation struct { | |
| PreciseUse string //The explanation of how to use this field in terms of its business definition according to a certain source system | ||
| Status ImplementationStatus //What is the status of the field on a sending point (source system) | ||
|
|
||
| FieldId uint64 `sql:"on_delete:RESTRICT, on_update: CASCADE, pk"` | ||
| FieldName string `sql:"on_delete:RESTRICT, on_update: CASCADE, pk"` | ||
| Field *Field | ||
|
|
||
| SourceSystemId uint32 `sql:"on_delete:RESTRICT, on_update: CASCADE, pk"` | ||
| SourceSystem *SourceSystem | ||
| EventTypeName string `sql:"on_delete:RESTRICT, on_update: CASCADE, pk"` | ||
| SourceSystemName string `sql:"on_delete:RESTRICT, on_update: CASCADE, pk"` | ||
| EventTypeImplementation *EventTypeImplementation | ||
| } | ||
|
|
||
| // Definition of a value from a restricted list that applies for a certain field (and source system) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,21 @@ type Repository interface { | |
| Connect() | ||
| Disconnect() error | ||
| SetupSchema() error | ||
|
|
||
| GetSourceSystems() ([]model.SourceSystem, error) | ||
| GetEventTypes() ([]model.EventType, error) | ||
| GetFields() ([]model.Field, error) | ||
| GetEventTypeImplementations(sourceSystemName string) ([]model.EventTypeImplementation, error) | ||
| GetFieldImplementations(sourceSystemName string, fieldName string) ([]model.FieldImplementation, error) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should it really be taking Edit: OK, my bad - I didn't notice the |
||
|
|
||
| AddSourceSystem(sourceSystem *model.SourceSystem) error | ||
| AddEventType(eventType *model.EventType) error | ||
| AddField(field *model.Field) error | ||
| AddEventTypeImplementation(eventTypeImplementation *model.EventTypeImplementation) error | ||
| AddFieldImplementation(fieldImplementation *model.FieldImplementation) error | ||
|
|
||
| ChangeStatusOfEventType(eventTypeName string, status model.ImplementationStatus) error | ||
| ChangeStatusOfField(fieldName string, status model.ImplementationStatus) error | ||
| ChangeStatusOfEventTypeImplementation(eventTypeName string, sourceSystemName string, status model.ImplementationStatus) error | ||
| ChangeStatusOfFieldImplementation(fieldName string, eventTypeName string, sourceSystem string, status model.ImplementationStatus) error | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <mxfile modified="2019-06-03T18:00:52.405Z" host="www.draw.io" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" etag="F4gfTq2iRnicEcgrqMII" version="10.7.4" type="device"><diagram id="Wph7S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H58YnG5PmhXZVr/B6b6sOyrG9q+8+aISWVrx3SHSS+3mi709QWC/iq749sb7FfWL73GHLddnyd3gwgJOk7vBZEjuHk+6YrvdT1CKbXfyShvnXKdZ0djrGduyXGKCHPQKcqjE12o9KOi6z2hsKzJmA1kiMUEOWuv74yN8qUuQQyDrLEbf18KRDk6LylOHFFlVMUEOZ09Agwc5BLI+YwhIDwJqd2N7JaDJgf0FPQU5GA5SyUGDBzlMjBGkKQdNdDOC5K0J/xSHSmjHxFappJ3OEQ/q0CTr9+ZTD8PaPEfWtgfjGzkEePsXV80fXB0+FqKNYtyhg6oCOTL4xagxsRBd2eS0D8ecAAaepISw+hIFhenqioQoL/Ed</diagram></mxfile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source system? notstatus'?