Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I've a report which uses Python script connector as a source. Below is the example of the code.
import requests
import json
import pandas as pd
authentication_url = "https://name.api.yyyymanager.com/Authentication/AuthorizeUser"
credentials = {
"Username":"Sha******ya",
"Password":"*********"
}
response = requests.post(authentication_url,json=credentials)
token = str(response.content)[3:-2]
headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-RM12Api-ApiToken':token
}
# Property Insurance
dataset_url = "https://name.api.yyyymanager.com/ReportWriterReports/218/RunReportWriterReport"
response = requests.get(url=dataset_url,headers=headers)
data = json.loads(response.content)
property_insurance = pd.DataFrame(data['Rows'])
property_insurance = property_insurance[['name','Property Insurance Expiration']]
Using this script we get the data in power bi and based on it we create our visual.
Now when I deploy it in Power BI Service and try to schedule the refresh of the dataset I get the below error at the dataset setting page.
Please suggest how can I schedule refresh for a dataset which uses Python script connector as a data source.