I just published an application that works perfectly on the dev-environment. However, the app retrieves data from our IP-protected Azure database and the IP-address of Viktor is not yet added to the whitelist.
Can someone provide me this information or give a workaround?
sql_conn = pymssql.connect(server=server, user=user, password=password, database=db)
cursor = sql_conn.cursor()
query = “SELECT [Sensor],[Dag],[Gem_Tubelevel] FROM Sensordata1pD WHERE Sensor IN (%s) AND Dag between (%s) and (%s)” % (locations_sql, start, end)
query = “SELECT [Code],[TimeStampUTC],[TubeLevel] FROM SensorData WHERE Code IN (%s) AND TimeStampUTC between (%s) and (%s)” % (locations_sql, start, end)
Thank you in advance!
I will look into some possibilities and get back to you probably some time tomorrow
There are a few directions you can take on this:
- Query the database using a generic worker. This would mean that you install a worker on the machine that holds the database and is able to run a script similar to the one you pasted above. You can send an input file that contains the relevant parameters for your query. Subsequently, you trigger the script that reads the input file, queries the database and creates a result file. The result file is returned to the platform and can be parsed in the app.
- The platform has a set of fixed IP-addresses, but we do not plan on keeping these stable. Therefore, the ip-addresses will be rotated sometime in the future. If this happens the app will not be able to connect the db anymore and require an update
- There might be ways to configure the azure database such that it doesn’t need a specific white-listed set of ip-addresses for secure communication. Did you look into this?
Thank you for the response. I will discuss these options internally.
In the meantime, would it be possible to share the currently fixed IP-addresses as the client needs the data as soon as possible? It concerns ground water levels for an international project that not have been monitored since July so an update is critical.
I will send you a direct message.