def create_partitions()

in athena_glue_service_logs/catalog_manager.py [0:0]


    def create_partitions(self, partition_list):
        """Create the specified partitions in this database table"""
        # Instead of importing math.ceil and converting to floats, round up if we need to
        floor_parts = (len(partition_list) // self.MAX_PARTITION_INPUT_PER_CALL)
        remainder_exists = (len(partition_list) % self.MAX_PARTITION_INPUT_PER_CALL > 0)
        num_calls = floor_parts + remainder_exists

        for i in range(num_calls):
            start_from = i * self.MAX_PARTITION_INPUT_PER_CALL
            end_at = start_from + self.MAX_PARTITION_INPUT_PER_CALL
            self.create_partition_from_slice(partition_list, start_from, end_at)