Solved

SQL query from Cognit Function?


Badge

Hi,

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

 

icon

Best answer by vwrocks8 19 May 2022, 15:19

View original

4 replies

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

Userlevel 3

@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

 

Badge

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?

@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