Skip to main content
Solved

SQL query from Cognit Function?


Forum|alt.badge.img

Hi,

Is possible to make a sql query to an external SQL server from a Cognite Function?

 

Best answer by vwrocks8

Ben Brandt wrote:

@vwrocks8 Is there a known IP that the Cognite Function traffic would be coming from that @Pedersen Jon-Robert  would be able to whitelist on his end so that it’s not completely wide open on the internet?

I am not aware of what infrastructure you are running on. For example, this is how the firewall rules work with Azure SQL:

IP firewall rules - Azure SQL Database and Azure Synapse Analytics | Microsoft Docs

 

Cognite Functions is primarily designed to operate on data in CDF, and at the moment it’s not possible for us to provide a list or a range of ip addresses that a function can use. 

 

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

4 replies

  • Practitioner
  • 3 replies
  • May 18, 2022

Yes, all outgoing traffic is allowed. However your SQL server needs to be publicly available for this to work.


Ben Brandt
MVP

@vwrocks8 Is there a known IP that the Cognite Function traffic would be coming from that @Pedersen Jon-Robert  would be able to whitelist on his end so that it’s not completely wide open on the internet?

I am not aware of what infrastructure you are running on. For example, this is how the firewall rules work with Azure SQL:

IP firewall rules - Azure SQL Database and Azure Synapse Analytics | Microsoft Docs

 


Forum|alt.badge.img

It would be great to know IP adress or IP range that Cognite Functions use.

We are using pyodbc but I could not get that to work with Functions. Any tips or alternatives?


  • Practitioner
  • 3 replies
  • Answer
  • May 19, 2022
Ben Brandt wrote:

@vwrocks8 Is there a known IP that the Cognite Function traffic would be coming from that @Pedersen Jon-Robert  would be able to whitelist on his end so that it’s not completely wide open on the internet?

I am not aware of what infrastructure you are running on. For example, this is how the firewall rules work with Azure SQL:

IP firewall rules - Azure SQL Database and Azure Synapse Analytics | Microsoft Docs

 

Cognite Functions is primarily designed to operate on data in CDF, and at the moment it’s not possible for us to provide a list or a range of ip addresses that a function can use. 

 


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