YouTube Connector for SSRSRead / write YouTube data inside your app, perform many Youtube operations without coding using easy to use high performance API Connector for YouTube In this article you will learn how to quickly and efficiently integrate YouTube data in SSRS without coding. We will use high-performance YouTube Connector to easily connect to YouTube and then access the data inside SSRS. Let's follow the steps below to see how we can accomplish that! YouTube Connector for SSRS is based on ZappySys API Driver which is part of ODBC PowerPack. It is a collection of high-performance ODBC drivers that enable you to integrate data in SQL Server, SSIS, a programming language, or any other ODBC-compatible application. ODBC PowerPack supports various file formats, sources and destinations, including REST/SOAP API, SFTP/FTP, storage services, and plain files, to mention a few. |
Connect to YouTube in other apps
|
Video Tutorial - Integrate YouTube data in SSRS
This video covers the following topics and more, so please watch carefully. After watching the video, follow the steps outlined in this article:
- How to download and install the required PowerPack for
YouTube integration in SSRS - How to configure the connection for
YouTube - Features of the
ZappySys API Driver (Authentication / Query Language / Examples / Driver UI) - How to use the
YouTube in SSRS
Create Data Source in ZappySys Data Gateway based on API Driver
-
Download and install ODBC PowerPack.
-
Search for gateway in start menu and Open ZappySys Data Gateway:
-
Go to Users Tab to add our first Gateway user. Click Add; we will give it a name tdsuser and enter password you like to give. Check Admin option and click OK to save. We will use these details later when we create linked server:
-
Now we are ready to add a data source. Click Add, give data source a name (Copy this name somewhere, we will need it later) and then select Native - ZappySys API Driver. Finally, click OK. And it will create the Data Set for it and open the ZS driver UI.
YoutubeDSN
-
When the Configuration window appears give your data source a name if you haven't done that already, then select "YouTube" from the list of Popular Connectors. If "YouTube" is not present in the list, then click "Search Online" and download it. Then set the path to the location where you downloaded it. Finally, click Continue >> to proceed with configuring the DSN:
YoutubeDSNYouTube -
Now it's time to configure the Connection Manager. Select Authentication Type, e.g. Token Authentication. Then select API Base URL (in most cases, the default one is the right one). More info is available in the Authentication section.
Steps how to get and use YouTube credentials
This walkthrough will help you create an API Key which you will be able to use in all requests and authenticate accordingly.- Go to Google API Console
- From the Project Dropdown (usually found at the top bar) click Select Project
- On Project Popup click CREATE PROJECT
- Once project is created you can click Select Project to switch the context (You can click on Notification link or Choose from Top Dropdown)
- Click ENABLE APIs AND SERVICES
- Now we need to Enable three APIs one by one (YouTube Data API, YouTube Analytics API, YouTube Reporting API).
- Search YouTube Data API. Select and click ENABLE
- Search YouTube Analytics API. Select and click ENABLE
- Search YouTube Reporting API. Select and click ENABLE
- Go to back to main screen of Google API Console
- Click OAuth Consent Screen Tab. Enter necessary details and Save.
- Click Credentials Tab
- Click CREATE CREDENTIALS (some where in topbar) and select API key option.
- In the popup, copy API Key from the field "Your API key", close this window, and use it in the UI configuration, "key" field
Fill in all required parameters and set optional parameters if needed:
YoutubeDSNYouTubeAPI Key [Http]https://youtube.googleapis.com/youtube/v3Required Parameters key Fill-in the parameter... Optional Parameters RetryMode RetryWhenStatusCodeMatch RetryStatusCodeList 403|429 RetryCountMax 5 RetryMultiplyWaitTime True Steps how to get and use YouTube credentials
To register a custom app, perform the following steps (detailed steps found in the help link at the end)- Go to Google API Console
- From the Project Dropdown (usually found at the top bar) click Select Project
- On Project Popup click CREATE PROJECT
- Once project is created you can click Select Project to switch the context (You can click on Notification link or Choose from Top Dropdown)
- Click ENABLE APIs AND SERVICES
- Now we need to Enable three APIs one by one (YouTube Data API, YouTube Analytics API, YouTube Reporting API).
- Search YouTube Data API. Select and click ENABLE
- Search YouTube Analytics API. Select and click ENABLE
- Search YouTube Reporting API. Select and click ENABLE
- Go to back to main screen of Google API Console
- Click OAuth Consent Screen Tab. Enter necessary details and Save.
- Click Credentials Tab
- Click CREATE CREDENTIALS (some where in topbar) and select OAuth Client ID option.
- When prompted Select Application Type as Desktop App and click Create to receive your ClientID and Secret. Later on you can use this information now to configure Connection.
- Go to OAuth Consent Screen tab. Under Publishing Status click PUBLISH APP to ensure your refresh token doesnt expire often. If you planning to use App for Private use then do not have to worry about Verification Status after Publish.
Fill in all required parameters and set optional parameters if needed:
YoutubeDSNYouTubeUser Account [OAuth]https://youtube.googleapis.com/youtube/v3Optional Parameters ClientId ClientSecret Scope https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/yt-analytics.readonly RetryMode RetryWhenStatusCodeMatch RetryStatusCodeList 403|429 RetryCountMax 5 RetryMultiplyWaitTime True Redirect URL (Only for Web App) Steps how to get and use YouTube credentials
Use these steps to authenticate as service account rather than Google / GSuite User. Learn more about service account here Basically to call Google API as Service account we need to perform following steps listed in 3 sections (Detailed steps found in the help link at the end)Create Project
First thing is create a Project so we can call Google API. Skip this section if you already have Project (Go to next section)- Go to Google API Console
- From the Project Dropdown (usually found at the top bar) click Select Project
- On Project Popup click CREATE PROJECT
- Once project is created you can click Select Project to switch the context (You can click on Notification link or Choose from Top Dropdown)
- Click ENABLE APIs AND SERVICES
- Now we need to Enable three APIs one by one (YouTube Data API, YouTube Analytics API, YouTube Reporting API)
- Search YouTube Data API. Select and click ENABLE
- Search YouTube Analytics API. Select and click ENABLE
- Search YouTube Reporting API. Select and click ENABLE
Create Service Account
Once Project is created and APIs are enabled we can now create a service account under that project. Service account has its ID which looks like some email ID (not to confuse with Google /Gmail email ID)- Go to Create Service Account
- From the Project Dropdown (usually found at the top bar) click Select Project
- Enter Service account name and Service account description
- For Role, do not select anything for now and Click Continue and then click Done. Next we will create Key.
Create Key
Once service account is created we need to create key file (i.e. credentials).- In the Cloud Console, click the email address for the service account that you created.
- Click Keys.
- Click Add key, then click Create new key.
- Click Create and select P12 format. A P12 key file is downloaded to your computer. We will use this file in our API connection.
- Click Close.
- Now you may use downloaded *.p12 key file as secret file and Service Account Email as Client ID (e.g. some-service-account-name@your-project-id.iam.gserviceaccount.com ).
Add Permission
Now last thing is give read/write permission to Service Account. Basically you can create or open Google Sheet and add the Service Account as an editor to it as below.- Copy the email address of your service account we created in previous step (its usually like this some-service-account-name@your-project-id.iam.gserviceaccount.com).
- Create or select an existing Google Sheet.
- Navigate to Sheet for which you like to give read/write access to Service Account.
- Click on the Share button in the top right, and add the email address of the service account as an editor. Here is how to share file(s) with specific people. Juse share with Service Account (use Service Account Email found on previous section)
Fill in all required parameters and set optional parameters if needed:
YoutubeDSNYouTubeService Account (Using Private Key File) [OAuth]https://youtube.googleapis.com/youtube/v3Required Parameters Service Account Email Fill-in the parameter... Service Account Private Key Path (i.e. *.p12) Fill-in the parameter... Optional Parameters Scope https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/yt-analytics.readonly RetryMode RetryWhenStatusCodeMatch RetryStatusCodeList 403|429 RetryCountMax 5 RetryMultiplyWaitTime True -
Once the data source connection has been configured, it's time to configure the SQL query. Select the Preview tab and then click Query Builder button to configure the SQL query:
ZappySys API Driver - YouTubeRead / write YouTube data inside your app, perform many Youtube operations without coding using easy to use high performance API Connector for YouTubeYoutubeDSN -
Start by selecting the Table or Endpoint you are interested in and then configure the parameters. This will generate a query that we will use in SSRS to retrieve data from YouTube. Hit OK button to use this query in the next step.
SELECT * FROM MyVideos
Some parameters configured in this window will be passed to the YouTube API, e.g. filtering parameters. It means that filtering will be done on the server side (instead of the client side), enabling you to get only the meaningful datamuch faster . -
Now hit Preview Data button to preview the data using the generated SQL query. If you are satisfied with the result, use this query in SSRS:
ZappySys API Driver - YouTubeRead / write YouTube data inside your app, perform many Youtube operations without coding using easy to use high performance API Connector for YouTubeYoutubeDSNSELECT * FROM MyVideos
You can also access data quickly from the tables dropdown by selecting <Select table>.AWHERE
clause,LIMIT
keyword will be performed on the client side, meaning that thewhole result set will be retrieved from the YouTube API first, and only then the filtering will be applied to the data. If possible, it is recommended to use parameters in Query Builder to filter the data on the server side (in YouTube servers). -
Click OK to finish creating the data source.
Read data in SSRS from ZappySys Data Gateway
- Open Visual Studio and create a new SSRS project
-
Then add a new Shared Data Source (you can create a non-shared data source inside report too):
-
Continue with creating the Shared Data Source. Select Microsoft SQL Server as Type and hit Build button to proceed further:
-
Once a window opens, configure it similarly. Configure "YoutubeDSN" as database name. Finally, hit Test Connection and OK:
YoutubeDSN -
Another window opens, and it should look similarly to this one below which ends the creation of a Data Source:
DataSource=localhost,5000;Initial Catalog=YoutubeDSN -
Now it's time to create a Dataset. If you don't have a report created, in one of the wizard's steps it will look like this:
SELECT * FROM MyVideos -
Finally, once you complete the report, similar results will show up:
Passing Parameters to SSRS Report / Filter data
If you want to parameterize your report, then refer to this article
Actions supported by YouTube Connector
Learn how to perform common YouTube actions directly in SSRS with these how-to guides:
- Get channels
- Get comments
- Get playlist items
- Get playlists
- Get report
- Get video details
- Get videos
- Get videos rating
- Search
- Generic Request
- Generic Request (Bulk Write)
Conclusion
In this article we showed you how to connect to YouTube in SSRS and integrate data without any coding, saving you time and effort. It's worth noting that ZappySys API Driver allows you to connect not only to YouTube, but to any Java application that supports JDBC (just use a different JDBC driver and configure it appropriately).
We encourage you to download YouTube Connector for SSRS and see how easy it is to use it for yourself or your team.
If you have any questions, feel free to contact ZappySys support team. You can also open a live chat immediately by clicking on the chat icon below.
Download YouTube Connector for SSRS Documentation
More integrations
Other connectors for SSRS
Other application integration scenarios for YouTube
How to connect YouTube in SSRS?
How to get YouTube data in SSRS?
How to read YouTube data in SSRS?
How to load YouTube data in SSRS?
How to import YouTube data in SSRS?
How to pull YouTube data in SSRS?
How to push data to YouTube in SSRS?
How to write data to YouTube in SSRS?
How to POST data to YouTube in SSRS?
Call YouTube API in SSRS
Consume YouTube API in SSRS
YouTube SSRS Automate
YouTube SSRS Integration
Integration YouTube in SSRS
Consume real-time YouTube data in SSRS
Consume real-time YouTube API data in SSRS
YouTube ODBC Driver | ODBC Driver for YouTube | ODBC YouTube Driver | SSIS YouTube Source | SSIS YouTube Destination
Connect YouTube in SSRS
Load YouTube in SSRS
Load YouTube data in SSRS
Read YouTube data in SSRS
YouTube API Call in SSRS