Parsing and performing a conversion on a complex stream
In this example we have data from a call center in the Philippines. The managers at the call center want to determine the call volume between midnight and 8 AM so they can staff the call center accordingly. To get this information, there is a timestamp variable that indicates the time when the customer called and the time zone where the customer was located (in this case all customers are in the Pacific time zone). Now there are two wrinkles in this timestamp variable. First, the timestamp variable does not have a constant string length. This variation in position makes it more difficult to extract the actual times because we cannot just specify to extract all characters between position x and position y
. Second, even though all customers called from the Pacific time zone, some called during Pacific Standard Time and others during Pacific Daylight Time, and in the Philippines this time change does not occur, so we'll need to add an...