Data source scripts
Data source scripts allow you to automate your actions on existing data sources.
ChangeDataSource
The ChangeDataSource script changes the master or target data source of an existing connection.
The original and replacement data sources must represent the same tool. For example, to replace a Jira data source, you must specify another Jira data source. The two data sources must also target the same endpoint URL.
The script includes three variables: ConnectionName, OldDataSourceName, NewDataSourceName
Replace the values with the exact, case-sensitive names of the entries, as displayed in the Connect dashboard.
DataSourceExtracts
The DataSourceExtracts script extracts a data dump of any type, any subset of fields, for any project across seven products: QC/ALM, ALM Octane, Jira, Azure DevOps, Rally, VersionOne, and ServiceNow.
The command syntax is:
java -jar mfcDataSourceExtracts.jar "almqc" "..\pathTo\almqc.property.bag.txt"
Parameter | Details |
---|---|
"almqc" | Can be one of the following: almqc, octane, jira, azdo, rally, versionone, or servicenow. |
"..\pathTo\almqc.property.bag.txt" | The path to the property bag for the product described by the first parameter. |
You can run the DataSourceExtracts script on any machine that has the java jre installed, not just on the Connect server.
The utility receives as input a property bag that describes the connectivity and credentials for the target product.
The parameters in the property bag are a set of key-value pairs in the form of key=value
Key and value guidelines
- All the keys must be lowercase.
- Spaces, tabs or special characters are not supported in the key.
- Do not use quotation marks for the values.
- Value strings are case sensitive, and must match the corresponding data elements in the targeted product.
Property bag structure per product
Following are structures of each property bag with the minimum required parameters:
url=http://try-mfc-alm.microfocus.com:8080
username=admin
password=adminpassword
domain=MyDomain
project=MyProject
type=requirement
url=http://try-mfc-oct15.opentextcom:8080
username=joebloggs@opentext.com
password=mypassword
sharedspace=Default Shared Space
workspace=Dimi1
type=story
Tip: You can specify clientid and clientsecret instead of the username and password
clientid=abcdefg
clientsecret=hijklmnop
url=http://try-mfc-jira.microfocus.com:8080
username=admin
password=adminpassword
project=Momchil-Reqs
board=MOMRQ board
type=Epic
url=https://dev.azure.com/joebloggs
username=joebloggs@opentext.com
password=mypassword
project=Scrum6
type=Bug
url=https://rally1.rallydev.com:443
username=rallydemo@accurev.com
password=Rally1!demo
workspace=Phoenix
project=DV-Project1
type=Defect
Note: Rally servers may be configured to require an apikey in addition to username/password:
apikey=abcdefg
url=https://ven02317.service-now.com
username=admin
password=adminpassword
project=MyProject
type=rm_task
Note: versionone servers may be configured to require an access token instead of username/password:
accesstoken=abcdefg
url=https://ven02317.service-now.com
username=admin
password=adminpassword
project=<project name> (to include all projects, remove the 'project' parameter)
type=rm_task
Proxy servers
If your endpoint system requires proxy servers, you need to specify their keys in the property bag. Use the following keys:
jdk.http.auth.tunneling.disabledschemes=””
jdk.http.auth.proxying.disabledschemes=””
Note:
-
You may use either an HTTP or HTTPS proxy server configuration, but not both.
-
Only include http(s).proxyUser and http(s).proxyPassword for proxy servers that require authentication.
-
If your proxy server requires a domain for NTLM authentication, do not include the domain name with the user name. Instead, add the following entry to the property bag file:
http(s).auth.ntlm.domain=<domainname>
.
For an http proxy server, add the following with the relevant values:
http.proxySet=true
http.proxyHost=
http.proxyPort=
http.proxyUser=
http.proxyPassword=
http.nonProxyHosts=
For an https secure proxy server, add the following with the relevant values:
http.proxySet=true
https.proxyHost=
https.proxyPort=
https.proxyUser=
https.proxyPassword=
https.nonProxyHosts=
For details, see Proxy setup.
Optional parameters
Following are parameters that you can append to the command:
Parameter | Description |
---|---|
attributeids |
Default: true |
columns |
An array of field names. When specified, restricts the output data table to the set of specified fields. If not specified, all the fields of the type are returned. The parameter also directs the engine to optimize the query and fetch all the data in a single round trip. columns=columnname1,columnname2,columnname3,… |
fetchusers |
When set to false, no users are queried from any participating endpoint systems. Note: Use this property with caution, since when enabled, it may cause a conflict in cases where user fields are required in the synchronization. Default: true |
fieldmetadata |
Queries and writes out the list of all fields for the type specified in the property bag. Default: false |
fieldseparator |
Splits the output row based on the specified characters. If not specified, the default is |
|
headers |
Directs the engine to append the field/property/column name to each data value in the output Default: true |
logrestheaders |
Appends the rest http send/receive headers for each executed rest url command in the resturl log. Default: false |
query |
A request to the server to limit the items returned according to the query string. Example: If you are working with an ALM/QC data source, add the following row to extract only requirement folders: |
rawdata |
Produces a separate log of each rest url response in json format. Default: false |
resturls |
Directs the extractor to produce a log of the rest queries run in sequence. Default: false |
scopeddown |
Specific to Rally. Directs the engine to return child project artifacts in addition to the selected project . Default: false |
scopedup |
Specific to Rally. Directs the engine to return parent project artifacts in addition to the selected project. Default: false |
typemetadata |
Queries and writes out the list of all types supported on a server. Default: false |
QueryTemplates
This script is a template script that you can use to query types, properties, and property lists from the data sources.
The QueryTemplates script targets the running Connect server.
This script does not stop or restart the server, since it does not run direct queries against the database.
It is useful when discovering case sensitive property names and/or enum names to set up synchronization criteria and calculated values.
This script is useful for debugging issues with mappings, and is often used by support engineers when working one-on-one with the customer.
RenameDatasource
Use the RenameDatasource script to rename a data source.
In the script, provide values for the following variables:
Variable | Possible values |
---|---|
OLD_NAME | The current name of the data source that you want to rename. |
NEW_NAME | The new name for the data source. |
Password | The user password. |
Naming guidelines:
-
Avoid using white spaces. Use underscores instead.
-
Avoid using Windows special characters: / \ : * < > |
Example: mfcRenameDatasource.bat OldName NewName abcdefg
See also: