"publication"
The publication object is used to create, delete, and list publications
The publication object is used to create, delete, and list publications
The publication object is used to create, delete and list publications. The publication JSON object can be specified as the main target for the JSON input file or it can be used inside plan or group targets to define a publication during the creation of another target.
Properties summary
"publication"
object properties summaryProperty | Description | Type |
---|---|---|
creates a new publication | object | |
delete | deletes the publication specified with the | object |
list | lists the files published by a publication specified with the | object |
When the mode is "db"
, a "dbname" parameter is specified. Additional folders will also be published. This feature is used because SQL databases may contain files from different folders.
{ "memphis": { "name": "MEMPHIS", "host": "localhost", "port": "7597", "uid": "admin", "pwd": "ADMIN" }, "options": { "profile": true, "replace": true, "ignoredeploy": false, "recursivedel": false, "recursivesearch": true }, "publication": { "actions": [ "create" ], "name": "pubdb", "engine": "FAIRCOMS@HOST001", "mode": "db", "dbname": "ctreeSQL", "wildcards": ["*dat"], "items":[ "E:\\sw\\eu_database\\dbf\\ML\\data\\c" ] } }
{ "memphis": { "name": "MEMPHIS", "host": "localhost", "port": "7597", "uid": "admin", "pwd": "ADMIN" }, "options": { "profile": true, "replace": true, "ignoredeploy": false, "recursivedel": false, "recursivesearch": true }, "publication": { "actions": [ "create" ], "name": "pubfolder", "engine": "FAIRCOMS@HOST001", "mode": "folder", "item": "E:\\sw\\eu_database\\dbf\\ML\\data\\d", "wildcards": ["*dat"], "recursive": false } }
{ "memphis": { "name": "MEMPHIS", "host": "localhost", "port": "7597", "uid": "admin", "pwd": "ADMIN" }, "options": { "profile": true, "replace": true, "ignoredeploy": false, "recursivedel": false, "recursivesearch": true }, "publication": { "actions": [ "create" ], "name": "pubFiles", "engine": "FAIRCOMS@HOST001", "mode": "files", "items": [ "E:\\sw\\eu_ldf\\dbf\\ML\\*.*dat", "E:\\sw\\usa_ldf\\dbf\\ML\\*.*dat", ] } }
This is an example to create a "plan"
( the target) with the "create"
property value of "false"
.
In this example, a new "plan"
is created as our main target. The publication definition under "subscriptions"
has the "create"
property value set to "false"
because the "pubFiles"
publication file already exists on the source server engine and does not need to be created.
{ "memphis": { "name": "MEMPHIS", "uid": "admin", "pwd": "ADMIN" }, "plan": { "actions": [ "create", "deploy", "start" ], "name": "planFiles", "sourceEngine": "FAIRCOMS@MAURO-PC", "destEngine": "FAIRCOM2@MAURO-PC", "subscriptions": [ { "name": "subFiles", "bidirectional": false, "publication": { "name": "pubFiles", "create": false } } ] } }
This is an example to create a "plan"
( the target) with the "create"
property value of "true"
.
In this example, a new "plan"
is created as our main target. The publication definition under "subscriptions"
has the "create"
property value set to "true"
because the "pubFiles"
publication file does not exist on the source server engine and needs to be created. The creation specifications, such as mode and items, must be provided.
{ "memphis": { "name": "MEMPHIS", "uid": "admin", "pwd": "ADMIN" }, "plan": { "actions": [ "create" ], "name": "planFiles", "sourceEngine": "FAIRCOMS@MAURO-PC", "destEngine": "FAIRCOM2@MAURO-PC", "subscriptions": [ { "name": "subFiles", "bidirectional": false, "publication": { "name": "pubFiles", "create": true, "mode": "files", "items": [ "E:\\sw\\eu_ldf\\dbf\\ML\\*.*dat" ] } } ] } }
Note
Beginning with FairCom DB version 13.0.2 the "create"
property is obsolete. The following example creates a "plan"
and "publication"
if the publication file does not already exist.
{ "memphis": { "name": "MEMPHIS", "uid": "admin", "pwd": "ADMIN" }, "plan": { "actions": [ "create" ], "name": "planFiles", "sourceEngine": "FAIRCOMS@MAURO-PC", "destEngine": "FAIRCOM2@MAURO-PC", "subscriptions": [ { "name": "subFiles", "bidirectional": false, "publication": { "name": "pubFiles", "mode": "files", "items": [ "E:\\sw\\eu_ldf\\dbf\\ML\\*.*dat" ] } } ] } }
{ "memphis": { "name": "MEMPHIS", "host": "localhost", "port": "7597", "uid": "admin", "pwd": "ADMIN" }, "options": { "profile": true, "replace": true, "ignoredeploy": false, "recursivedel": false, "recursivesearch": true }, "publication": { "actions": [ "delete" ], "name": "pubFiles", "engine": "FAIRCOMS@HOST001" } }
{ "memphis": { "name": "MEMPHIS", "uid": "admin", "pwd": "ADMIN" }, "publication": { "actions": [ "list" ], "name": "pubFiles", "engine": "FAIRCOMS@HOST001" } }
The "create"
action creates a new publication, plan, or group.
Note
The "create"
action with "plan"
targeted always takes a list of subscriptions and each subscription is associated with an existing or new publication. The "create"
action with "publication"
targeted defines new publications.
Properties summary
"create"
actions summaryProperty | Description | Type | Limits (inclusive) | |||
---|---|---|---|---|---|---|
create | When NoteBeginning with FairCom DB version 13.0.2, this property is no longer used. If the named publication exists, it is used and other publication properties are ignored. If the publication does not exist it will be created with the specified properties. If the properties are not sufficient, an error is returned. | Boolean |
| |||
dbExcludes | specifies wildcards that are used to exclude files in the designated folder, when the mode is | array of JSON Objects | ||||
dbname | contains the name of the database to be published NoteThis is for when the | string | ||||
engine | specifies the logical name of the publication | string | ||||
folderExcludes | specifies wildcards that are used to exclude files in the designated folder, when the mode is | array of strings | ||||
items | contains a list of the objects to be published NoteDepending on the | array of strings | ||||
mode | specifies the mode of the publication | string |
| |||
name | specifies the name of the publication | string | ||||
recursive | specifies whether the files matching the wildcard are matched recursively in sub-folders or just in the specified root NoteThis is for when the mode is | Boolean | ||||
wildcards | specifies that the specified wildcards are used to match the files in the specified folders NoteThis is for when the mode is | array of strings |