I am generating my usql script dynamically reading a table schema. I have existing tsv files present on data lake store and I need to append the new data to those exsiting tsv files. But when I generate usql script, table schema may get change and table may have extra columns added.
As far as I know, we need to have same number of columns in usql script as that of in tsv file. Is it possible to have these newly added columns with some default values? for e.g.
@Result = EXTRACT id string,
firstname string,
lastname string,
department string = "",
emp_id int = 0
FROM @inputfile
USING Extractors.Tsv();
As you can see, department and emp_id columns are newly added and I want to insert them in output file with some default values. If columns are already present in the tsv, pick up the column values else insert some default values for them.
Thanks.