Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
marcorizzo
Contributor III
Contributor III

Data Format

I'm loading data from a mysql database.

There a couple a fields that are not formatted in the right way (in qvw file you can see the field oggettoWEB).

How can i solve ?

Thanks

5 Replies
fvelascog72
Partner - Specialist
Partner - Specialist

Hi,

Which is the format what are you looking for?

I think you could convert all with UPPER or with LOWER or maybe with CAPITALIZE.

From help:

UPPER:

upper( 'abcD' ) returns 'ABCD'.

LOWER:

lower( 'abcD' ) returns 'abcd'.

CAPITALIZE:

capitalize ('my little pony') returns 'My Little Pony'

capitalize ( 'AA bb cC Dd') returns 'Aa Bb Cc Dd'

jagan
Luminary Alumni
Luminary Alumni

Hi,

You can use various string functions like

Upper()

Lower()

Capitalize()

based on your requirement.

Regards,

Jagan.

marcorizzo
Contributor III
Contributor III
Author

Hi. The problem is that when i take data from the mysql db, i've got this strange situation :

1. AS IT COULD BE : è andato via

2. THIS IS WHAT I'VE GOT : &egrave andato via

😞

jonathandienst
Partner - Champion III
Partner - Champion III

That is an encoding problem - the data has been encoded in the database and you will need to decode the unicode entity codes.

You can do this with MapSubstring like this:

//place this before loading from MySQL

MapDecode:

Mapping LOAD * Inline

[

  Code, Char

  &egrave, è

  ...

];

//Your MySQL load

LOAD *,

  MapSubstring('MapDecode', myField) As Decoded

;

SQL SELECT ....

;

Add more entity decodings to the inline load according to your needs. And change the field name 'myField' to the correct name of the field you want to decode.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
marcorizzo
Contributor III
Contributor III
Author

Thanks a lot !!!

It works...