How to insert new data to a table in AWS Athena
OK, if you read my previous story, you know how to create a table in AWS Athena.
Now, you have been trying to use the classical INSERT INTO query to add more data. Well, you got an error, don’t you?!
No worries, today you will see how easy it is to insert new data to a table in AWS Athena.
Ps.: I assume you created a table using a CSV file.
The process is easy, to add new data, follow the steps below:
- Check the number of rows in the table (transactions in the example) prior to the addition in AWS Athena console with:
select count(*) from transations
The result is around 56k.
2. Go to the folder where the data from the original data is located. In my example, I will keep using examplemedium.
3. Click on
4. The upload CSV file should contain the same columns and types as the previous data. We will upload fraudTrain.csv from here.
5. Go back to AWS Athena and check the new number of rows in table transactions with
select count(*) from transactions
The result is now: 1852396!
I hope you liked this tutorial!
Please, don’t forget to follow for more!