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

Connection of two tables

Good day!

In load script i load two tables:

Directory;

FOR Each File in filelist ('C:\ProgramData\QlikTech\QlikViewServer\Audit__*.log')

Data_from_Audit_files:

  LOAD [Server Started],

      Timestamp,

      Capitalize(Document) as Document,

    Type,

    User,

      Message,

     SheetCode,

      ObjectCode

  FROM

  '$(File)'

  (txt, utf8, embedded labels, delimiter is '\t', msq);

NEXT File;

Directory;

Info_Sheets:

LOAD Capitalize(FileName) as Document,

     Sheet,

     SheetID as SheetCode,

     SheetName,

     ObjectId as ObjectCode,

     Label as ObName

        

FROM

[for Audit\Sheets1.xlsx]

(ooxml, embedded labels, table is Sheet1);

Loading is successful. But when i choose ObName, i don't see any data in fields Type,User, Message,Timestamp...

What i do wrong ? How i must connect these tables?

p.s. Structure of connection in attached file.

Thanks

6 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Data_from_Audit_files:

  LOAD [Server Started],

      Timestamp,

      Capitalize(Document) as Document,

    Type,

    User,

      Message,

     SheetCode,

      ObjectCode

  FROM Audit__*.log

  (txt, utf8, embedded labels, delimiter is '\t', msq);

Directory;

Info_Sheets:

LOAD Capitalize(FileName) as Document,

     Sheet,

     SheetID as SheetCode,

     SheetName,

     ObjectId as ObjectCode,

     Label as ObName       

FROM

[for Audit\Sheets1.xlsx]

(ooxml, embedded labels, table is Sheet1);

Check in data whether you have matching values in both the tables, for the fields Document,  SheetCode and      ObjectCode

Hope this helps you.

Regards,

Jagan.

Anonymous
Not applicable
Author

Tell me please, what's  the difference between my code and yours ?

jagan
Luminary Alumni
Luminary Alumni

Hi,

Is it working?  I just used wild card for filenames to avoid FOR loop, this is what I did.

Check your data you have any matching records?

Regards,

Jagan.

Anonymous
Not applicable
Author

there are any matching records...(((

jagan
Luminary Alumni
Luminary Alumni

Hi,

Is there are any matching records in Sheets1.xlsx and Audit__*.log file?  that is any records with similar values Same Document, SheetCode and ObjectCode?

Regards,

jagan.

Not applicable
Author

syntactic key activated(Duplicate codes i.e.SheetCode,ObjectCode)

please use one common key for combination