Command reference for reference data utilities
You can manage your reference data collections by using the ReferenceDataUtil.sh utility on the command line. The following commands are available to use with the script.
Create
Creates a reference data collection.
- name
- The name of the reference data collection.
- [SET | MAP | MAPOFSETS | MAPOFMAPS | REFTABLE]
- The type of reference data collection.
- [ALN | ALNIC | NUM | IP | PORT | DATE]
- The type of data in the reference set.
- ALN specifies alphanumeric values. This data type supports IPv4 and IPv6 addresses.
- ALNIC specifies alphanumeric values, but rule tests ignore the case. This data type supports IPv4 and IPv6 addresses.
- NUM specifies numeric values.
- IP specifies IP addresses. This data type supports only IPv4 address.
- PORT specifies port addresses.
- DATE specifies date values.
- [-timeoutType=[FIRST_SEEN | LAST_SEEN]]
- Specifies whether the amount of time the data elements remain in the reference data collection is from the time the element was first seen or last seen.
- [-TimeToLive='']
- The amount of time the data elements remain in the reference data collection.
- [-keyType=name:elementType,name:elementType,...]
- A mandatory REFTABLE parameter of consisting of key name to ELEMENTTYPE pairs.
- [-key1Label='']
- An optional label for key1, or the primary key. A key is a type of information, such as an IP address.
- [-valueLabel='']
- An optional label for the values of the collection.
Update
Updates a reference data collection.
- name
- The name of the reference data collection.
- [-timeoutType=[FIRST_SEEN | LAST_SEEN]]
- Specifies whether the amount of time the data elements remain in the reference data collection is from the time the element was first seen or last seen.
- [-timeToLive='']
- The amount of time the data elements remain in the reference data collection.
- [-keyType=name:elementType,name:elementType,...]
- A mandatory REFTABLE parameter of consisting of key name to elementType pairs.
- [-key1Label='']
- An optional label for key1.
- [-valueLabel='']
- An optional label for the values of the collection.
Add
Adds a data element to a reference data collection
- name
- The name of the reference data collection.
- <value> <key1> [key2]
- The key value pair that you want to add. The keys are alphanumeric strings.
- MAP and MAPOFSETS require Key 1.
- MAPOFMAPS and REFTABLE require Key 1, and the second-level Key 2.
- [-sdf=" ... "]
- The Simple Date Format string that is used to parse the date data.
Delete
Deletes an element from a reference data collection.
- name
- The name of the reference data collection.
- <value> <key1> [key2]
- The key value pair that you want to delete. The keys are alphanumeric strings.
- MAP and MAPOFSETS require Key 1.
- MAPOFMAPS and REFTABLE require Key 1, and the second-level Key 2.
- [-sdf=" ... "]
- The Simple Date Format string that is used to parse the date data.
Remove
Removes a reference data collection.
- name
- The name of the reference data collection.
Purge
Purges all elements from a reference data collection.
- name
- The name of the reference data collection.
List
Lists elements in a reference data collection.
- name
- The name of the reference data collection.
- [displayContents]
- Lists all elements in the specified reference data collection.
Listall
Lists all elements in all reference data collection.
- [displayContents]
- Lists all elements in all reference data collections.
Load
Populates a reference data collection with data from an external .csv file.
- name
- The name of the reference data collection.
- filename
- The fully qualified file name to be loaded. Each line in the file represents a record to be added to the reference data collection.
- [-encoding=...]
- Encoding that is used to read the file.
- [-sdf=" ... "]
- The Simple Date Format string that is used to parse the date data.