datastage buildop error - buildop throwing the error - datastage

I am getting the following error message, when I am running a job in datastage. The buildop stage is throwing this error
isUsable() is false on the accessor interfacing to field "getEditsReturn"
The filed is input field.
getEditsReturn is the only input column to buildop.
The code is
while(!inputDone(0)){
readRecord(0);
input = inputData.getEditsReturn;
fprintf(fp,"input : %s",input.c_str());
//break the string based on delimiter and assign to output columns
transferAndWriteRecord(0);
}
Here input is the c++ string type(not char[]). I tried to assign the input column to char[] also. It was also not working. I have set autoread and autowrite to false. I am writing those output columns to a file using fprintf. I am getting that output correctly in the file. But the stage is failing

Related

Azure Data Factory - Capture error details of a dataflow activity -> Store into a variable -> Assign this variable to a dataflow parameter

I have a data flow and my requirement is to capture the error details into a variable when it fails and assign this variable to a parameter in the next data flow. I tried to achieve this until the second stage(With help) as below, but I'm unable to get this variable assigned to a parameter in the next data flow. The error I get is - Expression cannot be parsed
What do I do later?
This parameter is assigned to a column in the data flow and I use this column to update the table in the dedicated pool with the relevant error message.
I tried to reproduce the same in my environment and I got the same error
The above scenario fails, because dataflow fails to parse ' ' and / in your error message.
To resolve above error,please follow below steps:
I just create the error fail1 with message containing a different character.
Go to set variable : Create a variable and added dynamic content to the value.
#replace(replace(string(activity('Fail1').output.message),pipeline().parameters.quote,'"'),'\','/')
Output:
Updated:
Parameter

Datetime Type from powershell to access with blank values

My issue is simple, I have a csv I am importing, my code works perfect until it finds blank values.
I tried setting the blank values to $null, Dbnull and others and I keep getting a data type mismatch in criteria expression
Error: "Exception calling "ExecuteNonQuery" with "0" argument(s): "Data
type mismatch in criteria expression."
However when manually importing the csv from access, we can see that those empty values stay empty and blank in the column with date time format.
So the expected result would be that if you import the csv in powershell you would also get those empty values for date time but instead they generate an error and are skipped.
Is there a way to cast a blank value as a datetime ? I need the values as blank for data collection purposes and powershell for the ease of scripting in it and modifying it .
If powershell is not possible.
if ($_.date) {
([datetime]$_.date).ToString('M/d/yyyy H:mm')
}
else {
[DBNull]::Value
}
Now the expected result, is that once I import, those rows with empty date values will show with those values still empty on the database, yet they get skipped due to the error "

how to read and compare a part of output string with a stored variable in seleniumIDE

98619664xxxx1::01070:0001:SKIP:0 X
is my output that I see in browser, from the xpath=//pre[contains(.,'98619664xxxx1::01070:0001:SKIP:0 X')] and I want to extract only 619664xxxx1 from the output string and verify this with a variable I have set in the test suite of the project.
I have tried the storeText of the output to a variable and then with if condition trying to read the text with my variable.
A part of the log:-
assertElementPresent on xpath=//pre[contains(.,'98619664xxxx1::01070:0001:SKIP:0 X')] OK
20.storeText on xpath=//pre[contains(.,'98619664xxxx1::01070:0001:SKIP:0 X')] with value response OK
if on "${response}" == "${Rufnummer1}" Failed:
missing ) in parenthetical

Compare String using tMap

I am using Talend to prepare dataware.
I want to compare the string with the contents of a column using the tMap component and create a variable to store in the DB. The problem is that the == operator does not give the right result (Example: row2.recipient == "text"?"text":"" I always get "") and if I use .equals I get errors when executing.
You will get error if row2.recipient is null, and "==" should not be used when comparing strings.
Correct syntax would be :
"text".equals(row2.recipient)?"text":""
Then you will prevent NullPointerExceptions.

Set dataset observation names to first column

I am trying to set the first column of my dataset as the observation name. Each observation is a separate stock within dataset 'portfolio'.
I tried this command:
portfolio.Properties.ObsNames = portfolio.ticker
I got the error message
Error using dataset/subsasgnDot (line 31)
NEWNAMES must be a nonempty string or a cell array of nonempty strings.
Error in dataset/subsasgn (line 83)
a = subsasgnDot(a,s,b);
I looked at the code but didn't see where I went wrong.
I tried casting to a cell array but it didn't work. I used this code:
portfolio.Properties.ObsNames = dataset2cell(portfolio.ticker)
and got this error message
Undefined function 'dataset2cell' for input arguments of type 'cell'.
What should I try next?
I managed to cast it by doing the cast on a separate line.