UnexpectedParameter error when trying to update Glue table schema as JSON

0

I am trying to add new columns to a table defined in Glue using the "Edit schema as JSON" interface. After adding new objects to the JSON array like:

    {
        "Name": "content_title",
        "Type": "string",
        "Comment": "Added manually by Don 2024-06-25"
    },

I clicked "Save as new table version" but got the following error:

UnexpectedParameter (status: undefined): Unexpected key 'TableId' found in params.TableInput

{ "message": "Unexpected key 'TableId' found in params.TableInput", "code": "UnexpectedParameter", "time": "2024-06-26T00:35:49.887Z" }

There's no instance of TableId anywhere in my JSON input, and I don't see anything under my table's advanced properties with that name either. This error even happens when I click "Save as new table version" using the exact same JSON schema that already exists (i.e., click "Edit schema as JSON" -> change nothing -> click "Save as new table version').

Don
asked 4 months ago168 views
1 Answer
1
Accepted Answer

Hello Don, Thank you very much for your question. The error you're encountering, "Unexpected key 'TableId' found in params.TableInput," suggests that there is an unexpected key being passed in the parameters when you try to save the new table version. This is not directly related to the JSON schema you are editing but rather to the parameters being passed to the AWS Glue API. In order to troubleshoot the issue, you could try the following:

  • Use AWS CLI or SDK to Update Schema: To bypass the issue, you can use the AWS CLI or one of the AWS SDKs to update the schema directly.
  • Double-check Table Input JSON: Ensure that the JSON structure you are using does not include any extraneous fields. It should strictly follow the structure expected by AWS Glue.
  • Update Schema Through AWS Glue Console: As a workaround, you can try to update the schema through the AWS Glue Console in a different way:
  • Navigate to the AWS Glue Console: Go to the "Tables" section and select your table, edit the schema through the console instead of JSON editing.
  • Check AWS Glue API Documentation: Review the AWS Glue API documentation for the updateTable or createTable method to ensure you are passing the correct parameters. The TableInput object should not contain a TableId.

If the issue persists, consider reaching out to AWS Support for further assistance

AWS
answered 4 months ago
profile picture
EXPERT
reviewed 3 months ago
  • I've retried the "Edit schema as JSON" method without making any other changes, and it works now. I'm guessing there was a bug that got fixed.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions