DataFrameReader { public Table csv(String file) throws IOException { return csv(CsvReadOptions.builder(file)); } DataFrameReader(ReaderRegistry registry); Table url(String url); Table url(URL url); Table string(String s, String fileExtension); Table file(String file); Table file(File file); Table usingOptions(T options); Table usingOptions(ReadOptions.Builder builder); Table db(ResultSet resultSet); Table db(ResultSet resultSet, String tableName); Table csv(String file); Table csv(String contents, String tableName); Table csv(File file); Table csv(InputStream stream); Table csv(URL url); Table csv(InputStream stream, String name); Table csv(Reader reader); Table csv(CsvReadOptions.Builder options); Table csv(CsvReadOptions options);  }
@Test public void csv() throws IOException { Path path = mockFileHelper("/data/file.csv", ImmutableList.of("region", "canada", "us")); Table expected = Table.create(StringColumn.create("region", new String[] {"canada", "us"})); Table actual = Table.read().csv(Files.newInputStream(path)); assertEquals(expected.columnNames(), actual.columnNames()); assertEquals(expected.stringColumn(0).asList(), actual.stringColumn(0).asList()); }
@Test public void readCsvUrl() throws Exception { URL url = mockUrlHelper( "http: Table expected = Table.create(StringColumn.create("region", new String[] {"canada", "us"})); Table actual = Table.read().csv(url); assertEquals(expected.columnNames(), actual.columnNames()); assertEquals(expected.stringColumn(0).asList(), actual.stringColumn(0).asList()); }