Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
Highlighted
nate
New Contributor II

How to export data using data using engine API?

Hi all, 

I am doing a POC and was wondering what the process is for exporting data via JSON that is already within the Qlik system. I created a small sample app and just loaded some dummy data into it.  I was playing around with the Engine API Explorer in the dev tools but couldnt figure out the combination of APIs and macros that would export the dummy data that I put into the app. 

Any help is greatly appreciated! 

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: How to export data using data using engine API?

It depends on what "data" you want to retrieve and export.  You choices depending on what you are trying to do.

- A ListObject contains the values for a single field. 

- GetTabledata returns the rows for a single data model table. 

- A HyperCube (generally created with a CreateSessionObject) contains the rows for a set of Dimensions and Measures. 

- You can get the data from an existing visualization with GetObject(id) followed by GetHyperCubeData.

 There are higher level APIs that wrapper these but it generally boils down to the above.  

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

4 Replies
MVP & Luminary
MVP & Luminary

Re: How to export data using data using engine API?

It depends on what "data" you want to retrieve and export.  You choices depending on what you are trying to do.

- A ListObject contains the values for a single field. 

- GetTabledata returns the rows for a single data model table. 

- A HyperCube (generally created with a CreateSessionObject) contains the rows for a set of Dimensions and Measures. 

- You can get the data from an existing visualization with GetObject(id) followed by GetHyperCubeData.

 There are higher level APIs that wrapper these but it generally boils down to the above.  

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

nate
New Contributor II

Re: How to export data using data using engine API?

Awesome thanks! GetTableData was exactly what I was looking for.

As for pulling down an entire data model -- Would you have to make a series of calls i.e. one to get all the table information for the data model (GetTablesAndKeys), and then subsequent calls to get all the data (GetTableData) with the table information provides from GetTablesAndKeys? In other words, there is not function that will just pull down the entire data model and the subsequent data, right?
MVP & Luminary
MVP & Luminary

Re: How to export data using data using engine API?

Yes, as far as I know you would need to loop through the table names and call GetTableData for each one. 

-Rob

nate
New Contributor II

Re: How to export data using data using engine API?

Great. Thanks!