Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Me estoy conectando a una base de datos SQL que tiene algunos datos GPS en ella. Quiero usar esto para trazar en un mapa en PowerBI pero los datos están en State Plane Coordinate System no En Lat, Long. Python tiene pyproj que hará la conversión por mí. ¿Hay alguna manera de ejecutar una función python en las columnas de la tabla SQL y devolver el resultado en esa tabla?
La secuencia de comandos python es muy simple, donde los valores x,y serían los valores de dos columnas de la tabla sql
import pyproj
# http://spatialreference.org/ref/epsg/4269/
NAD83 = pyproj.CRS("EPSG:4269")
# http://spatialreference.org/ref/esri/nad-1983-stateplane-new-york-long-island-fips-3104-feet/
NYSP1983 = pyproj.CRS("ESRI:102718")
x, y = (923262, 139019)
result = pyproj.transform(NYSP1983, NAD83, x, y)
print(result)
¿Es posible? ¿O tengo que hacer la conversión completa en Python?
@thmonte , refiérase a esto. Puede correr
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-scripts
Pero usted tiene comprobar si este paquete es compatible con power bi - pyproj( Si no es necesario en la interfaz de usuario, Usted debe ser capaz de utilizar)
https://powerbi.microsoft.com/en-us/blog/python-visualizations-in-power-bi-service/
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.