I am loading in data from a .tsv file
TBL_USERPROFILES:
GENERIC LOAD
// ProfileID,
UserID,
// PropertyDefinitionID,
// PropertyCategory,
PropertyName,
Capitalize(PropertyValue)
// LastUpdatedDate
FROM
[User_Profiles.tsv]
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
I receive the following error message. Is the error in the data or the script? What would the fix be?
Blank field name not allowed
TBL_USERPROFILES:
GENERIC LOAD
UserID,
PropertyName,
Capitalize(PropertyValue)
FROM
[User_Profiles.tsv]
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq)
Works just fine for me:
TBL_USERPROFILES:
GENERIC LOAD
UserID,
PropertyName,
Capitalize(PropertyValue) AS PropertyValue
FROM
[https://community.qlik.com/thread/314215]
(html, codepage is 1252, embedded labels, table is @1);
I assume the PropertyName field shows blanks or NULL, so maybe try to check your input data file or use something like
TBL_USERPROFILES:
GENERIC LOAD
UserID,
If(Len(Trim(PropertyName)),PropertyName,'DummyField') as PropertyName,
Capitalize(PropertyValue) AS PropertyValue
FROM
[https://community.qlik.com/thread/314215]
(html, codepage is 1252, embedded labels, table is @1);
Try
TBL_USERPROFILES:
GENERIC LOAD
UserID,
PropertyName,
[Capitalize(PropertyValue)]
FROM
[User_Profiles.tsv]
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq)
This changes to error to:
Field not found - <Capitalize(PropertyValue)>
TBL_USERPROFILES:
GENERIC LOAD
UserID,
PropertyName,
[Capitalize(PropertyValue)]
FROM
[User_Profiles.tsv]
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq)
Are you trying to make the Propertyvalue to upper case, may be use like
GENERIC
LOAD ......,
UPPER(PropertyValue) AS PropertyVal
FROM ......;
I unfortunately did not write the script, so I am not entirely certain what the intent was. Assuming they just wanted to capitalize the first letter, which would make Capitalize(txt) correct, what else could the issue be? Some values in that field are blank / numeric, could that be an issue?
Can you try like
Capitalize(PropertyValue) AS PropertyValue
Unfortunately, still receive same error:
Blank field name not allowed
TBL_USERPROFILES:
GENERIC LOAD
UserID,
PropertyName,
Capitalize(PropertyValue) AS PropertyValue
FROM
[User_Profiles.tsv]
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq)
Can you not use this Capitalize and just load the values as is and check?
Still generates the same error
Hi evansabres
Would it be possible to provide a sample file?
Please also try the following:
TBL_USERPROFILES:
GENERIC LOAD
UserID,
PropertyName,
IF(ISNULL(PropertyValue), 0, PropertyValue) AS PropertyValue
FROM
[User_Profiles.tsv]
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
I guess as this is a Generic Load, the query is expecting value on the third column and might not accept a blank or null.
Regards
Rajiv.