title: Massive Insert from a JSON file using Pg-Promise
body: <h1>Load huge JSON file using Pg-Promise helpers and fs stream.</h1>
  
  <p>I'm using pg-promise and I want to make massive inserts into a table using pgp.helpers. I've seen solution like Multi-row insert with pg-promise and also followed Data import for streams (Spex) but still it fails with the same error as in this post <a href="https://github.com/vitaly-t/spex/issues/8" rel="nofollow noreferrer">https://github.com/vitaly-t/spex/issues/8</a></p>
  
  <p>I tried using a example from the other post on CSV stream(rs.csv()) but when i replaced the same with JSonStream parser I still get the same error. </p>
  
  <p>Can you please share a working example? </p>
  
  <p><code>db.tx(t =&gt; {
        return streamRead.call(t, stream.pipe(parser), receiver)
    })</code></p>