Tom C
Tom C

Reputation: 372

Create athena table from files in S3 using AWS Glue

I am trying to create an Athena table from a file in an S3 bucket using AWS Glue. I am relatively new to AWS and so even a nudge in the right direction could be a big help.

The problem is I can't parse the contents of the file in the S3 bucket.

I have attempted to use the standard crawlers provided by AWS as well as write a custom classifier (though these seem to still require the S3 bucket file to be in JSON, XML or Parquet format).

The file in my S3 bucket contains the following code

{:description "A lovely journey",
 :name "Train",
 :uuid "00a0a0a0bb",
 :code 'foo-code'}
{:description "A fast ride",
 :name "Plane",
 :uuid "aaa333aaa",
 :code 'foo-code'}

I am wanting to end up with a table containing two rows (for the Train and Plane) and 4 columns ('description', 'name', 'uuid' and 'code').

Any suggestions on how I can automatically convert the file into an athena table would be greatly appreciated.

Upvotes: 1

Views: 595

Answers (1)

Theo
Theo

Reputation: 132952

That looks like Clojure EDN. You might have some luck writing a Glue ETL job in Scala using the Clojure libraries to read the file, but you will unfortunately not get Athena to read it without converting it to JSON.

Upvotes: 2

Related Questions