Hopefully, this should do the job in sqoop,
–query “select employer_name, case_status, count from h1b_data and $CONDITIONS ORDER BY count DESC, employer_name”
Not sure of the DB (primary key constraints) so took split-by employer_name.
For the query, split-by is required.
Also, don’t think NULL characters are present in employer_name. so ignored it.
The default is text file format - so no action required.
\t delimiter condition is provided.
Also there is a \ before $. Some code is being formatted after submit.
PS: I’m a learner too if wrong please correct as I didn’t execute the command.
it should be grouped by name and status to get count
–query “select employer_name, case_status, count(1) as count from h1b_data where $CONDITIONS group by employer_name, case_status ORDER BY employer_name, count desc”