Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Rest API connection

Hi All,

I am having an issue loading the data from a rest connection. The problem is there is a column which repeated twice with exact name in the source because of which the qlik is not letting me select Header as true (It is not accepting duplicates). If I do not select header as true then it is going to assign col1,col2, so on as column names. However, I went getting the data with columns as col1, col2, col3 etc. Later, I am trying to change the column names with peek function by considering the first row value as the column name. but, it is not accepting the peek function. Is there any solution for this? Please find the sample code:

LIB CONNECT TO 'final export (cysemi_niki)';

FROM CSV (header off, delimiter ",", quote """") "CSV_source";

LOAD [col_1],
RESIDENT RestConnectorMasterTable;

[col_1] as peek('col_1',0,'test'),
[col_2] as peek('col_2',0,'test'),
[col_3] as peek('col_3',0,'test'),
[col_4] as peek('col_4',0,'test'),
[col_5] as peek('col_5',0,'test'),
[col_6] as peek('col_6',0,'test'),
[col_7] as peek('col_7',0,'test'),
[col_8] as peek('col_8',0,'test'),
[col_9] as peek('col_9',0,'test'),
[col_10] as peek('col_10',0,'test')

resident test;

DROP TABLE RestConnectorMasterTable;


The above code is showing error at peek function. Please note that for simplicity purpose i have taken only few columns, but in the data I have more than 200 columns.




0 Replies