stream example
See original GitHub issueHi, I was wondering if someone could help me with a simple stream example? I’ve tried the following, which appears to be as simple as it gets, but my output file doesn’t contain any data:
const stringifier = Stringify();
Knex.select('*').from('business')
.stream()
.pipe(stringifier)
.pipe(Fs.createWriteStream('out.csv'));
stringifier
uses the node-csv-stringify package.
I’m sure I’m probably missing something here, but can’t seem to get this to work.
I’m using Knex 0.13, Node 7.8.0 and Postgres 9.5
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
10 Examples of Stream API in Java 8 - count + filter + map + ...
Here is an example of counting how many elements are in the stream at any stage of pipeline processing using the count() method...
Read more >The Java 8 Stream API Tutorial - Baeldung
The article is an example-heavy introduction of the possibilities and operations offered by the Java 8 Stream API.
Read more >Java 8 Stream - javatpoint
Java 8 Stream with examples and topics on functional interface, anonymous class, lambda for list, lambda for comparable, default methods, method reference, ...
Read more >A Guide to Java Streams in Java 8: In-Depth Tutorial ... - Stackify
This in-depth tutorial is an introduction to the many functionalities supported by streams, with a focus on simple, practical examples.
Read more >Java Stream API (with Examples) - HowToDoInJava
In Java 8, Stream can be defined as a sequence of elements from a source such as a collection or array. Learn about...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I believe that you need to install
node-pg-query-stream
for knex streaming to work.@mlarcher what about mysql?