Skip to main content
Seasoned ⭐️⭐️
May 14, 2024
Solved

Handle multiple clients in Cognite Functions

  • May 14, 2024
  • 1 reply
  • 74 views

Hi,

 

Is it possible to use multiple clients for the same Cognite Function? I know the handle function only takes one client as argument, but is it possible to initialize another client inside the function? I want my Cognite function to read from prod environment, but write to dev environment, which necessitates two clients.

 

Thanks.

Best answer by Mithila Jayalath

@Vetle Nevland Yes, it is possible to initialize another client inside the function.

1 reply

Mithila Jayalath
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
May 15, 2024

@Vetle Nevland Yes, it is possible to initialize another client inside the function.