Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Do not load all data

Hi all

I have a small problem. I am loading some data and there I have articles with different number of figures (5-7-8-9). I will only load data for the articles that has a length of 7 of more.

How do I do that?

EXTERNALIDENTIFIER is my article and I have tried some different solutions without luck

LOAD

//   ID,
//    VERSION,    EXTERNALIDENTIFIER,
   
if(len(EXTERNALIDENTIFIER>=7),EXTERNALIDENTIFIER) as Article,

//    HOSTIDENTIFIER,
//    DESCRIPTION,
//    DELETEDBYHOST,
//    LASTORDER,
//    SHELFLIFE,

best regards

Bjarne

Labels (1)
1 Solution

Accepted Solutions
rbecher
Partner - Master III
Partner - Master III

Which database vendor do you have? Could be length( )..

You could also use a where clause in the LOAD part:

LOAD //   ID,
//    VERSION,    EXTERNALIDENTIFIER as Article,,

    "MERCHANDISECATEGORY_ID" as ArticleGroupID

where len(EXTERNALIDENTIFIER)>=7;

SQL SELECT *
FROM MSMATERIAL;

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine

View solution in original post

4 Replies
rbecher
Partner - Master III
Partner - Master III

Hi Bjarne,

just use a Where Clause:

where len(EXTERNALIDENTIFIER)>=7

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Not applicable
Author

Hi Ralf

I have tried this

LOAD //   ID,
//    VERSION,    EXTERNALIDENTIFIER as Article,,

    "MERCHANDISECATEGORY_ID" as ArticleGroupID;

SQL SELECT *
FROM MSMATERIAL
where len(EXTERNALIDENTIFIER)>=7;

But it will not "eat" where len(EXTERNALIDENTIFIER)>=7; Any further help?

rbecher
Partner - Master III
Partner - Master III

Which database vendor do you have? Could be length( )..

You could also use a where clause in the LOAD part:

LOAD //   ID,
//    VERSION,    EXTERNALIDENTIFIER as Article,,

    "MERCHANDISECATEGORY_ID" as ArticleGroupID

where len(EXTERNALIDENTIFIER)>=7;

SQL SELECT *
FROM MSMATERIAL;

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Not applicable
Author

Hi

Length did work. thanks