New to AWS, trying to create a table through glue crawler from a .json file that i uploaded into S3.

0

Hello, any help would be much appreciated. I have two files that I need to make tables for one is a csv file that I was able to get the table loaded for through glue crawler. The other file i was not able to load a table for which is a .json file. I have both files uploaded in my s3 bucket but glue crawler crawls through the .json file and returns no records. Please help!

  • Each file should be under each own path, otherwise the crawler cannot create two tables, is that your case?

질문됨 일 년 전1107회 조회
1개 답변
1

To create a table in AWS Glue from a JSON file, you can follow these steps:

  1. Create an IAM role with permissions for AWS Glue to access your S3 bucket. Make sure this role has the necessary permissions to read from your S3 bucket.
  2. Create a Glue Crawler to crawl your JSON file. Here are the steps:
* a. Go to the AWS Glue console and select "Crawlers" in the left navigation pane.
* b. Click on the "Add crawler" button.
* c. Give your crawler a name and select the IAM role you created in step 1.
* d. In the "Specify crawler source" section, select "Data stores" and then "S3". Enter the path to your S3 bucket and the folder where your JSON file is stored.
* e. In the "Add another data store" section, select "No" and click "Next".
* f. In the "Choose an IAM role" section, select the same IAM role you created in step 1 and click "Next".
* g. In the "Create a schedule for this crawler" section, choose "Run on demand" and click "Next".
* h. In the "Configure the crawler's output" section, choose "Add database" and enter a name for your database. Click "Next".
* i. Review your crawler settings and click "Finish".
  1. Run your Glue Crawler by selecting it in the AWS Glue console and clicking "Run crawler".
  2. Once the crawler has finished running, go to the AWS Glue console and select "Tables" in the left navigation pane.
  3. Find the table that was created for your JSON file and click on it.
  4. In the table details page, click on the "Edit schema" button to edit the schema for your table. Here, you can specify the columns in your JSON file and their data types.
  5. Save the changes to your table schema.

That's it! You should now have a table in AWS Glue that was created from your JSON file.

hash
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠