def write(self, bucket_name, output_path, output_content): write_to_bucket( get_bucket(bucket_name), output_path, output_content, 'application/{format}'.format(format=self.file_format), compress=True, )
def load_existing_data(self, duration, block): path_prefix = '{type}/{label}'.format( type=self.read_sharing_type, label=self.read_sharing_label ) input_file = get_file_path( 'json', duration, block, path_prefix=path_prefix ) existing_content = read_from_bucket( get_bucket(self.bucket), input_file, ) if existing_content: return json.loads(existing_content)