(query_fn, partition)
| 261 | return "INSERT INTO {0} PARTITION (p='{1}') VALUES(1)".format(table, partition) |
| 262 | |
| 263 | def load_data(query_fn, partition): |
| 264 | path = "tmp/{0}/data_file".format(unique_database) |
| 265 | self.hdfs_client.delete_file_dir(path) |
| 266 | self.hdfs_client.create_file(path, "1") |
| 267 | q = "LOAD DATA INPATH '/{0}' INTO TABLE {1} PARTITION (p='{2}')".format( |
| 268 | path, table, partition) |
| 269 | return query_fn(self.client, q) |
| 270 | |
| 271 | insert_dynamic_partition = \ |
| 272 | "INSERT INTO {0} (col, p) SELECT col, p from {0}".format(table) |
nothing calls this directly
no test coverage detected