Qlik Community

Qlik Connectors Discussions

Discussion Board for collaboration regarding Qlik Connectors.


Qlik Sense Facebook Connector Real-Time Data

Dear Qlik Community,

I hope this finds you well. I have a query regarding the facebook insights connector. Using the connector seems to be quite straightforward and I have made a demo app using it. How can I make the app real-time?

In the connector page it asks to set a start date and end date for every table. I would prefer not to have to re-do that every time. Is it possible to put the end date as 2030 or some other time in the future so that When I click 'load data' in the app I will keep getting up to date data rather than having to re-set the start and end date?  (I also plan to include twitter and google analytics data to this app and also noticed that the same start/end date applies in the web connector).

Any suggestions or solutions would be much appreciated. Thank you for your support!



Tags (1)
1 Reply

Re: Qlik Sense Facebook Connector Real-Time Data


You can replace the hard-coded dates in the load statement with variables.

At the start of your script, define the dates to be variables based on today, so for example to get the previous 90 days you could have something like:

Let vStartDate = date(today()- 91,'YYYY-MM-DD'); //the date 90 days from yesterday

Let vEndDate = date(today()- 1,'YYYY-MM-DD');//yesterday's date

So, whereas in your load script you'll see something hardcoded like startDate=01-07-2018 and endDate=29-10-2018.

instead refer to the variables, so...

startDate=$(vStartDate) and endDate=$(vEndDate)

Replacing the parameter values with variables is a powerful way of using the connectors.

I hope this helps.


Lead Product Designer for Qlik Web Connectors