Skip to main content
Solved

Push multiple timeseries in CDF with DB extractor


Forum|alt.badge.img+6

Hello! Is there a way to push multiple timeseries in CDF timeseries within one single query in the DB extractor config.yml file? Or do we need multiple queries?

Also, if my incremental field is a timestamp datetime format, is it working or not as I'm receving an error related to it. 

Regards,

Raluca

Best answer by Dilini Fernando

Hi @Raluca Bala,

I hope now you are able to execute multiple queries after adding "-" to the config file as per the below example.

queries: 
    -   name: my_name_1 
        database: my_database 
        query: first_query 

    -   name: my_name_2 
        database: my_database 
        query: second_query

As of now, I will be closing this thread. If you have any questions please feel free to create a post in hub 

View original
Did this topic help you find an answer to your question?

6 replies

Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • 670 replies
  • August 5, 2024

Hi @Raluca Bala,

Just a quick reminder to take a look at our documentation. To help you with the issue, could you please share the following details?

- Extractor version

- Error message

- Configuration file


Forum|alt.badge.img+6
  • Author
  • Seasoned
  • 16 replies
  • August 6, 2024

Hi @Dilini Fernando , thanks for replying to to this. I’ve gone through the documentation. I’ve managed to create a query to account for multiple timeseries at once and used this conversion within the query for the incremental field chosen as datetime (timestamp):  CAST({incremental-field} AS DATETIME2) >= '{start-at}' . Otherwise it cannot compare the timestamp with a state stored value as string.

 

Raluca


Forum|alt.badge.img+6
  • Author
  • Seasoned
  • 16 replies
  • August 7, 2024

@Dilini Fernando , I have another question/issue: I haven't figure it out how can I retrieve also string/text columns in a separate query with the DB extractor. Tried to put them separately in 2 queries, one for numeric/float columns and one for string/text column but the extractor apparently runs only the second/last query listed in the config.yml file. I also managed to extract all numeric and string/text columns in one query but they are pushed in CDF timeseries as string types.


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • 670 replies
  • August 8, 2024

Hi @Raluca Bala,

I've created a support ticket for this, and the team will investigate and provide you with an update.


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • 670 replies
  • Answer
  • August 28, 2024

Hi @Raluca Bala,

I hope now you are able to execute multiple queries after adding "-" to the config file as per the below example.

queries: 
    -   name: my_name_1 
        database: my_database 
        query: first_query 

    -   name: my_name_2 
        database: my_database 
        query: second_query

As of now, I will be closing this thread. If you have any questions please feel free to create a post in hub 


Forum|alt.badge.img+6
  • Author
  • Seasoned
  • 16 replies
  • August 28, 2024

Thank you, @Dilini Fernando , I've managed to solve it with the above solution from Cognite support team.


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings