title: How to store bigint array in file in Pyspark?
body: <p>I've a UDF that returns bigint array. I want to store that in a file on Pyspark cluster.</p>
  
  <p>Sample Data -</p>
  
  <pre class="lang-py prettyprint-override"><code>[
      Row(Id='ABCD505936', array=[0, 2, 5, 6, 8, 10, 12, 13, 14, 15, 18]),
      Row(Id='EFGHI155784', array=[1, 2, 4, 10, 16, 22, 27, 32, 36, 38, 39, 40])
  ]
  </code></pre>
  
  <p>I tried saving it like this -</p>
  
  <pre><code>df.write.save("/home/data", format="text", header="true", mode="overwrite")
  </code></pre>
  
  <p>But it throws an error saying -</p>
  
  <blockquote>
    <p>py4j.protocol.Py4JJavaError: An error occurred while calling
    o101.save. : org.apache.spark.sql.AnalysisException: Text data source
    does not support array data type.;</p>
  </blockquote>
  
  <p>Can anyone please help me?</p>