spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvuillermet <>
Subject SQL JSON array operations
Date Thu, 15 Jan 2015 15:02:43 GMT
let's say my json file lines looks like this

{"user": "baz", "tags" : ["foo", "bar"] }

How could I query for user with "bar" tags using SQL

sqlContext.sql("select user from users where tags ?contains? 'bar' ")

I could simplify the request and use the returned RDD to filter on tags but
I'm exploring an app where users can write their SQL queries

View this message in context:
Sent from the Apache Spark User List mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message