Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
samsameta10
Contributor
Contributor

Mongo Database parsing timestamp trimming trailing zeros in milliseconds

Hi All,

I am beginner to Mongo Database, we are pulling document having array object contains timestamp column. 

Observed that when extracting the object even as string the timestamp column milliseconds trailing zeroes are getting trimmed.

Mongo version : 4.4.X

job design :

tmonginput -- tmap-- logrow

schema defined-- _id,Messageflow_status(array of object defined data type as string)

Please can any one help on this trailing ,zeros getting trimmed even when read as string 

Example : 

Mongo source column value : "2022-08-23T18:00:32.000Z" ,  "2022-02-24T04:00:05.390Z"

Talend parsed Values :  "2022-08-23T18:00:32Z" ,  "2022-02-24T04:00:05.39Z"

sample mongo document :

{ "_id" : { 

    { "$oid" : "6456a767498ba8736232"}

  },

 "Messageflow_status":[{  

     "name":"test",

"created_ts":{

 "$date": "2022-08-23T18:00:32.000Z"

 },   

    {  

     "name":"test",

"created_ts":{

 "$date": "2022-09-25T08:00:32.390Z"

 },   

    {  

     "name":"test",

"created_ts":{

 "$date": "2022-04-14T16:02:44.348Z"

 }   

]}  

Labels (3)
1 Reply
Anonymous
Not applicable

Can you show me what the Date Pattern looks like for your date column? It should look something like this....

 

"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"

 

I realise that I may have misunderstood this question as well. I am assuming you are getting the data in column format from the XML. If this is not the case, can you show me the job you are working with?