Create etc/config.properties (coordinator + worker on same machine):
coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8080
discovery.uri=http://localhost:8080
query.max-memory=3GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB
Create etc/catalog/hive.properties:
connector.name=hive-hadoop2
hive.metastore.uri=thrift://localhost:9083
hive.allow-drop-table=true
hive.s3.aws-access-key=YOUR_ACCESS_KEY
hive.s3.aws-secret-key=YOUR_SECRET_KEY
Presto 8.8 improves json_extract and transform functions: tutorial presto 8.8
WITH data AS (
SELECT JSON_PARSE('"name": "Alice", "scores": [95, 87, 92]') AS doc
)
SELECT
json_extract_scalar(doc, '$.name') AS name,
transform(cast(json_extract(doc, '$.scores') AS array(integer)), x -> x + 1) AS adjusted_scores
FROM data;