# Connecting to OneLake using T-SQL?

**URL:** <https://forum.inductiveautomation.com/t/connecting-to-onelake-using-t-sql/87545>\
**Category:** Ignition\
**Created:** [March 19, 2024, 12:17pm UTC](https://forum.inductiveautomation.com/t/connecting-to-onelake-using-t-sql/87545 "2024-03-19T12:17:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBL](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl/32/56813_2.png) [@SBL](https://forum.inductiveautomation.com/u/SBL)\
**Post date:** [March 19, 2024, 12:17pm UTC](https://forum.inductiveautomation.com/t/connecting-to-onelake-using-t-sql/87545/1 "2024-03-19T12:17:37Z")

</div>

Hi everyone,

Has anyone successfully connected to Microsoft OneLake (Fabric) using their T-SQL connection?

Need some pointers on how. 🙂

---

<div class="post-metadata">

**Author:** ![Matt\_Boyle](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@Matt\_Boyle](https://forum.inductiveautomation.com/u/Matt_Boyle)\
**Post date:** [June 12, 2024, 2:43pm UTC](https://forum.inductiveautomation.com/t/connecting-to-onelake-using-t-sql/87545/2 "2024-06-12T14:43:56Z")

</div>

Were you able to figure this one out? I also have a need to push data from Ignition to OneLake. Really don't want to push to Azure database and then have to setup a pipeline for my LakeHouse.

---

<div class="post-metadata">

**Author:** ![SBL](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl/32/56813_2.png) [@SBL](https://forum.inductiveautomation.com/u/SBL)\
**Post date:** [June 13, 2024, 7:23am UTC](https://forum.inductiveautomation.com/t/connecting-to-onelake-using-t-sql/87545/3 "2024-06-13T07:23:54Z")

</div>

Yes, indeed.

- You need to upload JAR libraries for entra-authentication and all its dependencies.
- You need to have your credentials blank, and define them as extra connection propeties. (AADSecurePrincipalId)
- You need to change your mssql-translator.

At this time you will not be able to use T-SQL as Tag Historian storage, as it is yet not supporting unique indexes.

Or, maybe we can now?

> **[CREATE INDEX (Transact-SQL) - SQL Server](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-index-transact-sql?view=sql-server-ver16)**
>
> CREATE INDEX (Transact-SQL)
