Used to load a NetricsTable into the server.


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

Syntax

Visual Basic (Declaration)
Public Function tblload( _ 
   ByVal tbl As NetricsTable _ 
) As NetricsTableStats
C#
public NetricsTableStats tblload(
   NetricsTable tbl
)
C++
public:
 NetricsTableStats tblload(
   NetricsTable tbl
) sealed 
J#
public NetricsTableStats tblload(
   NetricsTable tbl
)
JScript
public  function tblload(
   tbl : NetricsTable
) : NetricsTableStats

Parameters

tbl
The table to be loaded

Return Value

The statistics for the table just loaded

Exceptions

Exception TypeCondition
NetricsExceptionIf the server indicates that an error has occured (Possible errors - ARRAYLEN, TBLEXISTS, TBLPARAM, RECEXISTS, CHARMAP, DUPFIELDNAMES, EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FEATURESET, FIELDLENSUM, NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS, PARAMCONFLICT, PARAMVAL, SHUTDOWN)

Example

This sample shows a way to load a TIBCO Patterns Engine table from a csv file.

 Copy Code
            using NetricsServerInterface;  
            class MyClass 
              {
                private static NetricsServerInterface.NetricsServerInterface si = null;     
                public static void Main() 
                 {
                   try
                   {
                       String host = "localhost";
                       int port = 5051;
                       si = new NetricsServerInterface.NetricsServerInterface(host, port);
                       // CSV Input file
                       String file = "c:\\temp\\names_all.csv";
                       // TIBCO Patterns Engine table name
                       String table = "names1";
                       // Create a NetricsRecFile which points to the CSV input file
                       NetricsRecFile netricsRecFile = new NetricsRecFile(file);
                       // Create a NetricsCSVRecSrc which will then read the NetricsRecFile
                       NetricsCSVRecSrc src = new NetricsCSVRecSrc(netricsRecFile);
                       // Create a NetricsTable object to define tblload parameters
                       NetricsTable tbl = new NetricsTable(table, src.getFieldNames(), src);
                       // Create and load the table
                       NetricsTableStats response = si.tblload(tbl);
                       Console.Write(response.getName() + ": " + response.getNumRecs().ToString() + " records loaded.\n");
                   }
                   catch (NetricsException e)
                   {
                       Console.Write(e.getErrorDescription() + "\n");
                   }
                 }
              }
            

See Also