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: 
Carol-
Contributor
Contributor

Enforcing data type during data load script

Hello! Qlik newbie here...

I've created a data load script that imports a KML then joins it to a CSV to create an attribute table. I noticed that in Qlik Sense Desktop, it automatically sets fields as "Geodata" but I'd rather it not do that. I'd rather all fields be loaded as the "General" data type. Because of what I am attempting to do, it appears that each time I load data, the field data types reset to "Geodata" even after I manually change the fields in the Data Manager to "General".

How can I add the "General" type to each field in the load script to ensure it will enforce that data type upon loading?

Thank you in advance for your help!

Below is a subset from the data load script:

//Loading KML and CSV pair for admin 3 and join as one table
//Qualify and Unqualify are used for loading and joining each pair so that they only join on one field (avoiding syth keys and
//keeping each admin level as a separate table)
Qualify*;
Unqualify "#adm3+code+v_pcode", "#adm3+i_fr+name";
COD_$(vCountryCode)_Admin3_kml:
LOAD
    "COD_$(vCountryCode)_Admin3.Name" as "#adm3+code+v_pcode",
    "COD_$(vCountryCode)_Admin3.Area"
	
FROM [$(vAdmin3KML)]
(kml, Table is [COD_$(vCountryCode)_Admin3]);

Join(COD_$(vCountryCode)_Admin3_kml)

COD_$(vCountryCode)_Admin3_csv:
LOAD
    "#country+i_fr+name",
    "#country+code+v_pcode",
    "#adm1+i_fr+name",
    "#adm1+code+v_pcode",
    "#adm2+i_fr+name",
    "#adm2+code+v_pcode",
    "#adm3+i_fr+name",
    "#adm3+code+v_pcode",
    "#date+start"
	
FROM [$(vAdmin3CSV)]
(txt, utf8, embedded labels, delimiter is ',', msq);

 

Labels (3)
3 Replies
Lisa_P
Employee
Employee

Try turning the Data Profiling off in the Data Manager.

Instead of hitting Add Data green button, click the dots on the left and disable the Data Profiling before hitting the Add data button.  If the data is already loaded, you can get here by editing the table in data manager and edit the table (pencil icon) and then Select data from source.

This should not try to profile the geographic data.

Carol-
Contributor
Contributor
Author

Thank you for the response, Lisa. I was hoping for a way to add that to a load script instead of having to manually change the type within Data manager. Based on other posts, it appears that including data profiling for fields in a script is not (yet?) possible.

DGO
Contributor III
Contributor III

I have a few country fields that are automatically set to the geo data field type by Data Manager.  It slows down loading.  I have to manually set it back to general type, but every time the load script changes, it gets set back to geodata.  I need a way to prevent it from doing that.