Forum Discussion

asfdwd's avatar
asfdwd
Frequent Visitor
3 years ago
Solved

Scheduled Refresh for Data imported from Amazon S3

Hi,

 

One datatable for my Power BI report is imported from Amazon S3.

The only way I know is to use python like below. 

import boto3
import pandas as pd
import io

bucket = 'name of your bucket'
key = 'name of your file'

s3 = boto3.client('s3')
f = s3.get_object(Bucket=bucket, Key=key)
shape = pd.read_csv(io.BytesIO(f['Body'].read()), header=0, index_col=0)
shape = shape.apply(lambda x: x.fillna(0))
print(shape)

 However, it seems that Power BI Scheduled Refresh service doesn't support Python.

 

Is it possible that I can do Scheduled Refresh for Data imported from Amazon S3?

1 Reply