I'm trying to extract a data from BQ and save it to CSV and then upload it to s3, but I'm having error with the uploading to s3. This is the error I get when I run the script:
raise ValueError('Filename must be a string')
If you can please help me solve this issue, I'm new to Python and AWS. Thank you
Script is:
rows_df = query_job.result().to_dataframe()
file_csv = rows_df.to_csv(s3_filename, sep='|', index=False, encoding='utf-8')
s3.upload_file(file_csv, s3_bucket, file_csv)