Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
Highlighted
Cmurphy55
New Contributor II

How to evaluate directory FilePath in a STORE statement?

I am trying to improve my Company's Data lineage, but I noticed that we currently have a large number of QVWs that use DIRECTORY statements in order to define the base FilePaths that are used in FROM and STORE statements.

 

The way that the Governance Dashboard seems to work is that when this is done, the XML Metadata Lineageinfo tag assigns target QVD FilePaths with just the QVD FileName, which therefore will not then implicitly JOIN onto any Datafile row that uses said QVD as a data source.

 

Is there any way to force QlikView to evaluate the full implicit DIRECTORY path (concatenated) with the QVD FileName? Or is the only alternative to employ variablization of that base FilePath and replace all DIRECTORY uses in our QVWs?

1 Solution

Accepted Solutions
Cmurphy55
New Contributor II

Re: How to evaluate directory FilePath in a STORE statement?

After opening up a ticket with QV Support, I received the following feedback from their Governance Dashboard R&D Team:

Unfortunately there is not a way around this, Generally it is not recommended to use “Directory;” and relative paths, rather use variables loaded externally for file paths. But that is outside the scope of the QV Governance Dashboard.

So therefore you can ONLY ever use Dollar Expansion variables for evaluating base file paths.

3 Replies
Partner
Partner

Re: How to evaluate directory FilePath in a STORE statement?

You mean...

SET vPath = "C:\Folder1\Folder2";

Table1:
Load
field1,
field2
From $(vPath)\file01.qvd(qvd);

or

STORE Table1 into $(vPath)Table1.qvd(qvd);

??
Cmurphy55
New Contributor II

Re: How to evaluate directory FilePath in a STORE statement?

For instance, in a transformation QVW, we might establish a directory path at the beginning of the script, like so: 

DIRECTORY $(vBaseFilePath)\FolderOne\FolderTwo;

 

After performing transformations on the source data being brought in, we then store out to QVDs which implicitly evaluates the filepath out to that directory, as seen below:

 

STORE

    [TableName]

INTO

    [TransformQVDName.qvd] (qvd);

 

However, for that example QVW, when it is read by the Governance Dashboard's lineage tab, it evaluates the QVW's <LineageInfo> XML Metadata tag (technically the <discriminator> sub tag within the LineageInfo tag). That Target QVD is given a datafile.filepath of "store - [TransformQVDName.qvd] (qvd)" whereas the data SOURCE QVD that is being brought in in the FROM statement in the script gets evaluated as the full path "\\abc\def\ghi\jklmnop.qvd". 

The issue we have is that what is essentially a fileNAME is being thrown into the filePATH field, and any QVWs that use the TRANSFORM QVD outputted from it aren't able to make the join onto it, so the full lineage is not visible.

Cmurphy55
New Contributor II

Re: How to evaluate directory FilePath in a STORE statement?

After opening up a ticket with QV Support, I received the following feedback from their Governance Dashboard R&D Team:

Unfortunately there is not a way around this, Generally it is not recommended to use “Directory;” and relative paths, rather use variables loaded externally for file paths. But that is outside the scope of the QV Governance Dashboard.

So therefore you can ONLY ever use Dollar Expansion variables for evaluating base file paths.