Questions tagged [pg-copy]

3 questions
8
votes
1 answer

Unit test a private method that uses request, pipe and stream using mocks

I want to unit test the exported method in the code below. I want to mock the values in the private method to control the reject/resolves of the returned Promise. client is node-postgres object that is already connected to the database. I know I…
Brian
  • 4,931
  • 3
  • 32
  • 55
0
votes
0 answers

How can i tranform data while using pg-copy-streams library before sending data to s3

While searching for a streaming service from postgres to s3, I came up with the library https://www.npmjs.com/package/pg-copy-streams and it seems it's the perfect I was looking for. I followed this…
Umang Kamdar
  • 33
  • 2
  • 6
0
votes
1 answer

Data incomplete -- Importing CSV-files into a PostgreSQL database using PHP

I have a problem importing csv-files into a PostgreSQL database using php. The csv-file holds around 11000 datalines, however php only imports around 2100 lines. (I looked through the data and found special characters like