Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

COLUMN NAME

DESCRIPTION

NAME

Name of the Cdr File Definition

DESCRIPTION

Description of Cdr File Definition

KEY

Unique key of a file defintion

CODE

Code, in-case sub classing is needed in the future

MAX_RECORDS

Maximum number of records in a file (Default value -1 (no maximum number of records))

CDR_PARSER_ID

Parser used for parsing a file into records (CDR_PARSER_ID = CDR_PARSER.ID)

BILLING_SOURCE_TABLE_NAME

Table name for storing file information source

RECORD_SEPARATOR_ID

Type of separator used for separating one record from another (RECORD_SEPARATOR_ID = ITEM_SEPARATOR.ID). The default is a carriage return line feed

FILENAME_FORMAT

Format of filename to be loaded (Perl regular expression format). If set only filenames that match the format will be processed otherwise all files are processed

EXPORT_TYPE

The type of file records to be exported. Used when generating export files. The source table (for export) must have a column with name 'EXPORT_TYPE' whose value must match this value

PRE_EXPORT_PROCEDURE

Used when exporting files. Called before any final generation processing commences. Used to add extra export values that can only be added at time of export

XML_DOCUMENT_DEF_ID

Used when exporting XML files. (XML_DOCUMENT_DEF_ID = XML_DOCUMENT_DEF.ID)

BILLING_SOURCE_CLASS

Class used to model the table defined in the column 'BILLING_SOURCE_TABLE_NAME'

FILE_NAME_SUFFIX

Suffix (extension) to be added to the export filename

FILE_NAME_GENERATOR_METHOD

Method on the BILLING_SOURCE_CLASS used to generate a filename during export. This method must take the ID of the record in the 'BILLING_SOURCE_TABLE_NAME' table, and the CDR_FILE_DEF ID as parameters. For example for exporting a CDR file, the ID will be the ID of the appropriate SP_FILE_HEADER record linked to the rated BILLING_RECORDs (BILLING_RECORD.SP_FILE_ID = SP_FILE_HEADER.ID) being exported.

PRE_PROCESSOR_METHOD

Method in the BILLING_SOURCE_CLASS called before processing a file. The method must take CdrFileDef object as parameter . Could be used to validate if a file has already been loaded or to delete all record in a table before loading.

POST_PROCESSOR_METHOD

Method in the BILLING_SOURCE_CLASS called after processing a file. The method must take CdrFileDef object as parameter . Could be used for validating contents of the detail against information on the trailer

RECORD_FOR_HEADER

Possible values are Y and N. This column is solely taken into an account if the PERSIST column has the value Y. In case the first line in the loaded file must be stored in the BATCH_FILE_LINE table, the RECORD_FOR_HEADER column must be set to Y.

STATUS_COLUMN_NAME

String value. Defines the column name for status of billing source table. If left empty a default name of STATUS is used.

NUMBER_OF_RECS_COLUMN_NAME

String with default value 'NUMBER_OF_RECS'. Defines the column name, where the number of the content lines in a loaded file must be stored.

DATE_LOADED_COLUMN_NAME

String with default value 'DATE_LOADED'. Defines the column name, where the time of the loading must be stored. The column is mandatory in the billing source table.

SAVE_RECORD_ORDER

Char with possible values 'Y'/'N' and default value 'N'. Defines whether line number of a loaded record must be stored in the db.

RECORD_ORDER_COLUMN_NAME

String with default value 'LINE_IN_FILE'. Defines the column name, where the line-number of the loaded record must be stored.

STATUS_VALUE

String with default value '0'. Defines the status of the loaded file.

COMMENT_COLUMN_NAME

Defines the column name in the billing source table (defined in the column billing_source_table_name), where error messages are posted if a file generation fails. Not mandatory in the billing source table. If left out error messages are simply not posted in the billing source table.

PRE_PROCESSOR_HOOKPOINT_KEY

Sets the Hookpoint key to be called in the Pre Process. Is invoked with the prefix FILE_PROCESSOR_.

POST_PROCESSOR_HOOKPOINT_KEY

Sets the Hookpoint key to be called in the Post Process. Is invoked with the prefix FILE_PROCESSOR_.

3.1.2 CDR Record Definition (CDR_RECORD_DEF)

A CDR Record Definition (CDR_RECORD_DEF) defines a record in a CDR file and has the following columns in the CDR_RECORD_DEF table.

If this is set, it will save this value into RECORD_TABLE_NAME.HOOKPOINT_KEY, not a mandatory value.

COLUMN NAME

DESCRIPTION

ID

Unique table ID

NAME

Name of record definition

CODE

Code for sub-classing should one of the following DETAIL,HEADER,TRAILER

DESCRIPTION

Record definition description

CDR_FILE_DEF_ID

ID of CDR_FILE_DEF for which this record definition record belongs

FIELD_SEPARATOR_ID

Defines what separates one record field from another. Points to a record in the ITEM_SEPARATOR table (CDR_RECORD_DEF.FIELD_SEPARATOR_ID = ITEM_SEPRARATOR.ID)

MAX_LENGTH

Defines the length of the record; the default value being -1 meaning record is of variable length

FULL_LENGTH

If the MAX_LENGTH attribute is not -1, and the FULL_LENGTH attribute is set to ‘Y’, then the record must be of length MAX_LENGTH. Default value is N

CDR_PARSER_ID

Parser used to parse a record into fields. (CDR_RECORD_DEF.CDR_PARSER_ID = CDR_PARSER.ID

RECORD_TABLE_NAME

Name of the table where records are saved. Usually for header and trailer records, the value of this table is the SOURCE_TABLE while for detail records it is the record (BILLING_RECORD) table

RECORD_TABLE_CODE

Code to be used in the record table in-case sub-classing is to be used

RECORD_IDENTIFIER_TYPE

If this value is set, then the record will be identified using a CDR_RECORD_IDENTIFIER. Possible values are 'ALL' or 'AT_LEAST_ONE' . These are explained in section 3.1.3

PERSIST

Determines if a record should be persisted. Sometimes, one may not need to persist a CDR_RECORD (as in the case where the record is a header of column name). Default value is 'Y' (meaning persist data) otherwise it is 'N' (meaning do not persist data)

RECORD_CLASS

The fully qualified class name of that models the table defined by the RECORD_TABLE_NAME

SOURCE_TABLE_KEY

This columns holds the column name in RECORD_TABLE_NAME table that points to the SOURCE TABLE. This is used by CDR_RECORD_DEFs.
For file generator:
For CDR_RECORD_DEF entries having CODE = 'DETAIL': If this field is empty, the value 'SP_FILE_ID' is used.
For CDR_RECORD_DEF entries having CODE = 'HEADER' or 'TRAILER': If this field is empty, the value 'ID' is used. This is usually the case when the HEADER table is also the source table. So if the file should contain HEADER, TRAILER and DETAIL records and the  data model in the DB contains and extra table for holding the SOURCE info, then all three CDR_RECORD_DEF entries (For HEADER, TRAILER and DETAIL) must contain appropriate value in SOURCE_TABLE_KEY. 
For file loader:
This is used only by CDR_RECORD_DEFs with CODE = 'DETAIL'. If this field is empty, the value 'BILLING_SOURCE_ID' is used.
For example if the 'BILLING_SOURCE_TABLE_NAME', of the appropriate CDR_FILE_DEF record, is IBASIS_MONTH and the detail record table name (RECORD_TABLE_NAME) is IBASIS_RECORD where IBASIS_RECORD.IBASIS_MONTH_ID = IBASIS_MONTH.ID, then the SOURCE_TABLE_KEY will have a value of ‘IBASIS_MONTH_ID’

STATUS_COLUMN_NAME

String value. Name of the column where the record status must be stored.

STATUS_VALUE

Value to be set in status column defined in STATUS_COLUMN_NAME.

HOOKPOINT_KEY

XML_FILE_NAME_COLUMN

This column can be used to generate both a flat file and also an Xml file for the same source record. The value of XML_FILE_NAME_COLUMN must be the name of the column from the Source table where the generated XML filename will be saved to. The FILENAME column of Source table will be used to save the filename if this CDR_FILE_DEF.XML_FILE_NAME_COLUMN is empty. 

If both a flat file and an XML file should be generated on the same source record:

  • FILENAME column of Source table will be used to save the filename of the flat file
  • The source table column name configured in XML_FILE_NAME_COLUMN of CDR_FILE_DEF record will be used to save the XML file name.

3.1.2 CDR Record Definition (CDR_RECORD_DEF)

A CDR Record Definition (CDR_RECORD_DEF) defines a record in a CDR file and has the following columns in the CDR_RECORD_DEF table.

COLUMN NAME

DESCRIPTION

ID

Unique table ID

NAME

Name of record definition

CODE

Code for sub-classing should one of the following DETAIL,HEADER,TRAILER

DESCRIPTION

Record definition description

CDR_FILE_DEF_ID

ID of CDR_FILE_DEF for which this record definition record belongs

FIELD_SEPARATOR_ID

Defines what separates one record field from another. Points to a record in the ITEM_SEPARATOR table (CDR_RECORD_DEF.FIELD_SEPARATOR_ID = ITEM_SEPRARATOR.ID)

MAX_LENGTH

Defines the length of the record; the default value being -1 meaning record is of variable length

FULL_LENGTH

If the MAX_LENGTH attribute is not -1, and the FULL_LENGTH attribute is set to ‘Y’, then the record must be of length MAX_LENGTH. Default value is N

CDR_PARSER_ID

Parser used to parse a record into fields. (CDR_RECORD_DEF.CDR_PARSER_ID = CDR_PARSER.ID

RECORD_TABLE_NAME

Name of the table where records are saved. Usually for header and trailer records, the value of this table is the SOURCE_TABLE while for detail records it is the record (BILLING_RECORD) table

RECORD_TABLE_CODE

Code to be used in the record table in-case sub-classing is to be used

RECORD_IDENTIFIER_TYPE

If this value is set, then the record will be identified using a CDR_RECORD_IDENTIFIER. Possible values are 'ALL' or 'AT_LEAST_ONE' . These are explained in section 3.1.3

PERSIST

Determines if a record should be persisted. Sometimes, one may not need to persist a CDR_RECORD (as in the case where the record is a header of column name). Default value is 'Y' (meaning persist data) otherwise it is 'N' (meaning do not persist data)

RECORD_CLASS

The fully qualified class name of that models the table defined by the RECORD_TABLE_NAME

SOURCE_TABLE_KEY

This columns holds the column name in RECORD_TABLE_NAME table that points to the SOURCE TABLE. This is used by CDR_RECORD_DEFs.
For file generator:
For CDR_RECORD_DEF entries having CODE = 'DETAIL': If this field is empty, the value 'SP_FILE_ID' is used.
For CDR_RECORD_DEF entries having CODE = 'HEADER' or 'TRAILER': If this field is empty, the value 'ID' is used. This is usually the case when the HEADER table is also the source table. So if the file should contain HEADER, TRAILER and DETAIL records and the  data model in the DB contains and extra table for holding the SOURCE info, then all three CDR_RECORD_DEF entries (For HEADER, TRAILER and DETAIL) must contain appropriate value in SOURCE_TABLE_KEY. 
For file loader:
This is used only by CDR_RECORD_DEFs with CODE = 'DETAIL'. If this field is empty, the value 'BILLING_SOURCE_ID' is used.
For example if the 'BILLING_SOURCE_TABLE_NAME', of the appropriate CDR_FILE_DEF record, is IBASIS_MONTH and the detail record table name (RECORD_TABLE_NAME) is IBASIS_RECORD where IBASIS_RECORD.IBASIS_MONTH_ID = IBASIS_MONTH.ID, then the SOURCE_TABLE_KEY will have a value of ‘IBASIS_MONTH_ID’

STATUS_COLUMN_NAME

String value. Name of the column where the record status must be stored.

STATUS_VALUE

Value to be set in status column defined in STATUS_COLUMN_NAME.

HOOKPOINT_KEY

If this is set, it will save this value into RECORD_TABLE_NAME.HOOKPOINT_KEY, not a mandatory value.

SEQUENCE

SEQUENCE column is used to define multiple record definitions for same record type (i.e. for example multiple record defintions for HEDAER record for same File Definition) and define the sequence in which they can appear in the exported file. For example if an exported file should contain 3 lines in the header and each of these lines has a difference structure, then it is possible to define 3 HEADER record definition entries with SEQUENCE 1,2 and 3 based on the required order of these lines in the file. Then the file processor with get all the header definitions and handles one by one in the defined sequence, writing the lines matching that record definition only. 

Important Note: If only one record definition entry is needed for a record type, then the SEQUENCE Column of that record definition entry must be left empty.

 

Example:

NameCODESEQUENCEDESCRIPTIONCDR_FILE_DEF_ID RECORD_TABLE_NAME
DemoFile_Header1HEADER1Header record definition 1123456789DEMO_FILE_HEADER
DemoFile_Header2HEADER2Header record definition 2 123456789DEMO_FILE_HEADER
DemoFile_RecordDETAIL Detail record definition 123456789DEMO_FILE_RECORD
DemoFile_FooterTRAILER Trailer record definition 123456789DEMO_FILE_FOOTER

3.1.3 CDR Record Identifier (CDR_RECORD_IDENTIFIER)

...