MongoDB Query Component Issue : Fails to convert MongoDB Timestamp

Hi Matillion Community,

 

I'm facing an issue while loading Timestamp objects from a MongoDB table to a Snowflake table.

 

In my MongoDB table, I have a field nammed T with type Timestamp. Here's an example : Timestamp(1685434558, 15). It represents Tuesday 30 May 2023 08:15:58 with an ordinal increment of 15.

 

I load this MongoDB table in a Snowflake table with a MongoDB Query Component by adding this simple SQL query : SELECT document(*) FROM table; The schema of the Snowflake is the following :

CREATE OR REPLACE TABLE tableName (

JSON VARIANT

);

 

The output of the field T is the following in the VARIANT Snowflake object :

{

 "$timestamp": {

  "i": 1807392968,

  "t": 392

 }

}

 

My question is the following : what are i and t and how can I convert the Snowflake object to get my 1685434558 seconds Timestamp ?

 

Thank you for your help,

Have a good day,

 

Victor

 

Hi @victor.cour

I am sorry this was missed, I just wanted to check in to see if you were able to resolve this.

We do have some informative documentation for this here

Kind regards, Joe