Closed zelima closed 5 years ago
this works on latest version:
from dataflows import Flow, update_resource, dump_to_path
f = Flow(
[{'hello': 'world'}],
update_resource('res_1', name='countries', path='countries.csv'),
dump_to_path('data'),
)
By default, resources are named like following:
res_1
,res_2
etc.. and paths to the resources look similarres_1.csv
,res_2.csv
...As a dataflows user, I want to name/rename resource(s) with choice of mine, so that I'm able to reuse resource(s) and find them by name, or just look nice
Acceptance Criteria
Analysis
I tried to create a custom processor that changes the name of the resource but does not really work.
Option one: modify
resource
object descriptor:This kind of work as the output file is named
countries.csv
, but nothing is changed inside datapackage.jsonOption 2: modify
pkg
object descriptor:This results in the error, thinking the resource is gone at all