Exemple #1
0
 def output(self):
     path = entry_id_2_output_path(self.entry_id, GlobalParams().base_dir)
     client = s3.S3Client(
         aws_access_key_id=S3Params().aws_access_key_id,
         aws_secret_access_key=S3Params().aws_secret_access_key,
         aws_session_token=S3Params().aws_session_token)
     return s3.S3Target(path, None, client)
Exemple #2
0
 def output(self):
     should_use_s3_target_if_caching_is_on = (
         "cache_invalidator"
         not in self.params_for_results_display().keys())
     if should_use_s3_target_if_caching_is_on and config.is_caching_enabled(
             config.get_puppet_account_id()):
         return s3.S3Target(self.output_location, format=format.UTF8)
     else:
         return luigi.LocalTarget(self.output_location)
Exemple #3
0
 def output(self):
     """
     Returns the target output for this task.
     In this case, a successful execution of this task will create a file in the s3 file system.
     :return: the target output for this task.
     :rtype: object (:py:class:`luigi.target.Target`)
     """
     return luigi_s3.S3Target("s3:{0}{1}".format(
         os.environ["LUIGIS3_EXAMPLES"],
         self.date.strftime('streams_%Y_%m_%d_faked.tsv')))
Exemple #4
0
 def output(self):
     """
     Returns the target output for this task.
     In this case, a successful execution of this task will create a file on the local filesystem.
     :return: the target output for this task.
     :rtype: object (:py:class:`luigi.target.Target`)
     """
     s3_string = "s3:{0}{1}".format(
         os.environ["LUIGIS3_EXAMPLES"],
         "artist_streams_{}.tsv".format(self.date_interval))
     return luigi_s3.S3Target(s3_string)
Exemple #5
0
 def output(self):
     s3_string = "s3:{0}{1}".format(
         os.environ["LUIGIS3_EXAMPLES"],
         "top_artists_{}.tsv".format(self.date_interval))
     return luigi_s3.S3Target(s3_string)
Exemple #6
0
 def output(self):
     client = s3.S3Client(
         aws_access_key_id=S3Params().aws_access_key_id,
         aws_secret_access_key=S3Params().aws_secret_access_key,
         aws_session_token=S3Params().aws_session_token)
     return s3.S3Target(date_2_output_path(self.date), None, client)
 def output(self):
     return s3.S3Target("{}/{}".format(path().s3_load_bucket, self.fn_src), client=self.client)
 def output(self):
     if config.is_caching_enabled(config.get_puppet_account_id()):
         return s3.S3Target(self.output_location, format=format.UTF8)
     else:
         return luigi.LocalTarget(self.output_location)