Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- singleStringOfDelimitedNames= '|'.join([str(x.asDict().values()[0]) for x in
- df3.collect()])
- df2 = sqlContext.sql("""SELECT field1, field2
- FROM
- refinedTable
- WHERE
- createdHiveUDF({0}, {1}, cast(field1 as string), cast(field2 as string))
- """.format(percentage, singleStringOfDelimitedNames))
- df2 = sqlContext.sql("""SELECT field1, field2
- FROM
- refinedTable
- WHERE
- createdHiveUDF({0}, 'Dan|Susie Ann|Bob', cast(field1 as string), cast(field2 as string))
- """.format(percentage))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement