Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2016 04:24 PM
@chandras
The sting Interpolation for scala is below.
You can use it to build your query.
Similar exists for python.
1. Your parameters
val p1 = "('0001','0002','0003')"
val p2 = "chandras"2. Build the query
val query = s"select * from df where id in $p1 and name = $p2"3. Then you can query it.
val df1 = sqlContext.sql(query)