timescaledb-parallel-copy
timescaledb-parallel-copy copied to clipboard
Adding Firstrow and lastrow
I noticed that even though there is a command called limit that limits the number of rows that are inserted, I was wondering if it's possible to also insert a first and last row option that lets you select from which row to start and to which row to stop the insertion. SQL Server for once, has this possiblity and it helped me a lot to incrementally load data from a csv file into my database over time
@ReaperGun It's a little more convoluted, but you should be able to achieve the same result with a combination of -skip-header
, -header-line-count
and -limit
. For example, if you have a file with one line of CSV headers, and you want to start at row 50 and stop before row 200, you could use timescaledb-parallel-copy -skip-header -header-line-count 50 -limit 150
.
Do those options work for your use case?