Click here to Skip to main content
15,888,013 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
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.
C#
@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,
Lokesh

What I have tried:

I didn't find any help regarding this.
Posted
Updated 29-Aug-17 19:46pm

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900