Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I'm working on one scenario In Qlik Cloud where I need to convrt long length quiz_question column to wide length.
10 questions are in one column , here I am trying to show each question as separate column, so that each user have one row only, each question column have an answer as well
I'm using Generic Load here
Generic LOAD
user_id,
Question,
Answer
Resident SurveyFinal;
My problem here is each question is storing in separate table which I don't want, I want to see all questions in same table only and that too wide format only
My store command is like below and we use same store command for all apps
FOR vCount = 0 to NoOfTables()-1
LET vTableName = TableName($(vCount));
STORE $(vTableName) INTO [$(vSurvey)/$(vTableName).qvd] (qvd);
NEXT vCount
Please help to store all questions in one table only not as multiple tables and not in multiple qvd's storing
You can combine multiple tables in one:
LET vFinalTable = 'MyFinalTable';
FOR vCount = 0 to NoOfTables()-1
LET vTableName = TableName($(vCount));
$(vFinalTable):
LOAD *
RESIDENT $(vTableName)
;
NEXT vCount
STORE $(vFinalTable) INTO [$(vSurvey)/$(vFinalTable).qvd] (qvd);
STORE $(vFinalTable) INTO [$(vSurvey)/$(vFinalTable).parquet] (parquet, compression is brotli);
DROP TABLE $(vFinalTable);
The tables could be joined together like it's described here:
You can combine multiple tables in one:
LET vFinalTable = 'MyFinalTable';
FOR vCount = 0 to NoOfTables()-1
LET vTableName = TableName($(vCount));
$(vFinalTable):
LOAD *
RESIDENT $(vTableName)
;
NEXT vCount
STORE $(vFinalTable) INTO [$(vSurvey)/$(vFinalTable).qvd] (qvd);
STORE $(vFinalTable) INTO [$(vSurvey)/$(vFinalTable).parquet] (parquet, compression is brotli);
DROP TABLE $(vFinalTable);