Microsoft Fabric provides a suite of data analytics, data engineering, and BI tools on the Azure platform.
In this guide, we’ll walk through how to install and run GlareDB using a Notebook in Fabric.
The first step to running GlareDB in Fabric is to create a notebook. A notebook can be created by selecting Notebook (Preview) from the Create tab.
Once created, you’ll be dropped into the notebook where you can begin executing python cells.
Now we’re able to install the glaredb python library by executing the following in a python cell:
!pip install glaredb
If everything installed successfully, you should be able to import and use glaredb:
con = glaredb.connect()
con.sql("select 'hello from fabric'").show()
And this is what the output should look like:
Connecting to GlareDB Cloud to your deployment is easy. If you’re a new user, a deployment is automatically created for you. If you have multiple, select the one that you’d like to connect with. To get connection details for the deployment, click the Connect button then select the Python tab. This will provide a connection URI that you can use when connecting via the python library.
Paste the URI from the prior step in the connect function:
con = glaredb.connect("glaredb://user:email@example.com:6443/deployment")
And once connected you can now query all tables in your GlareDB Cloud deployment from Fabric.
When connecting to GlareDB Cloud through the python library, Hybrid Execution will automatically be enabled.