Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
bhelms
Contributor

Tie Datasets based on Run Number?

I have been trying to figure this out for a few hours now and am not figuring it out. I'm sure there is some simple way to do it, but haven't gotten it yet. I am trying to create a chart of job streams to know when a complete stream starts and finishes. I don't care necessarily what happens in the middle just when the chain starts and ends so we can compare this on a daily basis. Right now I have been able to separate out the first job in the stream and the last job in the stream and when they start and finish each. What I am having trouble doing is joining them together to complete the picture. There is no fields to join on. If I could come up with a Run Number field, I could join on that plus the combination of the date and job stream name. Basically I need the yellow column below. How could I go about that? A count that starts over based on date and job stream name.

Thanks for the help.

DataSets.jpg

5 Replies

Re: Tie Datasets based on Run Number?

Hi,

maybe like this:

LOAD [Job Stream Begin Name],

          [Start Time Begin],

          AutoNumber([Start Time Begin], [Job Stream Begin Name]) as [Run Number]

From YourSource;

hope this helps

regards

Marco

vinieme12
Esteemed Contributor II

Re: Tie Datasets based on Run Number?

So Job 1 finished as Job 4??

bhelms
Contributor

Re: Tie Datasets based on Run Number?

I can't seem to get this to work as expected. The two different streams don't show 1 & 2 as I expect but show different numbers so  I cannot join on them.

bhelms
Contributor

Re: Tie Datasets based on Run Number?

No, we have 4 jobs that run concurrently like the below image. All I care about is the overall stream and when it started and when it finished shown in yellow.

Jobs.jpg

MVP
MVP

Re: Tie Datasets based on Run Number?

Could you post a more detailed sample of your input data?

It's unclear how you want to identify a single stream in your data (which consists of different jobs, right?)

If you say, the jobs run concurrently (in the sample it looks like they are running in sequence), does this mean that multiple streams can be processed in parallel?

I think it should / could be possible to use Autonumber, you just need to identify a combination of fields that identify a common group for the numbering.

Maybe concatenate the two tables into one, using just job stream name and date / time (AKA canonical fields instead of separated start / end), then you can maybe use

AutoNumber(RowNumber, [Job Stream Name] & Date) as [Run Number]