Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to load only updated data from MySql to qlik Sense and update Dashboard?

The error occurred here:

RequestedNew:

Load *

from RequestedTrips

Where created_at > 2016-05-17 13:50:01

Please help?

3 Replies
Gysbert_Wassenaar

Usually there's a bit more info that also has some clues as to what error occurred. Can you post the 10 lines before and after the part you posted above?


talk is cheap, supply exceeds demand
Not applicable
Author

//PHASE 1 ------------------------ Load Data from MySql Database

// RequestedTrips:

// load *;

// sql

// select

// `requested_trips`.`id` as "Trip ID",

//     if(`requested_trips`.`start_date`>'2016-05-01',

//     `requested_trips`.`start_date`,

//         null)

//     as "Trip Start Date",

//     convert_tz(`requested_trips`.`created_at`,'+00:00','+05:30') as "created_at",

// convert_tz(`requested_trips`.`updated_at`,'+00:00','+05:30') as "updated_at"

// FROM requested_trips

// where created_at > '2016-05-18  13:50:01';


//PHASE 2--- Load updated data only from MySql Database on the basis of last created date--------------------

//Last Created date

let Last_Created_Date = peek('created_at',-1,'RequestedTrips');

IncrementalData:

Noconcatenate

load *;

sql

select

  `requested_trips`.`id` as "Trip ID",

    `requested_trips`.`start_date` as "Trip Start Date",

     convert_tz(`requested_trips`.`created_at`,'+00:00','+05:30') as "created_at",

  convert_tz(`requested_trips`.`updated_at`,'+00:00','+05:30') as "updated_at"

FROM requested_trips

where created_at > $(Last_Created_Date);

Concatenate

LOAD *

Resident RequestedTrips

where not Exists(Trip ID);

Drop Table RequestedTrips;

Rename table IncrementalData to RequestedTrips;

need Help..?

Gysbert_Wassenaar

You commented out the section that would create the table RequestedTrips. That means that table is not created and that's the reason you can load any data from it using a resident load.

need Help..?

No thanks. I'm fine.


talk is cheap, supply exceeds demand