detect input stream (csv,ndjson, just text)