build report csv in chunks instead of big query

Please restore the deleted constants