Created
May 24, 2019 19:29
-
-
Save yanmendes/f7fb20f450d5fa3e3ae4a947df864518 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Prov = require('./Prov') | |
| const Provone = require('./Provone') | |
| const provoneProgram = { | |
| name: 'script_run', | |
| columns: [ | |
| { | |
| alias: 'program_id', | |
| projection: 'script_run_id' | |
| }, | |
| { | |
| alias: 'label', | |
| projection: 'script_filename' | |
| } | |
| ] | |
| } | |
| const provoneExecution = { | |
| name: 'app_exec', | |
| columns: [ | |
| { | |
| alias: 'execution_id', | |
| projection: 'app_exec_id' | |
| }, | |
| { | |
| alias: 'start_time', | |
| projection: 'prov_startedAtTime' | |
| }, | |
| { | |
| alias: 'script_run_id', | |
| projection: 'provone_hadPlan' | |
| }, | |
| { | |
| projection: 'duration' | |
| } | |
| ] | |
| } | |
| const provEntity = { | |
| name: 'file', | |
| columns: [ | |
| { | |
| alias: 'entity_id', | |
| projection: 'file_id' | |
| }, | |
| { | |
| alias: 'label', | |
| projection: 'name' | |
| }, | |
| { | |
| alias: 'entity_type', | |
| projection: "'provone_Document'" | |
| } | |
| ] | |
| } | |
| const provUsed = { | |
| name: 'staged_in', | |
| columns: [ | |
| { | |
| alias: 'entity_id', | |
| projection: 'file_id' | |
| }, | |
| { | |
| alias: 'execution_id', | |
| projection: 'app_exec_id' | |
| } | |
| ] | |
| } | |
| const provWasGeneratedBy = { | |
| name: 'staged_out', | |
| columns: [ | |
| { | |
| alias: 'entity_id', | |
| projection: 'file_id' | |
| }, | |
| { | |
| alias: 'execution_id', | |
| projection: 'app_exec_id' | |
| } | |
| ] | |
| } | |
| module.exports = [ | |
| { | |
| name: Prov.Classes.ENTITY, | |
| slug: Prov.Classes.ENTITY, | |
| entityMapper: provEntity | |
| }, | |
| { | |
| name: Provone.Classes.PROGRAM, | |
| slug: Provone.Classes.PROGRAM, | |
| entityMapper: provoneProgram | |
| }, | |
| { | |
| name: Provone.Classes.EXECUTION, | |
| slug: Provone.Classes.EXECUTION, | |
| entityMapper: provoneExecution | |
| }, | |
| { | |
| name: Prov.Relationships.USED, | |
| slug: Prov.Relationships.USED, | |
| entityMapper: provUsed | |
| }, | |
| { | |
| name: Prov.Relationships.WASGENERATEDBY, | |
| slug: Prov.Relationships.WASGENERATEDBY, | |
| entityMapper: provWasGeneratedBy | |
| } | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment