Solved

getting error while running DB extractor for timeseries destination type

  • 13 October 2023
  • 5 replies
  • 66 views

Badge

Hi,

I am running the DB Extractor, where my Source is an odbc connection(SQL DB) and destination is Timeseries. But I am getting the error: “ [ERROR   ] QueryExecutor_0 - Unexpected error in UB-Training-Timeseries-objects: 'NoneType' object has no attribute 'timestamp'”

Attaching the screenshot of my data in SQL, error Log and config file.

I am using DB extraction v3.0.0.

Please reach out if you need more info.

icon

Best answer by Rogerio Júnior 25 October 2023, 08:56

View original

5 replies

Userlevel 3
Badge

From a first look, the configuration looks correct. 
It could be that some entries in the “START_DATETIME” column are None and therefore it would fail on that

adding a where clause check that “START_DATETIME” is not null for example

Or it could be that the format of the timestamp is not correct, you can try to cast it to a datetime object

CAST(START_DATETIME as datetime)

 

Another temporary solution is to send the data to RAW where you would see what data is sent or not and from there, you can move to sending the data directly to time_series

For example, like the below

    destination: 
       database: "Test-DB"
       table: "Test-Table"

    primary-key: "{UB}:{Well}:{TSOBJ}"

 

Badge

Thanks for the suggestion!

Temporarily I have ingested my Timeseries data through raw.

I also tried to update the query as you suggested but I am getting same error. Attached query and log file.

Any other ideas?

Userlevel 3

Hi @Utkarsh Bhakne, thanks for your reply. I just want to let you know that we’re checking if there’s a bug somewhere. We’ll get back to you!

Hi,

We released a fix for this issue (DB Extractor version 3.1.1). Please let us know the results.

Regards,

Rogerio Junior
Cognite Engineering

Badge

Thanks @Rogerio Júnior @Carin Meems 

It is working now!

Reply