when i tried with below header CSV file, got the error.
Is there any trick about it?
HOSTNAME;Owner SicilNo;Username;OwnerDisplayName;Local Grup
Did you try surrounding the column name you are selecting in " " like i suggested above(in collector, not CSV)? You can have spaces in the CSV header but the collector needs the " " when specifying the column you are selecting.
Try enclosing the column names in double quotes such as:
"HOSTNAME";"Owner SicilNo";"Username";"OwnerDisplayName";"Local Grup"
This file format is unchangeable, i mean it used by other systems and i should read it with original format.
So is there any way to read columns names without (") character?
Can you provide the error you are seeing?
We have spaces in some of our CSV files. We surround the column header in " " when defining the collector. For example, our header is:
When we write the query for the collector we select "Account Status" from the CSV file.
Your example users semicolons instead of commas in the CSV. Do you have semicolons in your CSV file? I wouldn't be surprised if that's your problem instead of the space.
The solution to the problem is to define the CSV Separator in the connection string.
Since semicolon (;) is a reserved character in the JDBC connection string, you can use the Unicode equivalent of semicolon to work around the problem.
There is no problem with URL, i have already use separator as you said.
When i remove blanks from header i can collect the datas, then revert it original condition got error.
You can find the sample of my csv file:
HOSTNAME;OwnerSicilNo;Username;Owner DisplayName;Local Grup
x.y.z;aa bb;cc;dd ee;ff
You can find the error below:
As Ryan said, you are missing the quotes.
I tested your CSV and I had no problems getting it working.
SELECT DISTINCT HOSTNAME,OwnerSicilNo,Username,"Owner DisplayName","Local Grup" as resource FROM test
Thank you very much. It worked!
You are right, sorry for confusion
Retrieving data ...