Attribute Error :split on spark sql python using lambda
<p>In Spark SQL I am using Python and I am trying to work on the output RDD of below sql. It's a list of tweets. I need to split words and extract the @ but when using map and trying to split by spaces I am getting the undermentioned exception message </p>

<pre><code>words.tw = sqlContext.sql("SELECT text  FROM tweet where text like '%@%'")
tweetrdd = tw.rdd.map(lambda line: line.split(" "))
tweetrdd.collect()


ERROR executor.Executor: Exception in task 0.0 in stage 84.0 (TID 310)
org.apache.spark.api.python.PythonException: Traceback (most recent call last):
  File "/usr/lib/spark/python/lib/pyspark.zip/pyspark/worker.py", line 111, in main
    process()
  File "/usr/lib/spark/python/lib/pyspark.zip/pyspark/worker.py", line 106, in process
    serializer.dump_stream(func(split_index, iterator), outfile)
  File "/usr/lib/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 263, in dump_stream
    vs = list(itertools.islice(iterator, batch))
  File "&lt;stdin&gt;", line 1, in &lt;lambda&gt;
  File "/usr/lib/spark/python/lib/pyspark.zip/pyspark/sql/types.py", line 1272, in __getattr__
    raise AttributeError(item)
**AttributeError: split**
</code></pre>