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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Regarding Generic Load

Hello Friends,

Thanks for your help in advance.

I am using a generic load to fetch some data but getting error as “Blank field name not allowed”. I have attached the error screenshot and script below for your reference,


//LOADING DATA FROM A WEBFILE USING QVSOURCE WEBCONNECTOR

member:

LOAD

name,

    value,

    [value/i4] as i4

FROM [http://localhost:5555/QVSource/Webconnector....,];

Resident_Load:

Generic load

name as G_Name,

value as G_Value,

i4 as G_i4

resident member;


kindly let me know your opinion for the same

Kind regards,

Kiru

3 Replies
Not applicable
Author

Hi Kiru,

The 2nd field in the generic load statement will be used to create the new column names.

The error is raised because this field "value" contains blank values and a column cannot be created out of it.

I guess you can resume running the script but these records with blank values will just not show up.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Please check sample script for Generic load

GenericLoad:

GENERIC LOAD * INLINE [  

    Key, Attribute, Value

    Ball, Color, 4

    Ball, Diameter, 3

    Box, Height, 4

    Box, Length, 3

    Box, Weight, 4

    Box, Width, 3

    Dog, Color, 4

    Dog, Weight, 3

    Rod, Diameter, 4

    Rod, Length, 3

];

CombinedGenericTable:

   LOAD DISTINCT Key

   INLINE [  

    Key, Attribute, Value

    Ball, Color, 4

    Ball, Diameter, 3

    Box, Height, 4

    Box, Length, 3

    Box, Weight, 4

    Box, Width, 3

    Dog, Color, 4

    Dog, Weight, 3

    Rod, Diameter, 4

    Rod, Length, 3

];

FOR i = NoOfTables()-1 to 0 STEP -1

  LET vTable=TableName($(i));

  IF WildMatch('$(vTable)', 'GenericLoad.*') THEN

   LEFT JOIN ([CombinedGenericTable]) LOAD * RESIDENT [$(vTable)];

   DROP TABLE [$(vTable)];

  ENDIF

NEXT i

If you have any blank or null values in Column 2 then you will get this error, because all second column values are converted into Columns, if there is a blank value then it not possible to create a column.  Thay is why you are getting this error.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Thanks so much for your reply friends and I sincerely appreciate your time.

I am kind of not sure that I can use generic load to achieve my result or I can also do any other strategy as well;

Let me explain my scenario kindly let me know your suggestions.

I have a source table named: Contact with 3 fields in a webpage

Field1: FirstName

Scott,

Marry

Field2: LastName

Hasty,

Jones

Field3: Id

1,

2

I am using QVSource Web-connector to request a query and the response I am getting in XML is in the form of (name, value) pair as below;

Id

1,

2

Name:

FirstName

LastName

Value:

Scott

Marry

Hasty,

Jones

It is not showing any relations with Id; Id is always grey when I click some names.

Now I need to convert this as like my original table in QlikView to achieve my result.

I have attached the application for your reference

Kindly let me know your suggestions


Kiru