Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Uday
Contributor
Contributor

Have different csv files with column names and positions change

I have multiple csv files with columns Date, colum1, column2 in one csv and Date, column2, colum1, and Time, colum 1, column 2.... 

 

I have to check the column names and then remove or add spaces in the column name and if required change the column position.

 

Out of the mentioned scenarios I want the load to be done as "Date/Time, column1/column 1, column2/Column 2

 

Please help me

Labels (3)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

For csv's with column names in the header, position is not important. For name differences, use something like:

Data:
LOAD Date as DateTime, 
	column1, 
	column2 
FROM ....

Concatenate(Data)
LOAD Time as DateTime, 
	[column 1] as column1, 
	[column 2] as column2
FROM ....
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
Anil_Babu_Samineni

Could you please explain in the data set?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jonathandienst
Partner - Champion III
Partner - Champion III

For csv's with column names in the header, position is not important. For name differences, use something like:

Data:
LOAD Date as DateTime, 
	column1, 
	column2 
FROM ....

Concatenate(Data)
LOAD Time as DateTime, 
	[column 1] as column1, 
	[column 2] as column2
FROM ....
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein