Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The error occurred here:
RequestedNew:
Load *
from RequestedTrips
Where created_at > 2016-05-17 13:50:01
Please help?
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?
//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..?
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.