Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
its_rajvir
Creator
Creator

Understanding data types in qlik sense

Hi Experts,

I am very new to Qlik Sense. I was confused with datatypes in qlik sense. How we can assign data types to columns in qlik sense, and how we can check data type of the columns. Can we assign int, varchar small int, tiny int etc datatypes in qlik sense as well? 

Waiting for your valuable answers experts.

Thanks in advance

 

 

Labels (7)
1 Solution

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

Hello,

 

Here is the official documentation of Data types in Qlik Sense [1], where it is stated that "Qlik Sense can handle text strings, numbers, dates, times, timestamps, and currencies correctly". In this official documentation you will find a lot of information about how the data is stored in Qlik Sense and how it is interpreted. 

 

One important information is in the page Data without type information [2], where it states "Qlik Sense will interpret the data as:". Here you will find a list of all the data types that Qlik Sense will try to identify in the order that they are mentioned. As you can see, if everything fails from point 1 to 10, then the last step is just assume that the data provided is actually string.

 

If you would like to point Qlik Sense to the right direction and allow it to interpret the data as you wish, then you can easily do so within the Data load editor, where you will be able to use functions such as Num() [3], Text() [4], MakeDate() [5] etc., as in the following example:

 

Load 

   Num(ID) as EmployeeID

[...]

 

This load statement will take the ID field and will convert all the values to numeric ones (in case they are read or stored as string in the data source). The same can be done for other formats, which is essentially what you have stated by "Can we assign int, varchar small int, tiny int etc datatypes in qlik sense as well?", only in Qlik Sense they are not exactly INT, VARCHART etc., since they are treated as Dual() [6], where you have the text representation and the value stored.

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, addressed your concerns or at least pointed you in the right direction, please mark it as Accepted Solution to give further visibility to other community members. 

 

---

[1] https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/data-types...

[2] https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/number-int...

[3] https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/Formatting...

[4] https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/Interpreta...

[5] https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTim...

[6] https://help.qlik.com/es-ES/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/Formatting...

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

1 Reply
Andrei_Cusnir
Specialist
Specialist

Hello,

 

Here is the official documentation of Data types in Qlik Sense [1], where it is stated that "Qlik Sense can handle text strings, numbers, dates, times, timestamps, and currencies correctly". In this official documentation you will find a lot of information about how the data is stored in Qlik Sense and how it is interpreted. 

 

One important information is in the page Data without type information [2], where it states "Qlik Sense will interpret the data as:". Here you will find a list of all the data types that Qlik Sense will try to identify in the order that they are mentioned. As you can see, if everything fails from point 1 to 10, then the last step is just assume that the data provided is actually string.

 

If you would like to point Qlik Sense to the right direction and allow it to interpret the data as you wish, then you can easily do so within the Data load editor, where you will be able to use functions such as Num() [3], Text() [4], MakeDate() [5] etc., as in the following example:

 

Load 

   Num(ID) as EmployeeID

[...]

 

This load statement will take the ID field and will convert all the values to numeric ones (in case they are read or stored as string in the data source). The same can be done for other formats, which is essentially what you have stated by "Can we assign int, varchar small int, tiny int etc datatypes in qlik sense as well?", only in Qlik Sense they are not exactly INT, VARCHART etc., since they are treated as Dual() [6], where you have the text representation and the value stored.

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, addressed your concerns or at least pointed you in the right direction, please mark it as Accepted Solution to give further visibility to other community members. 

 

---

[1] https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/data-types...

[2] https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/number-int...

[3] https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/Formatting...

[4] https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/Interpreta...

[5] https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTim...

[6] https://help.qlik.com/es-ES/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/Formatting...

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂