Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List of field names of a table

Hi all,

I'm getting an empty table from Hive, only with the field names.

I need to create a list with all the field names.

I want to use a loop.

and QvdNoOfFields function.

can somebody assist?

regards,

Boris

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Hi.

QvdNoOfFields - returns the number of fields for the QVD file.

The usage could be something like this:

Let fieldsCount =   QvdNoOfFields($(fileName))

LOAD

     QvdFieldName($(fileName), rowno()) as Fields

Autogenerate($(fieldsCount));

If you get the empty table with a query, you can use 'CrossTable' functionality of QlikView or 'Transformation step' to transpose the table.

View solution in original post

2 Replies
whiteline
Master II
Master II

Hi.

QvdNoOfFields - returns the number of fields for the QVD file.

The usage could be something like this:

Let fieldsCount =   QvdNoOfFields($(fileName))

LOAD

     QvdFieldName($(fileName), rowno()) as Fields

Autogenerate($(fieldsCount));

If you get the empty table with a query, you can use 'CrossTable' functionality of QlikView or 'Transformation step' to transpose the table.

Sokkorn
Master
Master

Hi Boris,

You may try this with ListBox

1. Create a list box to list all table name. Right click on blank sheet -> New Sheet Object -> List Box -> Click on drop down list then select on <Expression> (last item at the bottom) -> Use $Table in expression

2. Create another list box to list all field name. Right click on blank sheet -> New Sheet Object -> List Box -> Click on drop down list then select on <Expression> (last item at the bottom) -> Use $Field in expression

After that you can select Table name and get associate field in your next list box

Untitled.png

Regards,

Sokkorn