Skip to main content
Answer

SQL query from Cognit Function?

  • May 18, 2022
  • 4 replies
  • 90 views

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

@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. 

 

4 replies

  • Inactive
  • May 18, 2022

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


Ben Brandt
Seasoned
  • Seasoned
  • May 18, 2022

@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?


  • Inactive
  • Answer
  • May 19, 2022

@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.