title: How to generate datasets dynamically based on schema?
body: <p>I have multiple schema like below with different column names and data types. 
  I want to generate test/simulated data using <code>DataFrame</code> with Scala for each schema and save it to parquet file.</p>
  
  <p>Below is the example schema (from a sample json) to generate data dynamically with dummy values in it.</p>
  
  <pre><code>val schema1 = StructType(
    List(
      StructField("a", DoubleType, true),
      StructField("aa", StringType, true)
      StructField("p", LongType, true),
      StructField("pp", StringType, true)
    )
  )
  </code></pre>
  
  <p>I need rdd/dataframe like this with 1000 rows each based on number of columns in the above schema.</p>
  
  <pre><code>val data = Seq(
    Row(1d, "happy", 1L, "Iam"),
    Row(2d, "sad", 2L, "Iam"),
    Row(3d, "glad", 3L, "Iam")
  )
  </code></pre>
  
  <p>Basically.. like this 200 datasets are there for which I need to generate data dynamically, writing separate programs for each scheme is merely impossible for me.</p>
  
  <p>Pls. help me with your ideas or impl. as I am new to spark.</p>
  
  <p>Is it possible to generate dynamic data based on schema of different types? </p>