Joining strings python after sql query
<p>I have an sql query that returns two columns.  I need to join those together while mapping the results into files.</p>

<p>I attempted this:</p>

<pre><code>results = sqlContext.sql(query)

results.map(lambda p: ('::'.join(str(p.title),str(p.genres))).repartition(10).saveAsTextFile(sys.argv[2]))
</code></pre>

<p>This does not give an error, it just quits executing for some reason.</p>

<p>I have gotten it to work when the query only returns one column with this line:</p>

<pre><code>results.map(lambda p: str(p.title)).repartition(10).saveAsTextFile(sys.argv[2])
</code></pre>

<p>How would I join these two columns using the delimiter <code>'::'</code>?</p>