Comments (10)
Certainly looks like it is caused by the name of the temp staging table not being granular enough. Adding the sink table name to the temp table should resolve this yes.
from sql-spark-connector.
Hi ankitbko
Try adding below option, it will solve your table lock issue.
option("tableLock", True)
from sql-spark-connector.
@pramodnagare tablelock
option is meant to be used with heap tables only. tablelock
option is set to true automatically for staging tables.
cc: @shivsood
from sql-spark-connector.
Hello, I am encountering the same issue. I need to use the following options
.option("schemaCheckEnabled", False) \ .option("reliabilityLevel","NO_DUPLICATES") \
from sql-spark-connector.
Any update on this ?
from sql-spark-connector.
@ankitbko does this happen only on databricks? Can u send repro step and your scripts for us to repro this. @luxu1-ms as FYI
from sql-spark-connector.
I also encounter this issue when running multiple instances of the same notebook on the same cluster (DBR 7.3 LTS) using Azure Databricks. My notebook attempts to load data from delta lake table source and overwrite the data in an existing Azure SQL Database table using the following options:
try: dfSource.write \ .format("com.microsoft.sqlserver.jdbc.spark") \ .mode("overwrite") \ .option("url", url) \ .option("dbtable", sinkTable) \ .option("user", userName) \ .option("password", password) \ .option("truncate", "true") \ .option("tablock", "true") \ .option("schemaCheckEnabled", "false") \ .option("batchsize", batchsize) \ .option("reliabilityLevel", "NO_DUPLICATES") \ .save() except ValueError as error : print("Connector write failed", error)
The intent is to preserve the table definition (and indexes) in the sink database. I realise the tablock is only required for heaps, but this is a generic notebook that loads to both indexed and heap tables.
Importantly, I don't get an error when I run the notebook in isolation, so it appears that there is some shared global temp table that is causing deadlocks in parallel execution scenario.
from sql-spark-connector.
I think gerardwolf's issue is different from #49, but related with #132.
from sql-spark-connector.
@ankitbko Could you please provide repro scripts? I am not able to repro this issue.
from sql-spark-connector.
Close this issue since no more info provided and cannot repro it. Please reopen if more info provided.
from sql-spark-connector.
Related Issues (20)
- java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver HOT 1
- writing with mode "append" to an existing table only rolls back faulty rows w/o "NO_DUPLICATES"
- [Question] how to set MAXDOP
- Error while writing - com.microsoft.sqlserver.jdbc.SQLServerException: The connection Is closed. HOT 1
- Missing Maven distros HOT 6
- TCP/IP connection to the host whatever.database.windows.net, port 1433 has failed. Error: "null. Verify the connection properties. HOT 3
- Need the ability to use a linked service in a notebook to do a connection to a database
- Don't run the AFTER insert trigger
- Possible Wheel (.whl) distribution? HOT 1
- GA versions HOT 2
- TIMESTAMP to datetime2 fails on Azure Synapse HOT 1
- Connection closed when try to use om.microsoft.sqlserver.jdbc.spark connector HOT 4
- Version 8.4.1 of Microsoft JDBC Driver For SQL Server
- [Request] Support Spark 3.5 HOT 1
- Does bulk upsert data import support?
- Support for Spark 3.4.x HOT 2
- Assessing the risk of duplicated entries for BEST_EFFORT reliabilityLevel HOT 1
- sql-spark-connector issue where the access token expires post 60 mins HOT 1
- Intermittent Authentication Failure using ActiveDirectoryPassword
- The project is dead or archived? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sql-spark-connector.