Question: I Have scheduled various pipeline that copys incremental data from On Premises SQL DB to Azure Datawarehouse, sometimes there are some issues with the number of rows, like the row count not matching or same rows getting copied, How can I check what rows are getting copied over to the Datawarehouse so that If there is a redundancy or discrepancy I should be aware about.

I know that ADF V1 Pipeline Monitoring feature just shows the number of rows that got copied over, but not what rows got copied over, is there a way so that I can find out what got copied and what not.

This things become much more hard when we are dealing with the tables which are having million rows.

Answer: 
To split a list in half, with both halves in order, you should generally use a tortoise and hare algorithm.

```
-- split2 xs = splitAt (length xs `quot` 2) xs
split2 :: [a] -> ([a], [a])
split2 xs0 = go xs0 xs0
  where
    go (_:_:hs) (t:ts) =
      let (front, rear) = go hs ts
      in (t:front, rear)
    go _ ts = ([], ts)

```

This should generally be more efficient than calculating the length of the list and dividing by two. It will also work even if the list is infinite.

---

In this case, however, you don't need a lazy version; you're going to use the second half pretty much immediately. So you can use this more Lisp/Scheme/ML-style version if you prefer:

```
split2' :: [a] -> ([a], [a])
split2' xs0 = go [] xs0 xs0
  where
    go front (_:_:hs) (t:ts) = go (t:front) hs ts
    go front _ ts = (reverse front, ts)

```

I'm not sure which will be faster, but `split2'` is less susceptible to space leaks introduced by compiler transformations.
not a good shuffle, your first and last elements never move.

something like this?

```
> let shuffle 0 x = x
      shuffle n x = shuffle (n-1) $ uncurry riffle $ splitAt (length x `div` 2) x

```

or with iterate