Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Extractor Condition from DB

Hi,

I have a table and Data is coming every minutes, due to large data application is getting slow.

I want to put the condition while extracting the data should be every 10 minutes only rather than every minutes?

data set record would be like this

01.01.01 12:00:00

01.01.01 12:01:00

01.01.01 12:02:00

01.01.01 12:03:00

01.01.01 12:04:00

01.01.01 12:05:00

01.01.01 12:06:00

01.01.01 12:07:00

01.01.01 12:09:00

01.01.01 12:10:00

01.01.01 12:11:00

output require like records would be

01.01.01 12:00:00

01.01.01 12:10:00


and so on.


Pls suggest

Regards

Abhay

1 Solution

Accepted Solutions
santiago_respane
Specialist
Specialist

Hi Abhay,

here's an example of how you can achieve this:

TEST:

LOAD * WHERE MOD(RawFieldFormattedAsMinute,10)=0; //Keep only the ones that MOD of division by ten is zero

LOAD *,Minute(RawFieldFormatted) AS RawFieldFormattedAsMinute; //Get minute value from fromatted date

LOAD *,DATE#(RawField,'DD.MM.YY HH:mm:ss') AS RawFieldFormatted; //Date formatting

//Your sample data

LOAD * INLINE [

RawField

01.01.01 12:00:00

01.01.01 12:01:00

01.01.01 12:02:00

01.01.01 12:03:00

01.01.01 12:04:00

01.01.01 12:05:00

01.01.01 12:06:00

01.01.01 12:07:00

01.01.01 12:09:00

01.01.01 12:10:00

01.01.01 12:11:00

];

Please let me know if this help.

Kind regards,

View solution in original post

1 Reply
santiago_respane
Specialist
Specialist

Hi Abhay,

here's an example of how you can achieve this:

TEST:

LOAD * WHERE MOD(RawFieldFormattedAsMinute,10)=0; //Keep only the ones that MOD of division by ten is zero

LOAD *,Minute(RawFieldFormatted) AS RawFieldFormattedAsMinute; //Get minute value from fromatted date

LOAD *,DATE#(RawField,'DD.MM.YY HH:mm:ss') AS RawFieldFormatted; //Date formatting

//Your sample data

LOAD * INLINE [

RawField

01.01.01 12:00:00

01.01.01 12:01:00

01.01.01 12:02:00

01.01.01 12:03:00

01.01.01 12:04:00

01.01.01 12:05:00

01.01.01 12:06:00

01.01.01 12:07:00

01.01.01 12:09:00

01.01.01 12:10:00

01.01.01 12:11:00

];

Please let me know if this help.

Kind regards,