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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors