HIVE_CURSOR_ERROR in Athena with GeoJSON data

0

I am trying to set up a table in Athena to query geospatial data, in GeoJSON format. I have been trying to follow the examples here: https://docs.aws.amazon.com/athena/latest/ug/geospatial-example-queries.html, but my real world case is not working and I get HIVE_CURSOR_ERROR every time I run a simple query.

I have some GeoJSON data in folder in S3. Like this:

{
	"type": "FeatureCollection",
	"features": [
		{
			"id": "0",
			"type": "Feature",
			"properties": {
				"ID": 123456789
			},
			"geometry": {
				"type": "Polygon",
				"coordinates": [
					[
						[
							-5.31743910570464733,
							58.73284229699937
						],
						[
							-5.3173675298630483,
							58.73284570013168
						],
						[
							-5.3172547539133792,
							58.73284991264882
						],
						[
							-5.31722304203592152,
							58.73285104690907
						],
						[
							-5.3172311032208171,
							58.73294883810302
						],
						[
							-5.3174512653466437,
							58.732947705224115
						],
						[
							-5.31744743304667152,
							58.73291410139787
						],
						[
							-5.31743910570464733,
							58.73284229699937
						]
					]
				]
			}
		},
		{
			"id": "1",
			"type": "Feature",
			"properties": {
				"ID": 987654321
			},
			"geometry": {
				"type": "Polygon",
				"coordinates": [
					[
						[
							-3.41743023894912347,
							40.432765268202344
						],
						[
							-3.41736141173642975,
							40.432767724053
						],
						[
							-3.41724749711747035,
							40.432772009098655
						],
						[
							-3.41721649151368283,
							40.43277324408217
						],
						[
							-3.41722304203592152,
							40.43285104690907
						],
						[
							-3.4172547539133792,
							40.43284991264882
						],
						[
							-3.4173675298630483,
							40.43284570013168
						],
						[
							-3.41743910570464733,
							40.43284229699937
						],
						[
							-3.41743140982736242,
							40.432775538535216
						],
						[
							-3.41743023894912347,
							40.432765268202344
						]
					]
				]
			}
		}
	]
}

And I create the table in Athena following the example, like this:

CREATE external TABLE IF NOT EXISTS mydata
 (
 Id bigint,
 BoundaryShape binary
 )
ROW FORMAT SERDE 'com.esri.hadoop.hive.serde.JsonSerde'
STORED AS INPUTFORMAT 'com.esri.json.hadoop.EnclosedJsonInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION 's3://mybucket/folder/sub/location/';

However any query I run against it returns a HIVE_CURSOR_ERROR. Even simply SELECT * FROM mydata.

What am I doing wrong?

greg-eb
gefragt vor 2 Jahren249 Aufrufe
1 Antwort
0
Akzeptierte Antwort
greg-eb
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen