Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
darrell_tobin
Creator
Creator

GDPR field list

Hi guys,

I am reviewing the data fields in my Qlik environment in order to check for personal data and GDPR compliance.

  1. Is there a way of easily extracting a list of fields loaded into a given Qlik sense app
  2. Is there a way of easily extracting a list of fields loaded into all Qlik sense apps

Thanks in advance

Darrell

6 Replies
jwjackso
Specialist III
Specialist III

The answer to the first question is $Field, it is a list of fields in the loaded tables.  See the system fields information here:  https://help.qlik.com/en-US/sense/September2017/Subsystems/Hub/Content/Scripting/system-fields.htm

darrell_tobin
Creator
Creator
Author

Thanks Jerry...

OmarBenSalem

1)

If You want to know how to do this in the script to directly export it by "store...into':

In the end of your script do as follow:

for i=0 to NoOfTables()-1

let vTableName$(i)= TableName($(i));

let nOffield=NoOfFields('$(vTableName$(i))');

for j=1 to $(nOffield)

LET Field$(j) = FieldName(j,'$(vTableName$(i))');

final:

load Distinct '$(vTableName$(i))' as TableName, '$(Field$(j))' as Field Resident $(vTableName$(i));

next j

next i



store final into appName.qvd;

Result:

Capture.PNG


This final table will contain the name of all the tables and the corresponding fields.

You can export this table and have all what you want.

Another dirrect way, is to use system functions that qlik proposes.

Create a simple table with 2 dimension

$Table

$Field

and you'll have what u want; you can then export the table:

Capture.PNG

2)

To have all he fields of all the app:

I don't think there is a direct way:

but a way to it, is create the above script in all of ur apps; store all of the created final tables in all of the apps in the same folder.

Create a new app:

with only this script:

AllTable

load * from *.qvd;

Now:

store this table that's ll contain all of the tables and fields of all the qlik sense app directly in the script

or create a simple table and export it.

Hope that was clear?

zebhashmi
Specialist
Specialist

what about binary load?

darrell_tobin
Creator
Creator
Author

Hi Omar,

Thanks for this.  I have added to script but it looks like it does not work where the field name has a gap between the name e.g. [Survey Responses].

The following error occurred:

Unexpected token: 'Responses', expected one of: 'Where', 'While', 'Group', 'Order'

The error occurred here:

final: load Distinct 'Survey Responses' as TableName, 'ResponseKey' as Field Resident Survey >>>>>>Responses<<<<<<

Thanks in advance..

darrell_tobin
Creator
Creator
Author

Hi Omar,

Version that allows spaces in field names..

LET vDocName = DocumentTitle();


for i = 0 to NoOfTables()-1


let vTableName$(i) = TableName($(i));


let nOffield = NoOfFields('$(vTableName$(i))');


for j = 1 to '$(nOffield)'


LET Field$(j) = FieldName(j,'$(vTableName$(i))');


final:


load


Distinct

'$(vTableName$(i))' as TableName,

'$(Field$(j))' as Field


Resident '$(vTableName$(i))';


next j


next i


store final into [lib://GDPR_DATA_LIST/$(vDocName).QVD] (qvd);


Thanks Again..