datahq / dataflows

DataFlows is a simple, intuitive lightweight framework for building data processing flows in python.
https://dataflows.org
MIT License
194 stars 39 forks source link

Improvements to add_computed_fields, allow custom functions as data source #78

Closed akariv closed 5 years ago

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 282


Totals Coverage Status
Change from base Build 279: 0.2%
Covered Lines: 1436
Relevant Lines: 1784

💛 - Coveralls
coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 283


Totals Coverage Status
Change from base Build 279: 0.2%
Covered Lines: 1436
Relevant Lines: 1784

💛 - Coveralls
akariv commented 5 years ago
>>> from datetime import datetime
>>> datetime.today()
datetime.datetime(2019, 4, 7, 19, 46, 24, 596912)

:)

On Sun, Apr 7, 2019 at 4:29 PM Shahar Evron notifications@github.com wrote:

@shevron commented on this pull request.

In PROCESSORS.md https://github.com/datahq/dataflows/pull/78#discussion_r272834642:

  • resources
    • A name of a resource to operate on
    • A regular expression matching resource names
    • A list of resource names
    • None indicates operation should be done on all resources
    • The index of the resource in the package

+Examples: +```python +Flow(

  • ... adding single fields with built-in operations

  • add_computed_field(target='the-avg', operation='avg', source=['col-a', 'col-b']),
  • add_computed_field(target='the-sum', operation='sum', source=['col-a', 'col-b']),
  • ... adding two fields in a single operation

  • add_computed_field([
  • dict(target='formatted', operation='format', with_='{col-a}-{col-b}'),
  • dict(target=dict(name='created', type='date'), operation='constant', with_=datetime.today()),

Most likely this should be datetime.today not datetime.today()?

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/datahq/dataflows/pull/78#pullrequestreview-223583218, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQMddI5gikhF-sdxScPG4_jDezZBu-tks5vefKqgaJpZM4cgB_1 .