Hello,
I have an API to which I can connect and retrieve data from, using the Copy activity/transform in Azure Data Factory. It takes a JSON payload in the request body.
{
"filters": {
"from":"2023-10-13T18:00:00.000000Z",
"to":"2023-10-13T18:59:59.999999Z"
}
}
However, since the response is a complex JSON which needs to be flattened multiple times, I'm trying to implement the same using Mapping Data Flow, instead of Copy.
For some reason, in the Mapping Data Flow the Source setting doesn't seem to process the JSON request body payload in the same way - it throws a generic parse error (pasted below). Is there a different/particular format in which the request body needs to be provided in the Data Flow?
Spark job failed: { "text/plain": "{\"runId\":\"22e7ce53-e63d-45c4-a4f4-4db42a05c26a\",\"sessionId\":\"b17813c2-1869-41a4-9802-e34c7272cf99\",\"status\":\"Failed\",\"payload\":{\"statusCode\":400,\"shortMessage\":\"com.microsoft.dataflow.broker.InvalidOperationException: DSL compilation failed: DF-DSL-001 - DSL stream has parsing errors\\nLine 4 Position 11: body: '\\nmismatched input ''' expecting {DECIMAL_LITERAL, HEX_LITERAL, OCT_LITERAL, BINARY_LITERAL, MAX_INT, MIN_INT, MAX_LONG, MIN_LONG, POSITIVE_INF, NEGATIVE_INF, '-', '!', '$', '~', ':', '(', '#', '[', '@(', '[]', FLOAT_LITERAL, HEX_FLOAT_LITERAL, STRING_LITERAL, REGEX_LITERAL, 'parameters', 'functions', 'stores', 'as', 'input', 'output', 'constant', 'expression', 'integer', 'short', 'long', 'double', 'float', 'decimal', 'boolean', 'timestamp', 'date', 'byte', 'binary', 'integral', 'number', 'fractional', 'any', IDENTIFIER, ANY_IDENTIFIER, META_MATCH, '$$', '$$$', '$#', OPEN_INTERPOLATE}\",\"detailedMessage\":\"Failure 2023-10-24 23:15:23.674 failed DebugManager.processJob, run=22e7ce53-e63d-45c4-a4f4-4db42a05c26a, errorMessage=com.microsoft.dataflow.broker.InvalidOperationException: DSL compilation failed: DF-DSL-001 - DSL stream has parsing errors\\nLine 4 Position 11: body: '\\nmismatched input ''' expecting {DECIMAL_LITERAL, HEX_LITERAL, OCT_LITERAL, BINARY_LITERAL, MAX_INT, MIN_INT, MAX_LONG, MIN_LONG, POSITIVE_INF, NEGATIVE_INF, '-', '!', '$', '~', ':', '(', '#', '[', '@(', '[]', FLOAT_LITERAL, HEX_FLOAT_LITERAL, STRING_LITERAL, REGEX_LITERAL, 'parameters', 'functions', 'stores', 'as', 'input', 'output', 'constant', 'expression', 'integer', 'short', 'long', 'double', 'float', 'decimal', 'boolean', 'timestamp', 'date', 'byte', 'binary', 'integral', 'number', 'fractional', 'any', IDENTIFIER, ANY_IDENTIFIER, META_MATCH, '$$', '$$$', '$#', OPEN_INTERPOLATE}\"}}\n" } - RunId: 22e7ce53-e63d-45c4-a4f4-4db42a05c26a