Skip to content

Datelist

flowtask.components.DateList

DateList

DateList(loop=None, job=None, stat=None, **kwargs)

Bases: IteratorBase

DateList.

Overview

    Run as many times as dates generated by this component.

.. table:: Properties :widths: auto

+--------------+----------+-----------+-------------------------------------------------------+ | Name | Required | Summary | +--------------+----------+-----------+-------------------------------------------------------+ | range | Yes | Start and end date range parameter | +--------------+----------+-----------+-------------------------------------------------------+ | inc | Yes | Increases the counter value N times | +--------------+----------+-----------+-------------------------------------------------------+ | format | Yes | Date format to generate | +--------------+----------+-----------+-------------------------------------------------------+ | vars | Yes | Generate variables from the start date you generate in each | | | | iterator | +--------------+----------+-----------+-------------------------------------------------------+

Return the list of arbitrary days

Example:

```yaml
DateList:
  range:
    start: 01-12-2021
    end: 24-12-2021
    format: '%d-%m-%Y'
  inc: 1
  format: '%Y-%m-%dT%H:%M:%S'
  vars:
    firstdate: '{date}'
    lastdate:
    - to_midnight
    - mask: '%Y-%m-%d %H:%M:%S'
  iterate: true
```

createJob

createJob(target, params, dt, d)

Create the Job Component.

run async

run()

Async Run Method.

setAttributes

setAttributes(dt)

Defining the result to component.

start async

start(**kwargs)

Get Range of Dates.