最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

azure data factory - ADF_Error when writing output execution details - Stack Overflow

programmeradmin4浏览0评论

I have a simple ADF copy activity where source is oracle table and sink is ADLSGen2 Blob container. This pipeline runs without any errors.

I added a new activity to log execution details after the copy activity.

This log activity is set to run on completion of the copy activity. I pretty much followed the script here except for changing reference to copy activity name / /

This is what I m passing in query parameter ''' SELECT '@{pipeline().DataFactory}' as DataFactory_Name,

'@{pipeline().Pipeline}' as Pipeline_Name,

'@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].source.type}' as Source_Type, '@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].sink.type}' as Sink_Type,

'@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].status}' as Execution_Status,

'@{activity('CMIC to ADLS2 Append Folder').output.rowsRead}' as RowsRead,

'@{activity('CMIC to ADLS2 Append Folder').output.rowsCopied}' as RowsWritten '@{activity('CMIC to ADLS2 Append Folder').output.copyDuration}' as CopyDurationInSecs,

'@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].start}' as CopyActivity_Start_Time,

'@{utcnow()}' as CopyActivity_End_Time,

'@{pipeline().RunId}' as RunId,

'@{pipeline().TriggerType}' as TriggerType,

'@{pipeline().TriggerName}' as TriggerName,

'@{pipeline().TriggerTime}' as TriggerTime '''

I keep getting this error

Failure happened on 'Source' side. ErrorCode=UserErrorOdbcOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]General error. setStmtType failed ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]Error in SQL Parser.,Source=Microsoft.DataTransfer.ClientLibrary.Odbc.OdbcConnector,''Type=System.Data.Odbc.OdbcException,Message=ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]General error. setStmtType failed ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]Error in SQL Parser.,Source=msora28.dll,'>

I have a simple ADF copy activity where source is oracle table and sink is ADLSGen2 Blob container. This pipeline runs without any errors.

I added a new activity to log execution details after the copy activity.

This log activity is set to run on completion of the copy activity. I pretty much followed the script here except for changing reference to copy activity name https://blogs.perficient/2021/12/08/azure-data-factory-overview/ https://www.mssqltips/sqlservertip/6320/logging-azure-data-factory-pipeline-audit-data/

This is what I m passing in query parameter ''' SELECT '@{pipeline().DataFactory}' as DataFactory_Name,

'@{pipeline().Pipeline}' as Pipeline_Name,

'@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].source.type}' as Source_Type, '@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].sink.type}' as Sink_Type,

'@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].status}' as Execution_Status,

'@{activity('CMIC to ADLS2 Append Folder').output.rowsRead}' as RowsRead,

'@{activity('CMIC to ADLS2 Append Folder').output.rowsCopied}' as RowsWritten '@{activity('CMIC to ADLS2 Append Folder').output.copyDuration}' as CopyDurationInSecs,

'@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].start}' as CopyActivity_Start_Time,

'@{utcnow()}' as CopyActivity_End_Time,

'@{pipeline().RunId}' as RunId,

'@{pipeline().TriggerType}' as TriggerType,

'@{pipeline().TriggerName}' as TriggerName,

'@{pipeline().TriggerTime}' as TriggerTime '''

I keep getting this error

Failure happened on 'Source' side. ErrorCode=UserErrorOdbcOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]General error. setStmtType failed ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]Error in SQL Parser.,Source=Microsoft.DataTransfer.ClientLibrary.Odbc.OdbcConnector,''Type=System.Data.Odbc.OdbcException,Message=ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]General error. setStmtType failed ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]Error in SQL Parser.,Source=msora28.dll,'>

Share Improve this question asked Mar 17 at 22:19 Swati VishwanathanSwati Vishwanathan 619 bronze badges 0
Add a comment  | 

2 Answers 2

Reset to default 0

I have tried the same scenario and its working fine for me.

SELECT '@{pipeline().DataFactory}' as DataFactory_Name,
'@{pipeline().Pipeline}' as Pipeline_Name,
'@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].source.type}' as Source_Type, '@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].sink.type}' as Sink_Type,
'@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].status}' as Execution_Status,
'@{activity('CMIC to ADLS2 Append Folder').output.rowsRead}' as RowsRead,
'@{activity('CMIC to ADLS2 Append Folder').output.rowsCopied}' as RowsWritten, '@{activity('CMIC to ADLS2 Append Folder').output.copyDuration}' as CopyDurationInSecs,
'@{activity('CMIC to ADLS2 Append Folder').output.executionDetails[0].start}' as CopyActivity_Start_Time,
'@{utcnow()}' as CopyActivity_End_Time,
'@{pipeline().RunId}' as RunId,
'@{pipeline().TriggerType}' as TriggerType,
'@{pipeline().TriggerName}' as TriggerName,
'@{pipeline().TriggerTime}' as TriggerTime

Result csv file:

You can cross-check the below things to make it work out.

  • Your query has some syntax errors, so once try with my query.
  • First, check the query in a lookup activity and if its working, then publish the copy activity pipeline and re-check.
  • Also, the above query won't work if first copy activity fails. So, make sure you handle the failure case of the first copy activity as well.

Thanks for your help. This worked after I changed the source dataset; SQL database. I think there is some weird behavior with Oracle database.

The preceding copy activity was against an Oracle database so I kept the log activity against the same source. When I changed the source to a SQL database it worked

发布评论

评论列表(0)

  1. 暂无评论