Quickstart Guide for RestBI
Install, Configure the Models, and execute Queries
Deploy RestBI with Docker
To get started quickly with RestBI, you can deploy the RestBI server using Docker. The Docker image is available on DockerHub, making deployment simple and fast.
Pull the Docker image from DockerHub:
Run the RestBI server with the following command:
Install the SDK
Next, we need to install the SDK from npm. Open your terminal and run the following command in your project directory:
Define Your Data Model
Create a data model file. This file will define the connection, tables, columns, joins, and formulas specific to your database. This keeps connection details secure and allows the RestBI server to generate accurate SQL queries based on your model.
Example: dataModel.ts
Create a Query
Create a query to fetch data from your database. The query will specify the columns you want to retrieve, any filters, sorting options, and a limit on the number of rows.
Example: query.ts
This query selects the Total Due and Order Date columns from the database, applies a filter to only include records where the Order Date is on or after January 1, 2024, and limits the results to 100 rows. It's equivalent to a SQL SELECT
statement with a WHERE
clause and a LIMIT
.
Get the Dataset
Use the SDK to send the query to the server. The SDK will handle communication with the server and return the results.
Example: index.ts
Last updated