We are proud to share our inclusion in the 2024 Gartner Magic Quadrant for Data Integration Tools. We believe this recognition reflects the differentiated business outcomes CData delivers to our customers.
Get the Report →Query Jira Data as a MySQL Database in Node.js
Execute MySQL queries against Jira data from Node.js.
You can use the SQL Gateway from the ODBC Driver for Jira to query Jira data through a MySQL interface. Follow the procedure below to start the MySQL remoting service of the SQL Gateway and start querying using Node.js.
About Jira Data Integration
CData simplifies access and integration of live Jira data. Our customers leverage CData connectivity to:
- Gain bi-directional access to their Jira objects like issues, projects, and workflows.
- Use SQL stored procedures to perform functional actions like changing issues status, creating custom fields, download or uploading an attachment, modifying or retrieving time tracking settings, and more.
- Authenticate securely using a variety of methods, including username and password, OAuth, personal access token, API token, Crowd or OKTA SSO, LDAP, and more.
Most users leverage CData solutions to integrate Jira data with their database or data warehouse, whether that's using CData Sync directly or relying on CData's compatibility with platforms like SSIS or Azure Data Factory. Others are looking to get analytics and reporting on live Jira data from preferred analytics tools like Tableau and Power BI.
Learn more about how customers are seamlessly connecting to their Jira data to solve business problems from our blog: Drivers in Focus: Collaboration Tools.
Getting Started
Connect to Jira Data
If you have not already done so, provide values for the required connection properties in the data source name (DSN). You can use the built-in Microsoft ODBC Data Source Administrator to configure the DSN. This is also the last step of the driver installation. See the "Getting Started" chapter in the help documentation for a guide to using the Microsoft ODBC Data Source Administrator to create and configure a DSN.
To connect to JIRA, provide the User and Password. Additionally, provide the Url; for example, https://yoursitename.atlassian.net.
Configure the SQL Gateway
See the SQL Gateway Overview to set up connectivity to Jira data as a virtual MySQL database. You will configure a MySQL remoting service that listens for MySQL requests from clients. The service can be configured in the SQL Gateway UI.
Query Jira from Node.js
The following example shows how to define a connection and execute queries to Jira with the mysql module. You will need the following information:
- Host name or address, and port: The machine and port where the MySQL remoting service is listening for MySQL connections.
- Username and password: The username and password of a user you authorized on the Users tab of the SQL Gateway.
- Database name: The DSN you configured for the MySQL remoting service.
Connect to Jira data and start executing queries with the code below:
var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', database : 'CData JIRA Sys', port : '3306', user : 'mysql_user', password : 'test' }); connection.connect(); connection.query('SELECT * FROM Issues', function(err, rows, fields) { if (err) throw err; console.log(rows); }); connection.end();