Define name and format of a server side record source file.


Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)

Syntax

Visual Basic (Declaration)
Public Class NetricsRecFile
C#
public class NetricsRecFile
C++
ref class NetricsRecFile
J#
public class NetricsRecFile
JScript
public class NetricsRecFile

Remarks

This class is used to define a file of records read by the Netrics Server. File types currently supported are:

CSV - Excel format CSV files.

Fixed Width - Files with fixed width fields.

In both cases the files may start with an optional header line defining the field names, and/or an optional header line defining the field types. If both are given the field names must be given first.

Record keys are defined in one of four ways:

No key - no key is given in the file, keys are generated by the server.

Leading key - an unnamed, untyped initial field in each data record provides the record key. This field does not appear in the header records, so data records will have one more field than header records.

Field Index - the index position (starting at 0) of the field containing the key is given. This field appears in all header records as well as data records, but this field is loaded as the record key and does not appear as a record data field.

Field Name - the name of the field containing the key is given. If this method is used then the field names header record must be present. This is like Field Index in behavior.

If you are loading records into a child table a field of the file can be specified as containing the parent key. This can be done either by specifying the field name or the field index.

The optional field types header line can use either the field type integer id (as defined in NetricsTable) or one of the following field type names. The names are not letter case sensitive, so may appear in either upper or lower case.
attributes or attrs
date
datetime or datet
double or float
integer or int
key
parent-key or parent_key or parentkey
searchtext or srchtext
text

All leading and trailing whitespace is ignored.

Simple examples of each file type are given below. All file types except Field Index are show with both header records. They are optional in all file types except Field Name where the Field Names header record is required.

No Key

first,middle,last,order
5,5,5,INT
William,Jefferson,Clinton,42
George,W,Bush,43

Leading Key
first,middle,last,order
srchtext,srchtext,srchtext,integer
key1,William,Jefferson,Clinton,42
key2,George,W,Bush,43

Field Index (value 4)

William,Jefferson,Clinton,42,key1
George,W,Bush,43,key2

Field Name(value key)

first,middle,last,order,key
SEARCHTEXT,SEARCHTEXT,SEARCHTEXT,INTEGER,KEY
William,Jefferson,Clinton,42,key1
key1,George,W,Bush,43,key2

Loading Child records. Field Name(value key) Parent Field Name(value parent-key)

key,first,middle,last,parent-key
Key,5,5,5,ParentKey
c1,Chelsea,Victoria,Clinton,key1
c1,Jenna,Bush,Hagar,key2
c2,Barbara,Pierce,Bush,key2

Inheritance Hierarchy

System.Object
   NetricsServerInterface.NetricsRecFile

Thread Safety

Public static (Shared in Visual Basic)staticShared members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

See Also