예제 #1
0
    def _check_roundtrip(self, df):
        writer = DataFrameWriter(self.con, df)
        writer.write_csv()

        table = writer.delimited_table()
        df2 = table.execute()

        assert_frame_equal(df2, df)
예제 #2
0
    def _check_roundtrip(self, df):
        writer = DataFrameWriter(self.con, df)
        writer.write_csv()

        table = writer.delimited_table()
        df2 = table.execute()

        assert_frame_equal(df2, df)
예제 #3
0
    def test_writer_cleanup_deletes_hdfs_dir(self):
        writer = DataFrameWriter(self.con, self.alltypes)
        writer.write_csv()

        path = writer.csv_dir
        assert self.con.hdfs.exists(path)

        writer.cleanup()
        assert not self.con.hdfs.exists(path)

        # noop
        writer.cleanup()
        assert not self.con.hdfs.exists(path)
예제 #4
0
    def test_writer_cleanup_deletes_hdfs_dir(self):
        writer = DataFrameWriter(self.con, self.alltypes)
        writer.write_csv()

        path = writer.csv_dir
        assert self.con.hdfs.exists(path)

        writer.cleanup()
        assert not self.con.hdfs.exists(path)

        # noop
        writer.cleanup()
        assert not self.con.hdfs.exists(path)