I am trying to create a table in athena through code. Here is the query I use to create the table
I am getting this error :
com.amazonaws.services.athena.model.InvalidRequestException: line 119:1: mismatched input 'ROW' expecting {<EOF>, 'WITH'} (Service: AmazonAthena; Status Code: 400; Error Code: InvalidRequestException; Request ID: 6c48eb7a-ab4b-4c60-b4e1-85c3bb3ace05)
Similar query works just fine via the athena console.
I tried all of the things mentioned in this answer and those didn't work either.
What is causing the issue?