def METHOD_NAME(con, hdfs, tmp_dir, unpart_t, df, temp_table):
    part_keys = ["year", "month"]
    con.create_table(temp_table, schema=unpart_t.schema(), partition=part_keys)
    part_t = con.table(temp_table)
    # trim the runtime of this test
    df = df[df.month == "1"].reset_index(drop=True)
    unique_keys = df[part_keys].drop_duplicates()
    hdfs_dir = pjoin(tmp_dir, "load-data-partition")
    df2 = df.drop(["year", "month"], axis="columns")
    csv_props = {"serialization.format": ",", "field.delim": ","}
    for i, (year, month) in enumerate(unique_keys.itertuples(index=False)):
        chunk = df2[(df.year == year) & (df.month == month)]
        chunk_path = pjoin(hdfs_dir, f"{i}.csv")
        con.write_dataframe(chunk, chunk_path)
        # test both styles of insert
        if i:
            part = {"year": year, "month": month}
        else:
            part = [year, month]
        part_t.add_partition(part)
        part_t.alter_partition(part, format="text", serde_properties=csv_props)
        part_t.load_data(chunk_path, partition=part)
    hdfs.rm(hdfs_dir, recursive=True)
    verify_partitioned_table(part_t, df, unique_keys)