Introduction
Microsoft Fabric is a real-time analytics service that allows you to interact with your data in the context of databases. Kusto Query Language (KQL) is a powerful language that enables you to query and analyze data in Microsoft Fabric. In this blog, we will learn how to create a KQL database and table and ingest flat file data into the table. Let’s get started
Create KQL Database
Note, before we can create KQL Database, we need to have a workspace with a Microsoft Fabric-enabled capacity. In this article, we have already created a workspace named KQL Database.
Select the KQL Database workspace and switch to the Data Factory experience at the bottom left
- In the New dropdown, select KQL Database (preview)
- In the New KQL Database dialogue box, provide name for the database. In this article, Database is provided as the name.
- Click Create
There we go, we have successfully created the KQL Database. In the screenshot below, we’ve got the database details size and different ways we can ingest data into the database.
Create Table and Ingest Flat File Sales Data
Next, we need to create a Table within the newly created database which allows us to ingest sales data from Comma Separated Values flat file.
- To create a table, in the New drop-down, select Table.
In the Destination tab, we provided fTransaction as Table name. The green checkmark indicate that the fTransaction table name is not currently in use.
- Click Next:Schema
In the Source tab, select File from the Source Type drop-down
- Click Next:Schema
In the Upload File, browse through the location of the CSV file
- Click Next:Schema
In the screenshot below, we have successfully uploaded the CSV file
- Click Next:Schema
In the Schema tab, we can see the Compression Type, Data Type, Command Viewer which houses the KQL query to create table and insert into the table. In addition, we can see the Partial data preview
- Click Next:Summary
In the Summary tab, the table creation is completed and data ingested was successful.
- Click Close
In the screenshot below, the fTransaction table is visible. We cam begin to query the data.
In the next blog, we will write some KQL queries to interact with the data. See you later.