Share this page

# Data source scripts

Data source scripts allow you to automate your actions on existing data sources.

In this topic:

## 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 Micro Focus Connect UI.

Back to top

## 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 Micro Focus 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:

almqc.property.bag.txt

url=http://try-mfc-alm.microfocus.com:8080

username=admin

password=adminpassword

domain=MyDomain

project=MyProject

type=requirement

octane.property.bag.txt

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

jira.property.bag.txt

url=http://try-mfc-jira.microfocus.com:8080

username=admin

password=adminpassword

project=Momchil-Reqs

board=MOMRQ board

type=Epic

azdo.property.bag.txt

url=https://dev.azure.com/joebloggs

username=joebloggs@opentext.com

password=mypassword

project=Scrum6

type=Bug

rally.property.bag.txt

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

versionone.property.bag.txt

url=https://ven02317.service-now.com

username=admin

password=adminpassword

project=My Connect Project

type=rm_task

Note: versionone servers may be configured to require an access token instead of username/password:

accesstoken=abcdefg

servicenow.property.bag.txt

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>`.

HTTP proxy server

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=

HTTPS proxy server

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 | True: Returns the underlying id’s of related fields. False: Returns the names of related fields. 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 | `fieldseparator=^$#` splits each field value in a row out separated by the characters specified in the pattern.
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: `query=type-id[=1]`
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

Back to top

## QueryTemplates

This script is a template to query types, properties, and property lists from the data sources.

The QueryTemplates script targets the running Micro Focus Connect server.

This script does not stop or restart the server, as it does not run direct queries against the Micro Focus Connect 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.

Back to top

## Rename

Use the Rename script to rename either a connection or data source.

In the script, provide values for the following variables:

Variable | Possible values
--- | ---
ARTIFACT | "connection" or "datasource"
OLD_NAME | The current name of the connection or data source that you want to rename.
NEW_NAME | The new name for the connection or data source.

Naming guidelines:

- Avoid using white spaces. Use underscores instead.

- Avoid using Windows special characters: / \ : * < > |

This script stops the Micro Focus Connect server, changes the name, and restarts the server.

Back to top

See also:

- Batch utility scripts

- Create a data source

- Connection scripts

https://admhelp.microfocus.comMicro Focus Connect8942
Tips to improve your search results... Micro Focus Connect Help CenterMF Connect Help23.4AllView Local Help CenterView Online Help CenterbackGo back in browser historyforwardGo forward in browser historyRemove search highlightsnext topicGo to next topicprevious topicGo to previous topicPrint the current topicVersion: