...
Code Block |
---|
map = MAP({EXPRESSIONS = [['TimeInterval.Start+1000','EndTS']], KEEPINPUT = true}, nexmark:person) out = TIMESTAMP({end='EndTS', SYSTEMTIME = false}, map) |
Sometimes there are problem with some date string. The following example from Tankerkoenig data shows how to handle such cases:
Code Block |
---|
#PARSER PQL
#ADDQUERY
in = CSVFILESOURCE({
schema = [
['date', 'STRING'],
['station_uuid','STRING'],
['diesel','FLOAT'],
['e5','FLOAT'],
['e10','FLOAT'],
['dieselchange','BOOLEAN'],
['e5change','BOOLEAN'],
['e10change','BOOLEAN']
],
READFIRSTLINE = false,
filename = 'D:/tankerkoenig-data/prices/2023/01/2023-01-01-prices.csv',
source = 'Tanker-2023-01-01'
}
)
/// Java seems to have problems with: 2023-01-01 00:00:10+01 yyyy-MM-DD HH:mm:ssZ
tsCorrected = TIMESTAMP({START = 'toTimestamp(substring(date,0,19),"yyyy-MM-DD HH:mm:ss")'}, in) |