Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to load few files they are file A and file B for two years that is 2019 and 2020, and they are basically - file_2020_A, file_2019_A, file_2020_B, file_2019_B. The load script which I am using is
[a]:
LOAD *
FROM [filepath/*_A.csv]
[b]:
LOAD*
FROM [filepath/*_B.csv]
what I want is at the time of data loading it will add a suffix at the end of each and every column for all the files.
for e.g., - file A consist of column col1, col2, col3... it will be change to col1_a, col2_a, col3_a and simultaneously for b as well.
please suggest me the change in the existing load script so that I get my result.
I would:
As a potential easier alternative, you could use Qualify *; to generate an automatic prefix (not suffix) of the table name.
I have tried Qualify, but let me tell you what issue I am facing, it creates four different suffix names for four different files, due to which I am not able to get a concatenated table(one below other). See my load script,
[a]:
LOAD *
FROM [filepath/*_A.csv
this will load the file name ending with 'A' and concat them and gives me a single file for A
what I want is - filename ending with 'A' the prefix/suffix should be same