Skip to main content
Skip table of contents

Datasources

Datasources are a type of PocketQuery Entity that defines where data should be fetched from. They can either be JDBC databases or REST APIs.

Datasource information is stored encrypted in our database. If you ever lose access to your Datasource, Lively Apps support cannot retrieve any data or credentials for you.

Security Advice

If your Datasource requires authentication, make sure to create a new user specifically for PocketQuery in that external service. Apply the principle of least privilege and make sure this user only has read access to data that you actually want to display with PocketQuery.

JDBC/SQL Datasource Types

JDBC/SQL Datasources use a JDBC driver to connect to a given Database. They typically require the following fields:

  • JDBC URL

  • Username

  • Password

Currently, the following types of JDBC/SQL Datasources are available:

Type

JDBC URL Example

MySQL 5

jdbc:mysql://100.1.2.3:3306/database

MySQL 8

jdbc:mysql://100.1.2.3:3306/database

PostgreSQL

jdbc:postgresql://100.1.2.3:5432/database

Microsoft SQL Server (MSSQL)

jdbc:sqlserver://100.1.2.3:1433;database=databaseName

MariaDB

jdbc:mariadb://100.1.2.3:3306/database

Oracle

jdbc:oracle:thin:@100.1.2.3:1521:database

IBM DB2

jdbc:db2://100.1.2.3:50000/database

SAP HANA

jdbc:sap://100.1.2.3:39041/database

Amazon Redshift

jdbc:redshift://100.1.2.3:5439/database

Snowflake

jdbc:snowflake://accountIdentifier.snowflakecomputing.com/?connectionParameters

REST Datasource Types

REST Datasources supports different kinds of authentication. For all REST Datasources a Base URL is required.

PocketQuery can also accept XML results from REST Datasources. If PocketQuery receives back an XML response from a Datasource, it will attempt to convert it into JSON before processing it further. For more information, enable debug mode in your PocketQuery macro.

REST Custom

Allows you to add custom HTTP Headers to your request which can be used for authentication. Also allows you to define custom URL parameters that will be added to every request.

REST Basic

Just like with JDBC/SQL Datasources, this type of datasource lets you specify a Username and a Password. This will be encoded and put into in the Authorization for every request to this Datasource.

If you want to learn more about HTTP Basic Authentication, click here.

REST OAuth2

PocketQuery also supports OAuth2 token-based authentication. This method requires an Authentication Server that generates temporal Access Tokens, which are used to authenticate to your datasource. Refer to the OAuth2 Datasource article to learn more about PocketQuery OAuth2 datasources.

If you are interested in resource limits related to Datasource, check out this article.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.