-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.1.15 dataflows>=0.0.65 with deduplicate processor
- Loading branch information
Showing
9 changed files
with
153 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.1.14 | ||
2.1.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from dataflows import Flow, deduplicate | ||
from datapackage_pipelines.wrapper import ingest | ||
from datapackage_pipelines.utilities.flow_utils import spew_flow | ||
|
||
|
||
def flow(parameters): | ||
return Flow( | ||
deduplicate( | ||
resources=parameters.get('resources'), | ||
) | ||
) | ||
|
||
|
||
if __name__ == '__main__': | ||
with ingest() as ctx: | ||
spew_flow(flow(ctx.parameters), ctx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
deduplicate | ||
-- | ||
{ | ||
"resources": ["concat-a1", "concat-a2"] | ||
} | ||
-- | ||
{ | ||
"name": "test", | ||
"resources": [ | ||
{ | ||
"name": "concat-a1", | ||
"dpp:streaming": true, | ||
"path": "concat-a1.csv", | ||
"schema": { "fields": [ | ||
{"name": "a1", "type": "string"}, | ||
{"name": "a2", "type": "string"}, | ||
{"name": "a3", "type": "string"} | ||
], "primaryKey": ["a1", "a2"]} | ||
}, | ||
{ | ||
"name": "concat-a2", | ||
"dpp:streaming": true, | ||
"path": "concat-a2.csv", | ||
"schema": { "fields": [ | ||
{"name": "a1", "type": "string"}, | ||
{"name": "a2", "type": "string"}, | ||
{"name": "a3", "type": "string"} | ||
]} | ||
}, | ||
{ | ||
"name": "concat-c", | ||
"dpp:streaming": true, | ||
"path": "concat-c.csv", | ||
"schema": { "fields": [ | ||
{"name": "c1", "type": "string"}, | ||
{"name": "c2", "type": "string"}, | ||
{"name": "c3", "type": "string"} | ||
]} | ||
} | ||
] | ||
} | ||
-- | ||
{"a1":"a1","a2":"a1","a3":"a2"} | ||
{"a1":"a2","a2":"a1","a3":"a1"} | ||
{"a1":"a1","a2":"a1","a3":"a2"} | ||
{"a1":"a2","a2":"a1","a3":"a1"} | ||
|
||
{"a1":"a1","a2":"a3","a3":"a2"} | ||
{"a1":"a2","a2":"a3","a3":"a1"} | ||
{"a1":"a3","a2":"a4","a3":"a2"} | ||
{"a1":"a4","a2":"a4","a3":"a1"} | ||
|
||
{"c1":"c11","c2":"c21","c3":"c31"} | ||
{"c1":"c12","c2":"c22","c3":"c32"} | ||
{"c1":"c13","c2":"c23","c3":"c33"} | ||
-- | ||
{ | ||
"name": "test", | ||
"profile": "data-package", | ||
"resources": [ | ||
{ | ||
"name": "concat-a1", | ||
"dpp:streaming": true, | ||
"path": "concat-a1.csv", | ||
"profile": "data-resource", | ||
"schema": { "fields": [ | ||
{"name": "a1", "type": "string"}, | ||
{"name": "a2", "type": "string"}, | ||
{"name": "a3", "type": "string"} | ||
], "primaryKey": ["a1", "a2"]} | ||
}, | ||
{ | ||
"name": "concat-a2", | ||
"dpp:streaming": true, | ||
"path": "concat-a2.csv", | ||
"profile": "data-resource", | ||
"schema": { "fields": [ | ||
{"name": "a1", "type": "string"}, | ||
{"name": "a2", "type": "string"}, | ||
{"name": "a3", "type": "string"} | ||
]} | ||
}, | ||
{ | ||
"name": "concat-c", | ||
"dpp:streaming": true, | ||
"path": "concat-c.csv", | ||
"profile": "data-resource", | ||
"schema": { "fields": [ | ||
{"name": "c1", "type": "string"}, | ||
{"name": "c2", "type": "string"}, | ||
{"name": "c3", "type": "string"} | ||
]} | ||
} | ||
] | ||
} | ||
-- | ||
{"a1":"a1","a2":"a1","a3":"a2"} | ||
{"a1":"a2","a2":"a1","a3":"a1"} | ||
|
||
{"a1":"a1","a2":"a3","a3":"a2"} | ||
{"a1":"a2","a2":"a3","a3":"a1"} | ||
{"a1":"a3","a2":"a4","a3":"a2"} | ||
{"a1":"a4","a2":"a4","a3":"a1"} | ||
|
||
{"c1":"c11","c2":"c21","c3":"c31"} | ||
{"c1":"c12","c2":"c22","c3":"c32"} | ||
{"c1":"c13","c2":"c23","c3":"c33"} | ||
|
||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters