Let Cognos Analytics do some Googling
Did you realize that you can connect your Cognos Analytics system to a cloud-based big data analytics warehouse? You can, and it’s not that difficult to set up Google BigQuery in Cognos Analytics.
Google’s BigQuery analytics warehouse offering is pretty compelling. While people are generally more familiar with Amazon RedShift as a cloud-based data warehouse, Google compares favorably in a number of ways (see this Reddit thread for details—it’s driven by a Google employee, but the thread participants familiar with RedShift don’t seem to dispute many points).
In the latest version of Cognos Analytics (11.0.6), you now have the ability to query a BigQuery data source from Cognos Analytics, displaying the results in a dashboard, report, visualization, story, etc. Since IBM has yet to provide many details about how exactly to get this working, I’ve written up the process here to get you going. In fact, this article will even walk you through the steps of setting up a free test account with BigQuery so that you can experiment to see if this is a solution that could benefit your organization. (Cognos Analytics can connect to RedShift as well, but doing so is outside the scope of this article). So let’s dive in to connecting Google BigQuery in Cognos Analytics
Steps to Set Up Google BigQuery
- Open up a web browser and navigate to https://bigquery.cloud.google.com/
- If you’re the rare breed that doesn’t have a google account, you’ll need to create one before proceeding. Otherwise, login with your Google account.
- Be thorough and review the Terms of Service
- If you accept the Terms of Service, you’ll be rewarded with a welcome screen with a bit of info about BigQuery. Click “Create a Project”
- Oddly enough, when I’ve gone through this process (and I’ve done it a few times), it never actually creates a project. Instead, it just dumps me in the API Manager Library. No mind, just click “Select a Project” at the top of the screen.
- Then click the “plus” sign to create a new project
- Give your project a tremendously creative name such as I did below, and click “Create”. Make a note of your “project ID”, as you will need it later (though you can always come back and look it up if you lose track of it, of course).
- Again, counter-intuitively your project is not automatically selected when you create it, so once you get dumped back to the API Manager, you’ll need to click “Select a project” again and choose the project you just created. (Apparently Google developers are way too busy building mind-bending search algorithms to run through the handful of steps to set up their application.)
- Then, click the “hamburger” in the top left, and select “IAM & Admin” from the resulting menu.
- Now we’re going to create a service account that Cognos will later use to authenticate to BigQuery. In order to do this, click “Service accounts” on the left and then “Create service account”
- Give your service account a fascinating name, and specify the role(s) for the account. I haven’t tested or read up on this extensively, but selecting the three shown in the screenshot seem to hit the sweet spot of allowing what is needed for the connection to function without giving unnecessary permissions. Note the Service account ID that is generated, as you’ll need this later.
- Check the “Furnish a new private key” box, and choose JSON. Then click “Create”.
- Store the JSON file that is generated somewhere safe, as you’ll need it later
- Okay, back to idiosyncratic setup steps… Type https://bigquery.cloud.google.com/ in your browser address bar again. You should see the “Welcome to BigQuery!” screen again. But this time click “an existing project” at the end of the paragraph under “Get started”.
- Click “Continue”
- You’re finally ready to create a dataset! Click the down arrow next to the name of your project, and select “Create new dataset”.
- Come up with one more compelling name and type it in as your Dataset ID. This will show up as a table in Cognos Analytics.
- I’m not going to into Google’s sample data or how to query some data here—just reference the BigQuery quickstart guide: https://cloud.google.com/bigquery/quickstart-web-ui (as I understand it, in order to actually pull some data you’ll have to enable billing, but they have a free tier and won’t charge you anything without you taking further action. I recommend verifying this through Google’s official documentation before entering billing info.)
Connecting BigQuery in Cognos Analytics
- First, download the drivers that Cognos will use to access BigQuery
You’ll want to download the current “JDBC 4.1-compatible” version of the drivers.
- Extract the contents of the zip file into a temporary folder.
- Copy all .jar files from the temporary folder to your Cognos Analytics drivers folder (should be something like (D:\IBM\Cognos\analytics\drivers).
- Stop/start your Cognos Analytics services from Cognos Configuration. (You MAY be able to get away with just restarting your query service from Cognos Administration, but I recommend just restarting all services from Cognos Configuration unless you’re working in an environment where are not able to do so.)
- Open up Cognos Analytics in a browser and navigate to Manage > Data server connections
- Click the circled + sign to create a new connection
- Choose Google BigQuery as your type.
- Type in the JDBC URL.
The syntax you will need to use is as such:
NOTE: You can leave authentication set to “Connect anonymously”, although that’s not really what’s happening—the private key file referenced in the JDBC URL is being utilized for authentication.
- Click “Test” to verify your connection is working properly. If it is, click “Save”. You’re good to go! I recommend creating a data module to test your connection.
If you have problems, check the following:
- It seems Cognos is only compatible with the 4.1 version of the JDBC drivers
- I’ve only had success when copying all the .jar files into the root of the Cognos drivers folder. You can’t use a subfolder for organization.
- If you’ve only tried restarting the query Service from Cognos Administration, try restarting all services from there. If you still have problems, stop and start all Cognos services completely in Cognos Configuration.
- Verify your JDBC URL
- Make sure you are using the Project and Service Account IDs rather than names and that they are exactly correct
- Make sure your JSON file name and path is accurate and accessible by Cognos
- Verify you can hit Google BigQuery URL included in the JDBC URL from your Cognos server over port 443 (in other words, make sure this isn’t blocked by a firewall).
Now you’re ready to source data from Google BigQuery, and start using your Cognos Analytics system to pull in the results from big data queries, with serious horsepower behind you! I hope you find this article helpful. If you haven’t already, be sure to check out our blog for additional tips and tricks. Subscribe to our e-newsletter for more technical articles and updates delivered directly to your inbox.
If you would like to learn more how PMsquare can help your organization please reach out to us at:
|United States||Australia||Singapore, Philipines, Thailand|
|PMsquare LLC||Cornerstone||PMsquare | A Cornerstone Company|
E: Chris Loechel
|P:+61 1300 840 048
E: Piers Wilson
|P:+65 6635 1700
E: Carsten Brandt
Blog post shared courtesy of PMsquare LLC