Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Scheduled Cache File - Aggregate and Join
Go
New
Search
Notify
Tools
Reply
  
[SOLVED]Scheduled Cache File - Aggregate and Join
 Login/Join
 
Member
posted
We have several reports that use the aggregated data so we are creating a single cache file that runs overnight. Because of our data structure, we need to do two things:

1. Aggregate the data in table A (which has a master file).
2. Join in another table to the aggregated Table A.

For example: Table A shows the sales for the employees in each store. We will aggregate table A to get the total sales for each store. Then we want to join in Table B which has the store address, manager and the store's overall sales goal.

What is the best way to accomplish this?

WebFOCUS 8.2

This message has been edited. Last edited by: Berny,
 
Posts: 6 | Registered: February 12, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Berny

Use the APP HOLD foldername command (where foldername is a valid application folder in your APP PATH) in the aggregation request that runs with the schedule. Then you will be able to JOIN that in any other request you need to run. I would recommend using FORMAT FOCUS so you don't need to worry about the request finding the actual HOLD file. When it is FORMAT ALPHA or BINARY you would need a FILEDEF for that file in every other request.

This message has been edited. Last edited by: FP Mod Chuck,


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1664 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Since you are doing this overnight, can you not just do everything in one pass to then create the hold file ?

Join employees sales per store to store address table then aggregate at the level you want


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2223 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Member
posted Hide Post
If we do the join before the aggregate, it will inflate the values. I've edited my post to have a better table B. (let's say Table B has store address, manage and the store's overall sales goal)

quote:
Originally posted by MartinY:
Since you are doing this overnight, can you not just do everything in one pass to then create the hold file ?

Join employees sales per store to store address table then aggregate at the level you want
 
Posts: 6 | Registered: February 12, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Nope if you are doing something such as this

JOIN STOREID IN SALES TAG T1
  TO STOREID IN STORE TAG T2 AS J1
END

TABLE FILE SALES
SUM SALES
-* Or using another prefix such as MAX, MIN or LST will include the SALES_GOAL value only once and will not SUM the value as many time you have sales records
    FST.SALES_GOAL
BY STOREID
END
-RUN


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2223 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Member
posted Hide Post
Really? Thanks I will pass this along!
quote:
Originally posted by MartinY:
Nope if you are doing something such as this

JOIN STOREID IN SALES TAG T1
  TO STOREID IN STORE TAG T2 AS J1
END

TABLE FILE SALES
SUM SALES
-* Or using another prefix such as MAX, MIN or LST will include the SALES_GOAL value only once and will not SUM the value as many time you have sales records
    FST.SALES_GOAL
BY STOREID
END
-RUN
 
Posts: 6 | Registered: February 12, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Once resolved, please update your first post then add [SOLVED] at the beginning of the subjest


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2223 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Scheduled Cache File - Aggregate and Join

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.