Skip to main content
Answer

getting error while running DB extractor for timeseries destination type

  • October 13, 2023
  • 5 replies
  • 88 views

Forum|alt.badge.img+2

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.

Best answer by Rogerio Júnior

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

5 replies

Gaetan  Helness
MVP
Forum|alt.badge.img+1

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}"

 


Forum|alt.badge.img+2
  • Author
  • Committed
  • October 16, 2023

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?


  • Seasoned Practitioner
  • October 24, 2023

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


Forum|alt.badge.img+2
  • Author
  • Committed
  • October 25, 2023

Thanks @Rogerio Júnior @Carin Meems 

It is working now!