|
Capture Settings, Data Format |
Top Previous Next |
|
Capture Settings are set-up separately for each capture channels. Once these settings have been specified, OK or Apply should be clicked. This tab specifies the Data Format for captured data, where separate columns need to be identified to be saved to database columns or for filtering and alerts. The appearance of the grid depends upon the Data Format on the General tab.
Grid Control Buttons There are seven buttons used to manipulate the Data Format grid, left to right:
If the grid is empty, or if the database table or stored procedure have been changed, click the New Columns from Table button to fill the grid.
To ease creation of the Data Format, captured data is dynamically parsed in exactly the way it would be when been added to a database table, so you can easily check how the format you specify will identify data columns for the database. The sample data is taken from anything showing in the main capture window, or a specific Sample Log may be opened. The current sample data row is shown both in the grid, and below the grid in different formats.
To edit the columns in the Data Format grid, click on the required box and an edit control of some sort will appear, perhaps a drop down box arrow, an edit field or numeric up/down arrows. Once the edit is complete, click on another box to ensure the edit is saved, losing focus from the grid causes the last edit to be cancelled.
Data Format: Fixed Width Columns
For Data Format: Fixed Width Columns, the grid shows four fixed columns, and two user editable columns.
Column Name, Column Type, Column Length and Nullable These columns are pre-filled from the table definition or stored procedure parameters and can not be changed. If the table or SP is changed, click the New Columns from Database button to refresh them, but beware Data Position and Length will be cleared. The Column Type column shows the definition of that column, any attempt to write alphanumeric data to a numeric column will cause a SQL error. Currently, ComCap lets the ADO or the stored procedure raise errors for data type incompatibilities and captured data is not actually validated (except for blanks, see below).
Data Position and Data Length These columns are editable, and define the Data Position and Data Length in the fixed width captured data for each database column. The first Data Position on the line is one. If a database column or parameter is to be left blank, set the Data Position to 0. If the Data Length is longer than the column length, the data will be truncated. All data is trimmed to remove leading and trailing spaces.
The same data may be added to more than one column if needed, or in the case of the capture_whole sample table, just a single column is specified for the entire record. The stored procedure could then parse the columns instead. Blank data often causes trouble. If a column contains all spaces, it is converted to a NULL for Date/Time Column Types or if the table allows nulls in the column. Because all stored procedure parameters are Nullable, numeric values are passed as 0 and text as blank.
Sample Data The panel below the grid shows the current Sample Data line, with a ruler to identify up to 150 columns positions below the data line. The Sample Log Up and Down buttons may be used to select different lines of Sample Data. The Sample Data line is automatically parsed and the identified columns displayed in the grid Sample column, according to the current Data Positions and Lengths. If a Data Position is changed, the Reparse button should be clicked to refresh the Sample column. The Sample columns show Invalid Column if the data can not be parsed.
Data Format: Character Separated Columns (CSV)
For Data Format: Character Separated Columns (CSV), the grid shows four fixed columns, and one user editable column.
Column Name, Column Type, Column Length and Nullable These columns are pre-filled from the table definition or stored procedure parameters and can not be changed. If the table or SP is changed, click the New Columns from Database button to refresh them, but beware Sequence will be cleared. The Column Type column shows the definition of that column, any attempt to write alphanumeric data to a numeric column will cause a SQL error. Currently, ComCap lets the ADO or the stored procedure raise errors for data type incompatibilities and captured data is not actually validated (except for blanks, see below).
Sequence Number Character separated columns are identified by simply counting the separators. The Sequence Number column is editable, and is used to define the number for each database column. The first Sequence Number is one. If a database column or parameter is to be left blank, set the Sequence Number to 0. If the column data length is longer than the Column Length, it will be truncated. All data is trimmed to remove leading and trailing spaces.
Blank data often causes trouble. If a column contains all spaces, it is converted to a NULL for Date/Time Column Types or if the table allows nulls in the column. Because all stored procedure parameters are Nullable, numeric values are passed as 0 and text as blank.
Sample Data The panel below the grid shows the current Sample Data line displayed as one row per column, preceded by the Sequence Number. The Sample Log Up and Down buttons may be used to select different lines of Sample Data. The Sample Data line is automatically parsed and the identified columns displayed in the grid Sample column, according to the current Sequence Numbers. If a Sequence Number is changed, the Reparse button should be clicked to refresh the Sample column. The Sample columns show Invalid Column if the data can not be parsed.
Data Format: Variable Named Columns (=)
Specifying the data format 'variable named columns' is similar, except the data column name is specified instead of the sequence. The sample data is parsed to separate the data names from the data values. Note spaces are not allowed in the data names. Any named columns not
For Data Format: Variable Named Columns (=), the grid shows four fixed columns, and one user editable column.
Column Name, Column Type, Column Length and Nullable These columns are pre-filled from the table definition or stored procedure parameters and can not be changed. If the table or SP is changed, click the New Columns from Database button to refresh them, but beware Sequence will be cleared. The Column Type column shows the definition of that column, any attempt to write alphanumeric data to a numeric column will cause a SQL error. Currently, ComCap lets the ADO or the stored procedure raise errors for data type incompatibilities and captured data is not actually validated (except for blanks, see below).
Data Name Variable Named Columns are identified by their names, which may or may not be the same as the database Column Names. The Data Name column is editable, and is used to define the name for each database column. If a database column or parameter is to be left blank, leave Data Name blank. If the column data length is longer than the Column Length, it will be truncated. All data is trimmed to remove leading and trailing spaces.
Blank data often causes trouble. If a column contains all spaces, it is converted to a NULL for Date/Time Column Types or if the table allows nulls in the column. Because all stored procedure parameters are Nullable, numeric values are passed as 0 and text as blank.
Sample Data The panel below the grid shows the current Sample Data line displayed as one row per column, preceded by the Data Name. The Sample Log Up and Down buttons may be used to select different lines of Sample Data. The Sample Data line is automatically parsed and the identified columns displayed in the grid Sample column, according to the current Data Names. If a Data Name is changed, the Reparse button should be clicked to refresh the Sample column. The Sample columns show Invalid Column if the data can not be parsed. This is quite likely with Variable Named Data where only the columns actually used are presented.
|