Using S3 Files in the SQL query?

Hi, I am noticing that S3 files cannot be used when we use a query in custom SQL. Is there a work around to add S3 files? or probably i am missing a syntax on my end? I am trying to use it as CTI’s but it gives me an error. Do you happen to know if that’s possible in QS?

Thanks for the help!!

Hi @Abdul_Mohammed

Can you provide more detail around the SQL you are trying to use to reference S3 files?

You might need to create an Athena table that references your S3 files and then reference the view in QuickSight if you want to execute SQL.

Thank you Max for the quick reply here. Here is the code i am trying to add within my SQL.

Hey @Abdul_Mohammed,

Thanks for the context. I don’t think you can create a table like this in QuickSight custom SQL.

Like I previously suggested, I would recommend one of the following solutions:

  1. Create an Athena table first and then use QuickSight to connect to it if you want to use custom SQL.

  2. If you want to connect to one S3 object, reference it following this documentation: Creating a dataset using Amazon S3 files - Amazon QuickSight

Note: You will not be able to use custom SQL with option 2

1 Like

Thanks Max, i will try option 2 to get the data into QS and use joins to link my data sets. I am not quite familiar with Option 1.

Hi Max,

Curious on your option 1 from above, is there documentation where i can refer to on how i can integrate Athena to quick sight? Just for my learning process. Thank you for your quick responses and help here.