Model IBM Cloud Object Storage Data Using Azure Analysis Services

Dibyendu Datta
Dibyendu Datta
Lead Technology Evangelist
Leverage CData Connect AI to establish a connection between Azure Analysis Services and IBM Cloud Object Storage, enabling the direct import of real-time IBM Cloud Object Storage data.

Microsoft Azure Analysis Services (AAS) is a fully-managed platform-as-a-service (PaaS) offering that delivers enterprise-grade data models in the cloud. When combined with CData Connect AI, AAS facilitates immediate cloud-to-cloud access to IBM Cloud Object Storage data for applications. This article outlines the process of connecting to IBM Cloud Object Storage via Connect AI and importing IBM Cloud Object Storage data into Visual Studio using an AAS extension.

CData Connect AI offers a seamless cloud-to-cloud interface tailored for IBM Cloud Object Storage, enabling you to create live models of IBM Cloud Object Storage data in Azure Analysis Services without the need to replicate data to a natively supported database. While constructing high-quality semantic data models for business reports and client applications, Azure Analysis Services formulates SQL queries to retrieve data. CData Connect AI is equipped with optimized data processing capabilities right from the start, directing all supported SQL operations, including filters and JOINs, directly to IBM Cloud Object Storage. This leverages server-side processing for swift retrieval of the requested IBM Cloud Object Storage data.

Prerequisites

Before you connect, you must first do the following:

  • Connect a data source to your CData Connect AI account. Detailed steps are provided in the next section.
  • Generate a Personal Access Token (PAT). Copy this down, as it acts as your password during authentication.
  • Create a server in Azure Analysis Services to which you will deploy your data from CData Connect AI.
  • Install and configure an On-Premise Gateway in your system. This will pull data from the source via CData Connect AI into the Azure Analysis Services project and deploy models to the server. Refer to the given link to find the detailed process.

Configure IBM Cloud Object Storage Connectivity for AAS

Connectivity to IBM Cloud Object Storage from Azure Analysis Services is made possible through CData Connect AI. To work with IBM Cloud Object Storage data from Azure Analysis Services, we start by creating and configuring a IBM Cloud Object Storage connection.

  1. Log into Connect AI, click Sources, and then click Add Connection
  2. Adding a Connection
  3. Select "IBM Cloud Object Storage" from the Add Connection panel
  4. Selecting a data source
  5. Enter the necessary authentication properties to connect to IBM Cloud Object Storage.

    Register a New Instance of Cloud Object Storage

    If you do not already have Cloud Object Storage in your IBM Cloud account, follow the procedure below to install an instance of SQL Query in your account:

    1. Log in to your IBM Cloud account.
    2. Navigate to the page, choose a name for your instance and click Create. You will be redirected to the instance of Cloud Object Storage you just created.

    Connecting using OAuth Authentication

    There are certain connection properties you need to set before you can connect. You can obtain these as follows:

    API Key

    To connect with IBM Cloud Object Storage, you need an API Key. You can obtain this as follows:

    1. Log in to your IBM Cloud account.
    2. Navigate to the Platform API Keys page.
    3. On the middle-right corner click "Create an IBM Cloud API Key" to create a new API Key.
    4. In the pop-up window, specify the API Key name and click "Create". Note the API Key as you can never access it again from the dashboard.

    Cloud Object Storage CRN

    If you have multiple accounts, specify the CloudObjectStorageCRN explicitly. To find the appropriate value, you can:

    • Query the Services view. This will list your IBM Cloud Object Storage instances along with the CRN for each.
    • Locate the CRN directly in IBM Cloud. To do so, navigate to your IBM Cloud Dashboard. In the Resource List, Under Storage, select your Cloud Object Storage resource to get its CRN.

    Connecting to Data

    You can now set the following to connect to data:

    • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
    • ApiKey: Set this to your API key which was noted during setup.
    • CloudObjectStorageCRN (Optional): Set this to the cloud object storage CRN you want to work with. While the connector attempts to retrieve this automatically, specifying this explicitly is recommended if you have more than Cloud Object Storage account.

    When you connect, the connector completes the OAuth process.

    1. Extracts the access token and authenticates requests.
    2. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
    Configuring a connection (Salesforce is shown)
  6. Click Save & Test
  7. Navigate to the Permissions tab in the Add IBM Cloud Object Storage Connection page and update the User-based permissions. Updating permissions

Add a Personal Access Token

When connecting to Connect AI through the REST API, the OData API, or the Virtual SQL Server, a Personal Access Token (PAT) is used to authenticate the connection to Connect AI. It is best practice to create a separate PAT for each service to maintain granularity of access.

  1. Click on the Gear icon () at the top right of the Connect AI app to open the settings page.
  2. On the Settings page, go to the Access Tokens section and click Create PAT.
  3. Give the PAT a name and click Create. Creating a new PAT
  4. The personal access token is only visible at creation, so be sure to copy it and store it securely for future use.

With the connection configured and a PAT generated, you are ready to connect to IBM Cloud Object Storage data from Visual Studio using Azure Analysis Services.

Connect to IBM Cloud Object Storage in Visual Studio Using AAS

The steps below outline connecting to CData Connect AI from Azure Analysis Services to create a new IBM Cloud Object Storage data source. You will need the Microsoft Analysis Services Project extension installed in Microsoft Visual Studio to continue.

  1. In Visual Studio, create a new project. Select Analysis Services Tabular Project. Click on Next.
  2. Selecting Analysis Services Tabular Project
  3. In the Configure your new project dialog box, enter a name for your project in the Project name field. Fill in the rest of the fields.
  4. Configure new project
  5. Click on Create. The Tabular model designer dialog box opens. Select Workspace server and enter the address of your Azure Analysis Services server (for example, asazure://eastus.azure.windows.net/myAzureServer). Also, make sure to select the option SQL Server 2022 / Azure Analysis Services (1600) from the Compatibility level dropdown. Click on Test Connection to check if the connection details are correct. Click OK and sign in to your server.
  6. Adding AAS server
  7. Now, click on OK to create the project. Your Visual Studio window should resemble the following screenshot:
  8. Visual Studio interface for creating the project
  9. In the Tabular Model Explorer window of Visual Studio, right-click Data Sources and select Import From Data Source.
  10. Importing from the data source
  11. In the Get Data window, select SQL Server database and click Connect. In the Server field, enter the Virtual SQL Server endpoint and the port separated by a comma: e.g., “tds.cdata.com, 14333”, and click on OK.
  12. Selecting SQL Server database Entering the virtual SQL server endpoint and port number
  13. Click on Database and enter the following information:
    • User name: Enter your CData Connect AI username. This is displayed in the top-right corner of the CData Connect AI interface. For example, [email protected].
    • Password: Enter the PAT you generated on the Settings page.

    Click on Connect. If successful, the Navigator window will pop up.

    Entering the Username and Password (PAT)
  14. In the Navigator window, search and select the tables of your choice Searching and selectisng the data source tables
  15. You should now see the Salesforce table populated with data in the preview section on the right panel.
  16. Click on Load to import the data. Select and load tables from the data source

Now that you have imported the IBM Cloud Object Storage data into your data model, you are ready to deploy the project to Azure Analysis Services for use in business reports, client applications, and more.

Get CData Connect AI

To get live data access to hundreds of SaaS, Big Data, and NoSQL sources directly from your cloud applications, try CData Connect AI today!

Ready to get started?

Learn more about CData Connect AI or sign up for free trial access:

Free Trial