コード例 #1
0
ファイル: whale_loader.py プロジェクト: vamshirapolu/whale
def _append_to_temp_manifest(database,
                             cluster,
                             schema,
                             table,
                             tmp_manifest_path=paths.TMP_MANIFEST_PATH):
    relative_file_path = get_table_file_path_relative(database, cluster,
                                                      schema, table)
    with open(tmp_manifest_path, "a") as f:
        f.write(relative_file_path + "\n")
コード例 #2
0
ファイル: metric_value.py プロジェクト: Victoriapm/whale
 def record(self):
     relative_file_path = get_table_file_path_relative(
         self.database, self.cluster, self.schema,
         self.table) + f"/{self.name}.csv"
     record_path = os.path.join(paths.METRICS_PATH, relative_file_path)
     record_dirname = os.path.dirname(record_path)
     Path(record_dirname).mkdir(parents=True, exist_ok=True)
     with open(record_path, "a") as f:
         f.write(f"{self.value},{self.execution_time}\n")