Access Live Bitbucket Data in Excel 365 Online (Excel for the web)
Microsoft Excel for the web represents a cloud-native iteration of Microsoft Excel. When integrated with CData Connect AI, you gain immediate access to Bitbucket data directly from within Excel. This access facilitates data analysis, collaborative work, calculations, and more. This article provides a step-by-step guide on connecting to Bitbucket within your Connect AI instance and accessing live Bitbucket data in Excel for the web spreadsheets, whether for viewing or updating purposes.
CData Connect AI provides a pure cloud-to-cloud interface for Bitbucket, allowing you to easily access live Bitbucket data in Excel for the web. Simply use the Connect AI Add-In to query live data (or write your own). Using optimized data processing out of the box, CData Connect AI pushes all supported query operations (filters, JOINs, etc) directly to Bitbucket, leveraging server-side processing to quickly return Bitbucket data.
This setup requires a CData Connect AI instance and the CData Connect AI Add-In for Excel. To get started, sign up a free trial of Connect AI and install the free Connect AI Excel Add-In.
Configure Bitbucket Connectivity for Excel
Connectivity to Bitbucket from Excel is made possible through CData Connect AI. To work with Bitbucket data from Excel, we start by creating and configuring a Bitbucket connection.
- Log into Connect AI, click Sources, and then click Add Connection
- Select "Bitbucket" from the Add Connection panel
-
Enter the necessary authentication properties to connect to Bitbucket.
For most queries, you must set the Workspace. The only exception to this is the Workspaces table, which does not require this property to be set, as querying it provides a list of workspace slugs that can be used to set Workspace. To query this table, you must set Schema to 'Information' and execute the query SELECT * FROM Workspaces>.
Setting Schema to 'Information' displays general information. To connect to Bitbucket, set these parameters:
- Schema: To show general information about a workspace, such as its users, repositories, and projects, set this to Information. Otherwise, set this to the schema of the repository or project you are querying. To get a full set of available schemas, query the sys_schemas table.
- Workspace: Required if you are not querying the Workspaces table. This property is not required for querying the Workspaces table, as that query only returns a list of workspace slugs that can be used to set Workspace.
Authenticating to Bitbucket
Bitbucket supports OAuth authentication only. To enable this authentication from all OAuth flows, you must create a custom OAuth application, and set AuthScheme to OAuth.
Be sure to review the Help documentation for the required connection properties for you specific authentication needs (desktop applications, web applications, and headless machines).
Creating a custom OAuth application
From your Bitbucket account:
- Go to Settings (the gear icon) and select Workspace Settings.
- In the Apps and Features section, select OAuth Consumers.
- Click Add Consumer.
- Enter a name and description for your custom application.
- Set the callback URL:
- For desktop applications and headless machines, use http://localhost:33333 or another port number of your choice. The URI you set here becomes the CallbackURL property.
- For web applications, set the callback URL to a trusted redirect URL. This URL is the web location the user returns to with the token that verifies that your application has been granted access.
- If you plan to use client credentials to authenticate, you must select This is a private consumer. In the driver, you must set AuthScheme to client.
- Select which permissions to give your OAuth application. These determine what data you can read and write with it.
- To save the new custom application, click Save.
- After the application has been saved, you can select it to view its settings. The application's Key and Secret are displayed. Record these for future use. You will use the Key to set the OAuthClientId and the Secret to set the OAuthClientSecret.
- Click Save & Test
-
Navigate to the Permissions tab in the Add Bitbucket Connection page and update the User-based permissions.
With the connection configured, you are ready to connect to Bitbucket data from Excel for the web.
Access Live Bitbucket Data in Excel for the web
The steps below outline connecting to CData Connect AI from Excel to access live Bitbucket data.
- Log into Excel, create a new sheet (or open an existing one).
- Click Insert and click Office Add-ins. (if you have already installed the Add-In, jump to step 4).
- Search for CData Connect Spreadsheets Add-In and install the Add-in.
- Click Data and open the CData Connect Spreadsheets Add-In.
- In the Add-In panel, click Login or Sign-up to authenticate with your CData Connect AI instance
- In the CData Connect Spreadsheets panel in Excel, click Import
- Choose a Connection (e.g. Bitbucket1), Table (e.g. Issues), and Columns to import
- Optionally add Filters, Sorting, and a Limit
- Click Execute to import the data
Update Bitbucket Data from Excel
In addition to viewing Bitbucket data in Excel, CData Connect AI also lets you update and delete Bitbucket data. Begin by importing data (as described above).
- Update any cell or cells with changes you want to push to Bitbucket (your changes will be in red)
- In the CData Connect Spreadsheets Add-In panel, select Update
- Optionally highlight the cell(s) you wish to update and select an update option ("Update All" or "Update Selected")
- Click Execute to push the updates to Bitbucket
A notification will appear when the update is complete
Live Access to Bitbucket Data from Cloud Applications
New, you have a direct, cloud-to-cloud connection to live Bitbucket data from your Excel workbook. You can add more data to your workbook for calculations, aggregations, collaboration, and more.
Try CData Connect AI and get real-time data access to hundreds of SaaS, Big Data, and NoSQL sources directly from your cloud applications.