Amazon Athena database — is there a way to generate an Data Schema for Amazon ML in an automated way

All we need is an easy explanation of the problem, so here it is.

Amazon Athena database — is there a way to generate an Data Schema for Amazon ML in an automated way

(e.g. a SQL command that would generate the Amazon-format)

Please see:

https://docs.aws.amazon.com/machine-learning/latest/dg/creating-a-data-schema-for-amazon-ml.html

NOTE: I obtained an answer from AWS support; see below.

Although the reference above doesn’t explicitly name the format as JSON, it looks very much like a JSON format to me.

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

FROM AWS Support-Team:

There are 3 ways of obtaining database schemas through AWS services that I have heard so far. The first two are using Lake Formation, and the last is with glue:

  1. In the Lake Formation console window select Tables, click on the desired table, and hit the properties button, this will show a json schema as part of the information ("StorageDescriptor")
  2. If the Lake Formation was setup using database blueprints, the blueprint will contain the schema, it is available from the lake formation console under blueprints
  3. AWS glue data catalog – once a database is crawled by glue, it’s table schemas are available under the “View Properties” after clicking on the table, similar to 1)

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply