String or binary data would be truncated. The statement has been terminated. Issue in synapse analytics

Rohit Kulkarni 731 Reputation points
2022-10-07T12:53:49.627+00:00

Hello Team,

I am using this script :

Write object into internal table of the dedicated SQL pool

(df.write
.option(Constants.SERVER, DLH_SYNAPSE_DEDICATED_SQL_SERVER)
.option(Constants.DATA_SOURCE, SOURCE_SYSTEM_NAME)
.mode("append")
.option("preActions", "ALTER TABLE Salesforce.Case ALTER COLUMN Description varbinary(max) ;") \
.synapsesql(DLH_SYNAPSE_DEDICATED_SQL_DB_BRONZE+"."+SOURCE_SYSTEM_NAME+"."+TABLE_NAME,
Constants.INTERNAL, # Create external table type
#"/path/to/external/table") # Optional parameter that is used to specify external table's base folder; defaults to database_name/schema_name/table_name
)

To insert the data into synapse tables

There is one column Description which has a dataype of

248477-image.png

But the data present in thie specific description column is in this format :

Continuation of this meeting series in 2021 Hi This is the invitation to the sprint review (https://en.wikipedia.org/wiki/Scrum_(software_development)#Sprint_review) of software activities in projects * Net * SmartL * Opt * Daedalus The goal of this meeting is providing a regular status update and – more importantly- give you a chance to suggest improvement. Attendance is voluntary.__________________________________________________________________________ Join Microsoft Teams Meeting\

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.