In this article I want to show in detail how you can use R in Microsoft SQL Server to get data from Google Analytics (and generally from any API).
The task — we have MS SQL server and we want to receive data in DWH by API
We will use googleAnalyticsR package to connect to Google Analytics (GA).
This package is chosen as an example due to its popularity. You can use another package, for example: RGoogleAnalytic.
Approaches to problem solving will be the same.