Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
thmonte
Helper IV
Helper IV

Ejecución de Python Script en dataset

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?

1 REPLY 1
amitchandak
Super User
Super User

@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 with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.