Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
I've connected a SQL Server database as an external connection in Unity Catalog. It looks like when I write SELECT queries to that connection I end up locking my tables on the SQL Server. Is there a way to query these tables using a "with (nolock)" command like I would inside SQL Server? I've done this in the past in Databricks by using a JDBC connection to the same server and adding "with (nolock)" to the right of my table name string.
Hi @wallco26, To avoid locking tables when querying SQL Server databases using Unity Catalog, you can pass the WITH (NOLOCK) Hint as an option when creating the foreign catalogue in Unity Catalog.
Thanks Slash - where would the "with (nolock)" command fall into the SQL Syntax...within the OPTIONS section? What would the specific command look like?
Join 100K+ Data Experts: Register Now & Grow with Us!
Excited to expand your horizons with us? Click here to Register and begin your journey to success!
Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!