I am getting some fields from Multiple tables using joins using a select statement(5 fields).

I have to insert these values in another Table Table-B which is having more columns(10 columns).

How to insert these values in the Table_B like Col1 to id column and Col2 in Alias and Col3 in emp_age and Col4 in occupation.
I am getting the first result of multiple joins in a dataset.
Dataset exlCompaniesDataset = sparkSession.sql("Select query with multiple inner joins");
How to get each column values from Dataset and insert it in Table-B ?