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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aoliver
Helper III
Helper III

Write data in a csv using Python

hello everyone

I will explain my problem with detail:

 

I have a standard report in powerBI desktop, I have a lot of measures, and I want to save the value of those measures into a "historic log file". So i started to do some tests:

 

I created a file.csv in my computer, and in powerBI desktop i create a custom visual using Python which read all the measures and write their value in the file. (Remember the file is in my computer)

Ok, thats good, this is the first step, lets continue:


Now, I change the location of the file to a specific path in one of the company's servers. Still in powerBI desktop, and It works well too. All the measured saved and the time saved. 

 

So, my idea is the next: I want to upload the report to powerBI Service, and when I refresh the dataset, because the python script is executed again, have another row in my log file. This make sense?

 

The problem begins here: When I try to refresh the report in powerBI service, the python script gives me an error due to No access to the required file (my log file).

Some clarifications: The file is in a path that powerBI service has access, beacuse a gateway is configured there, and in my report I read other data which the same path than my "log file"

 

So, any ideas about how can I achieve my idea? 

Thanks in advance to everyone

 

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi @aoliver 

If you could put the CSV file in your computer instead of one of the company's servers and then try it again.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

If I change the path of the csv into my computer, the refresh dont throw me an error, but dont write into the file.


Very strange, some ideas?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors