Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
sunny_talwar

Dropping FieldName with no data

Hi Experts -

Here is my scenario. I am concatenating different databases (with mostly different field names) and then looping through them to create different qvds for each of them by using a flag. Now the problem is that I am getting the field names from all the data bases, although with 0 values and I was wondering if there was a way to remove the extra fields before I store it in the qvd.

Here is a sample script:

Table1:

LOAD *,

  1 as Flag

Inline [

Dim, Value1

A, 1

];

Concatenate (Table1)

LOAD *,

  2 as Flag

Inline [

Dim, Value2

A, 10

];

FOR i = 1 to 2

  TEMP:

  NoConcatenate

  LOAD *

  Resident Table1

  Where Flag = $(i);

  STORE TEMP into Table_$(i).qvd (qvd);

  DROP Table TEMP;

NEXT

DROP Table Table1;

The 1st qvd will include Value2 and 2nd qvd includes Value1 (completely blank) is there anyway I can drop them from the qvd?

Thanks for any ideas and suggestions.

Best,

Sunny

24 Replies
sunny_talwar
Author

It seems to me that there won't be a straight forward way to do this . I guess I will have to live with those extra fields. Thanks for the advice and suggestions guys. As always all of you rock.

Best,

Sunny

swuehl
MVP
MVP

How do you perform your exclusion process, using EXISTS()?

Anonymous
Not applicable

Could you share what this exclusion process does ?

sunny_talwar
Author

Yes, there are rules to exclude, include and tbd a single rows based on multiple different criteria on two different fields.

sunny_talwar
Author

See my response to Stefan below. Will that help?

Gysbert_Wassenaar

Create the qvd's first so you can leave out the fields you don't want and drop the tables immediately afterwards. Then create the concatenated tables from the qvd's you created.


talk is cheap, supply exceeds demand
sunny_talwar
Author

I am not sure I follow you Gysbert

Gysbert_Wassenaar

This:

Table1:

LOAD *,

  1 as Flag

Inline [

Dim, Value1

A, 1

];

STORE Table1 into Table1.qvd (qvd);

DROP TABLE Table1;

Table2

LOAD *,

  2 as Flag

Inline [

Dim, Value2

A, 10

];

STORE Table2 into Table2.qvd (qvd);

DROP TABLE Table2;

Table1:

LOAD * FROM Table1.qvd (qvd);

CONCATENATE(Table1)

LOAD * FROM Table2.qvd (qvd);


talk is cheap, supply exceeds demand
sunny_talwar
Author

Gysbert -

The ultimate goal is not to concatenate them. The goal is to flush them into different QVDs which is then getting pulled into their respective application.

Best,

Sunny

sunny_talwar
Author

Thanks for your support guys. I know that I was hoping to get an answers without showing the complete picture. But my thinking was that it might be a very straight forward (feature or function) thing which I am not aware about.

In the interest of all of your time here, I won't ask for any more help until I get to prepare a better sample which partially shows my exclusion process. But this may take some time.

Best,

Sunny