Forum Discussion
Real-time data in PBRS
- 4 years ago
kostaszogo21 wrote:
do you mean because i will be using DirectQuery to connect to Analysis Services (once i have created these partitions) ? Or is there another reason for that?
Technically it uses a Live Connection when connected to SSAS, but conceptually that is similar to DirectQuery in that the Report Server does not host the data, it just sends queries out to SSAS. Therefore you have to schedule any refresh operations using the SSAS tools/ APIs.
kostaszogo21 wrote:
Sorry for asking again, but it's vague for me if once i have created these partitions i should use Import Mode or DirectQuery.
You could use either, but if you only need to refresh every 20-25 minutes you could probably using import mode as that will give you the fastest possible query speed
kostaszogo21 wrote:
We are also thinking of using SSAS, creating partitions in the tables (today's data and older data) and refresh older data in another tool and let PBRS' scheduled refresh run the refreshes in only the today's partition. But i don't know if that's even possible or how to do it to be honest.
So you are close with this idea, but the scheduler in PBIRS can only refresh data stored in the PBIX models and it only does a full refresh of all tables. But if you use SSAS you can create whatever partitioning scheme works for your needs and use some external scheduling tool like SQL Agent to trigger refresh jobs. We have a model with 200M rows in our main fact table and we refresh that every 10 minutes during the day since we only refresh the current day of data and the other 5+ years of history is not refreshed regularly. We also have a nightly job to merge the previous day's partition into the historic partition. It works well, there is just a bit more manual work involved to configure the partitions and processing jobs.
Thank you very much for the reply d_gosbell.
Could you please guide me a bit more (maybe describe the steps needed in order to make it work)?
Is there any documentation or any article that you would recommend?
Also, cause i don't know if the company uses SQL Agent, can i trigger the refreshes using any other tool? I think i saw an article mentioning doing it with Powershell.
And one last question: If i let's say create two partitions (Partition 1:Current Day and Partition 2: All Previous Days), do i have to trigger two refresh jobs in SQL Agent (one for each partition) or would i refresh my current day's data in PBIRS using scheduled refresh? If i refresh both partitions in SQL Agent do i also need to create a scheduled refresh in PBIRS or do i not need that at all?
Sorry for asking so many questions but i'm not familiar with the subject at all.
I appreciate your help d_gosbell ,
Kostas
- d_gosbell4 years agoSuper User
kostaszogo21 wrote:
Thank you very much for the reply d_gosbell.
Could you please guide me a bit more (maybe describe the steps needed in order to make it work)?
Is there any documentation or any article that you would recommend?I can't think of any documentation off the top of my head, there are probably plenty of guides out there, but I'd just be googling for them.
If you only need the incremental refreshes during the day and you have some down time overnight the simplest approach is to
- create 2 views in your source system, one which only shows data for today and one which shows data for everything earlier than today.
- Then create 2 partitions in your table, one pointing to each of the views above
- Then you setup a scheduled task to run every 20-25 minutes during the day that processes the daily partitions
- Then setup a nightly job that does a full process of the whole model. This will clear out the current partition and incorporate the data for the prior day into the historic partition (so this job should run after midnight)
kostaszogo21 wrote:
Also, cause i don't know if the company uses SQL Agent, can i trigger the refreshes using any other tool? I think i saw an article mentioning doing it with Powershell.
Yes you can also use Powershell or a custom c# program
kostaszogo21 wrote:
And one last question: If i let's say create two partitions (Partition 1:Current Day and Partition 2: All Previous Days), do i have to trigger two refresh jobs in SQL Agent (one for each partition) or would i refresh my current day's data in PBIRS using scheduled refresh? If i refresh both partitions in SQL Agent do i also need to create a scheduled refresh in PBIRS or do i not need that at all?
Yes, you would need 2 agent jobs (or jobs in some other scheduling tool) as explained above. You cannot schedule SSAS refreshes using the PBIRS scheduled refresh feature so you don't need any of those setup if you are using SSAS.
- kostaszogo214 years agoFrequent Visitor
Thanks again for all the help d_gosbell .
When you say that
" You cannot schedule SSAS refreshes using the PBIRS scheduled refresh feature so you don't need any of those setup if you are using SSAS."
do you mean because i will be using DirectQuery to connect to Analysis Services (once i have created these partitions) ? Or is there another reason for that?
Sorry for asking again, but it's vague for me if once i have created these partitions i should use Import Mode or DirectQuery.Thanks again,
Kostas- d_gosbell4 years agoSuper User
kostaszogo21 wrote:
do you mean because i will be using DirectQuery to connect to Analysis Services (once i have created these partitions) ? Or is there another reason for that?
Technically it uses a Live Connection when connected to SSAS, but conceptually that is similar to DirectQuery in that the Report Server does not host the data, it just sends queries out to SSAS. Therefore you have to schedule any refresh operations using the SSAS tools/ APIs.
kostaszogo21 wrote:
Sorry for asking again, but it's vague for me if once i have created these partitions i should use Import Mode or DirectQuery.
You could use either, but if you only need to refresh every 20-25 minutes you could probably using import mode as that will give you the fastest possible query speed