Skip to content

Commit bc566f8

Browse files
author
Stephane Royer
committed
fixes and excel v2
1 parent 654579a commit bc566f8

File tree

14 files changed

+16577
-74
lines changed

14 files changed

+16577
-74
lines changed

Open_Sans.zip

3.46 MB
Binary file not shown.

documentation/docs/recipes/11_reduceAndAggregate.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ contextStream
8080

8181
## Group By
8282

83-
In the [create several files recipe](docs/recipes/createFiles) `GroupBy` was used to group payloads in a sub process per key. But the `GroupBy` operator can be used to group payload in a list per key.
83+
In the [create several files recipe](/docs/recipes/createFiles) `GroupBy` was used to group payloads in a sub process per key. But the `GroupBy` operator can be used to group payload in a list per key.
8484

8585
```cs {9}
8686
contextStream
@@ -124,7 +124,7 @@ contextStream
124124

125125
`Pivot` makes several aggregation of values on a single output occurrence. Like the `PIVOT` of SQL, or the pivot table of excel.
126126

127-
```cs
127+
```cs {10-16}
128128
contextStream
129129
.CrossApply("create values from enumeration", ctx => Enumerable.Range(1, 100)
130130
.Select(i => new
@@ -145,4 +145,11 @@ contextStream
145145
```
146146
## ToList
147147

148-
TODO
148+
`ToList` aggregates all the payload of every events in one payload that is the list of every payload.
149+
150+
```cs {3}
151+
contextStream
152+
.CrossApply("create values from enumeration", ctx => Enumerable.Range(1, 100))
153+
.ToList("aggregate everything")
154+
.Do("print everything in one go", i => Console.WriteLine(string.Join("-", i)));
155+
```

documentation/docs/recipes/5_database.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,4 +461,8 @@ stream
461461

462462
### Delete using Entity Framework
463463

464-
TODO
464+
TODO: to be done
465+
466+
### Update using Entity Framework
467+
468+
TODO: to be done

documentation/docs/tutorials/2-defineProcess.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -235,20 +235,12 @@ namespace SimpleTutorial
235235
DateOfBirth = i.ToDateColumn("date of birth", "yyyy-MM-dd"),
236236
Reputation = i.ToNumberColumn<int?>("reputation", ".")
237237
}).IsColumnSeparated(','))
238-
.Distinct("exclude duplicates based on the Email", i => i.Email)
239-
.SqlServerSave("upsert using Email as key and ignore the Id", o => o
238+
.Distinct("exclude duplicates", i => i.Email)
239+
.SqlServerSave("save in DB", o => o
240240
.ToTable("dbo.Person")
241241
.SeekOn(p => p.Email)
242242
.DoNotSave(p => p.Id))
243-
.Select("define row to report", i => new { i.Email, i.Id })
244-
.ToTextFileValue("write summary to file",
245-
"report.csv",
246-
FlatFileDefinition.Create(i => new
247-
{
248-
Email = i.ToColumn("Email"),
249-
Id = i.ToNumberColumn<int>("new or existing Id", ".")
250-
}).IsColumnSeparated(','))
251-
.WriteToFile("save log file", i => i.Name);
243+
.Do("display ids on console", i => Console.WriteLine(i.Id));
252244
}
253245
private class Person
254246
{

0 commit comments

Comments
 (0)