Connect to Database

In the previous section, we demonstrated the steps to build your first app by importing your CSV data.

There are also other ways to create an app with PowerTable:

  • Connect to an existing database table and build an app

  • Directly type in data in the app and create a table in the database

  • Connect to an existing semantic model and build an app

In this section, we'll connect to your existing database and create an app using PowerTable.

The source and destination will be the same, so we will connect to and writeback the changes to the same database. Let us look at the steps.

  1. Go to your Microsoft Fabric workspace folder. Click on New item to create a new item.

Create a new item
  1. Select PowerTable from the list of items. You may want to add it to your favorites by clicking on the star icon.

Select 'PowerTable'
  1. Enter a name for your PowerTable app and select the workspace. Click on Create.

Create PowerTable item
  1. Click on Create a New App to create your app. You may also select 'Explore PowerTable' to experience a sample PowerTable app.

Create a New App
  1. Choose your data source: The next step is to select an existing database to connect to. After connecting to it through PowerTable, your app synchronizes its data with the database.

Let's say you want to connect to sales data residing in a Microsoft Fabric SQL database. Follow the steps below to create a new connection to your preferred data store:

  • Click on New Connection.

  • Choose your preferred data platform. We'll connect to the Fabric SQL database.

  • Click Next.

Creating a new connection

If you already have shared database connections or a private connection to the required data store, skip step 5. Instead, click on the 'Existing Connection' tab, select the one you want to use, and then click Next.

Choosing an existing connection
  1. Setup Connection: Enter the connection type and a unique connection name. Select the workspace and the database from the list of options and click Next. Your new private connection is now created.

Setup Connection
  1. Choose your table: In this step, you have two options :

    1. Select Existing Table to connect to an existing table in the database (or)

    2. Select New Table to create a new table in the database.

    Since we want to connect to an existing database, we'll choose Existing Table. We'll enter the schema name and the table name 'Sales' to connect to it. Click Next.

Connecting to database
  1. PowerTable detects column properties automatically. You can edit them if necessary. Select the primary key. After verifying the details, click Finish.

Click 'Finish'

You have now successfully connected to a database and created an app using PowerTable.

PowerTable app created

You can start working with this data, making changes as needed and configuring access control, workflows, approvals, and other features for your new app. These are covered in the upcoming sections.

Last updated