You must be aware of the guidelines for creating data source types that are used to define custom data sources for OnCommand Workflow Automation (WFA).
You define a data source type using one of the following methods:
Use the WFA SQL guidelines to define SELECT queries from an external database based data sources.
You can write a PowerShell script, which provides the data for a specific scheme of dictionary entries.
Guidelines | Example |
---|---|
Use PowerShell language for the script. |
|
The script should provide the output for each of the dictionary entry in its current working directory. The files should be named dictionary_entry.csv, where the dictionary entry should be in lowercase characters. |
A predefined data source type that collects information from Performance Advisor uses SCRIPT-based data source type. The output files are named as follows:
$arrayFile = "./array_performance.csv" $aggregateFile = "./aggregate_performance.csv" |
The .csv file should have the content in the exact order as the dictionary entry attributes. |
A dictionary entry includes attributes in the following order: array_ip, date, day, hour, cpu_busy, total_ops_per_sec, disk_throughput_per_sec. The script adds data to the CSV file in the same order. $values = get-Array-CounterValueString ([REF]$data) Add-Content $arrayFile ([byte[]][char[]] "\N t$arrayIP't$date't$day't$hour't$values'n") |
Use Encoding to ensure that the data output from the script is loaded into the WFA cache appropriately. |
# This is required to ensure that the output file is UNIX encoded Add-Content $arrayFile ([byte[]][char[]] "\N t$arrayIP't$date't$day't$hour't$values'n") - Encoding Byte |