Save the Value of 'Set Variable Activity' in Json file - azure-data-factory

I have a scenario where I have value in Json format. I need to save this Value in Json file. I tried Copy activity by using additional column but I am getting this error "Failed to convert the value in 'value' property to 'System.String' type". Is there any other way to save the value in Json file?

Related

Dataset Empty parameter value

I have an xml dataset, I want to parametrize the compression type to treat .xml and .xml.gz files with the same pipeline :
When I put 'gzip' value in compression type it reads xml.gzip file. I want to know what value I should put to read uncompressed .xml file because it does not accept empty value. It is able to read xml file just when I delete the compression_type parameter
You should pass "None" and it should work out .
I feel "None" is more of a workaround in this particular case. "None" is still a string value, not empty.
In my scenario right now, I have an Excel dataset. I want to make every parameter as generic as possible, including the file path/name, sheet name, and the range. The value of "Range" under Connection tab allows empty value. However if I specify it as #dataset().DataRange and leave my parameter DataRange empty, I cannot preview the data or submit the pipeline because it complains that the value cannot be empty.

Datafactory : write get medata activity structure output to datalake

I am trying to write Generate Metadata to a file in datalake using copy file activity. But getting datatype issue when mapping structure filed to output schema
activity('Generate Metadata').output.structure
error:
Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to convert the value in 'value' property to 'System.String' type. Please make sure the payload structure and value are correct.,Source=Microsoft.DataTransfer.DataContracts,''Type=System.InvalidCastException,Message=Object must implement IConvertible.,Source=mscorlib
As the error shows, it needs String type. So you should cast your activity('Generate Metadata').output.structure to String. Use this expression to have a try: #string(activity('Generate Metadata').output.structure).

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

Encoding issue when retrieving text from QTableWidgetItem

I'm working on a GUI using PyQt5 and a QTableWidget containing CheckBoxes items. I populate the table with data from json file and the user can check/uncheck items.
When I want to retrieve data from my QTableWidget items, I get unexpected error due to some characters : \x19. The character in question is ’ which is well displayed elsewhere.
I don't understand the issue as my input json data is utf-8, I use python3 and when I check my data, I see no encoding issue. This error occurs only when calling text() method on QTableWidgetItem.
As I don't see any other way to retrieve data from my items, I'm quite stuck on it.
with open(filepath) as file:
self.data = json.load(file)
for key, value in self.data.items():
print(key, self.data[key])
keyword_box = QTableWidgetItem(key)
I get no error if I use key to compare with other string for example but when I want to retrieve data (no editing was performed by the user, strings didn't change)
items = self.table.selectedItems()
for item in items:
print(item.text())
I get unknown character in my console and if I try to use the value, I get a \x19 character which fails when I use it to compare with keys in my dictionary.
Could this come from a bug in QTableWidgetItem text() method ?