Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


4.16.1 Get CSV data

Function

This plugin acquires data from CSV files and sets it in output properties. It supports text files with an extension of csv.

This component supports data acquisition from files that meet the following requirements:

- The character code is written in MS932, and the line feed code is CR+LF.

Set the specified columns (up to 5) of data, separated by commas, in the output properties.

State the column name in the first line of the CSV file. State the data starting in the 2nd line.

(Example 1)

Host name

hostVM001

hostVM002

(Example 2)

Host name, comment

hostVM001,#Comment1

hostVM002,#Comment2

The fields read are checked for the following conditions. If any of these conditions are met, the plugin fails.

(a) Are there any blank (null) fields or lines?

(b) Do any fields exceed 256 characters in character string length?

(c) Do any fields contain the following special characters?

, < > | ; & * ? ` % or a double quote (") not at an end of a field, or a backslash (\) at the end of a field

(d) Does any field contain a control character (0x00 through 0x1f)?

The output information is output for each specified column. An error results if, in any of the strings,

(Total value of field character strings) + Data line count

exceeds 1,017 characters.

Use situation

Data can be acquired from managed CSV files and then used as the input values of the server.

Prerequisites

For the latest support information about [Required product in the System]/[Required products on the execution target server]/[OS running on the execution target server], see the release notes.

[Required product in the System]

JP1/Automatic Operation 11-00 or later

[Required products on the execution target server]

None.

[OS running on the execution target server]

(1) Windows Server 2008 R2 Standard/Enterprise/Datacenter

(2) Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter

(3) Windows Server 2016 Standard/Datacenter

(4) Windows Server 2019 Standard/Datacenter

[Usage conditions for required products on the execution target server]

None.

Cautions

(1) Due to ODBC driver restrictions, the following characters cannot be used in CSV file names: [ ] !

(2) If the file being read is a CSV file, enclose the IP address in double quotations ("). If the value is not enclosed in double quotations ("), it might be falsely identified as numerical data, and the value will not be obtained properly.

(3) Specify an integer value from 0 to 32,767 for the retry count for reading a file. The component is abnormally terminated if a value out of range is specified.

(4) Specify an integer from 1 to 60 for the retry interval for reading a file. The component is abnormally terminated if a value out of range is specified.

(5) The character string length of the field should be within 255 bytes. If it is more than 256 bytes, the ODBC driver can not acquire the value correctly, and the component may be abnormally terminated.

(6) If you execute this plug-in on the same file at the same time, the file access may fail. In this case, adjust the retry count and retry interval, and then retry until you can avoid the error.

(7) If the user ID set in the authentication information of Connection Destination definitions setting is not the built-in Administrator, one of the following conditions must be satisfied.

- The UAC feature in Windows is completely disabled.

- An RDP session has been established for the user ID set in the authentication information of the Connection Destination definitions setting on the target of connection destinations.

Execution privilege

Administrators permissions

Version

02.00.01

Plug-in tags

Gather OS information,Windows

Plug-in name displayed in the task log

osReadSpreadSheet

Return code

0: Normal

12: Error (user error) Invalid property

14: Error (user error) File access disabled

41: Error (error detected in plugin) Missing property (error detected in plugin script)

42: Error (error detected in plugin) Internal error (error detected in the plugin script)

Property list

The following table lists the properties:

Property key

Property name

Description

Default value

I/O type

Required

plugin.destinationHost

Host name of the execution target server

Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported.

--

Input

R

common.fileName

File name

Specify the file name.

--

Input

R

odbc.Column1

Column number 1

Specifies the column number of the data to acquire.

--

Input

R

odbc.Column2

Column number 2

Specifies the column number of the data to acquire.

--

Input

O

odbc.Column3

Column number 3

Specifies the column number of the data to acquire.

--

Input

O

odbc.Column4

Column number 4

Specifies the column number of the data to acquire.

--

Input

O

odbc.Column5

Column number 5

Specifies the column number of the data to acquire.

--

Input

O

odbc.fileOpenRetryCount

Retry count for reading a file

Specifies the number of times to retry when reading a file fails. This value multiplied by the retry interval gives the maximum waiting time. If "0" is specified, a retry is not performed.

20

Input

R

odbc.fileOpenRetryInterval

Retry interval for reading a file

Specifies the retry interval in seconds for when reading a file fails.

5

Input

R

odbc.OutputValue1

Data 1

Specifies the acquired data.

--

Output

O

odbc.OutputValue2

Data 2

Specifies the acquired data.

--

Output

O

odbc.OutputValue3

Data 3

Specifies the acquired data.

--

Output

O

odbc.OutputValue4

Data 4

Specifies the acquired data.

--

Output

O

odbc.OutputValue5

Data 5

Specifies the acquired data.

--

Output

O

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

O