Exemplo n.º 1
0
  @Test
  public void testLoad() {
    HashMap<String, String> options = new HashMap<String, String>();
    options.put("rowTag", booksFileTag);
    options.put("path", booksFile);

    DataFrame df = sqlContext.load("com.databricks.spark.xml", options);
    int result = df.select("description").collect().length;
    Assert.assertEquals(result, numBooks);
  }