The error you’re encountering is likely due to the fact that the expression is trying to assign the result of CopyToDataTable() (which returns a DataTable) back into a variable of type Integer.
To fix this, ensure that dt_input is of type DataTable and not Integer.