Skip to content

message.getColCount

Use when: You want to read values from the modified message during mapping. If you need the original incoming message, use source.getColCount.

Signature: message.getColCount()

Returns: Integer count - the number of columns in a message

Get the number of columns in a message.

Note

This method only applies to CSV formatted messages.

Parameters

None

Example

// Example: Get the number of columns in a CSV message.

// Sample CSV message structure
message = qie.createCSVMessage(
    "Name,Age,Location\n" +
    "John,30,NY\n" +
    "Alice,25,LA"
);

// Retrieve column count
var colCount = message.getColCount(); // 3