Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

View SQL queries

Hello

I want to check how my QV import script connects to my DB, so I'd like to see which query is being sent to my SQL Server.

I checked my log file, but it only shows the QV queries, and it's not what I want

Does anyone know how to do this?

Regards

1 Solution

Accepted Solutions
jaimeaguilar
Partner
Partner

Hi,

sending a Replace SQL... in a partial reload will drop the entire existing table and replace it with data extracted from this query. If you want that the statement has effect just during partial reload use the ONLY qualifier:

Replace only SQL Select *...

In the case of your example, the replace statement does nothing in the SQL side, it has effect just in the qlikview side because depending on how you structure your code you can use a replace statement for concatenating new records to an existing table.

So answering your question, the replace statement means nothing to your database, but instead it tells QlikView how this data should be treated (partial/complete reload).

Besides, In my opinion this replace statement is not the optimal solution for handling incremental load. For a more complex and robust solution, search for "Using QVDs for incremental load" in the QlikView help (F1). There you'll find examples of how to handle incremental load using qvds depending on your need (just add, replace, or updating records),

regards

View solution in original post

4 Replies
jaimeaguilar
Partner
Partner

Hi,

assuming that your working with 3-4 levels of data tiers (using more than 1 qvw to make the etl process), then in the extraction qvw you should have something like this in your script:

Table:

Load Field1,

        Field2,

        Field3;

SQL Select * from DB.User.Table;

The part in bold is what is actually sent and executed in the Database. The Load part is what QlikView does after receiving the result query from DB,

regards

Not applicable
Author

Hi Jaime

I am implementing partial reload in my script. As my DB is huge, I want to check if all results are brought or just the ones I need.

For such, I want to check which query is sent to my SQL Server when I have the following script:

ODBC CONNECT TO test;

replace SQL SELECT *

FROM DB.dbo.Table;

Any ideas?

jaimeaguilar
Partner
Partner

Hi,

sending a Replace SQL... in a partial reload will drop the entire existing table and replace it with data extracted from this query. If you want that the statement has effect just during partial reload use the ONLY qualifier:

Replace only SQL Select *...

In the case of your example, the replace statement does nothing in the SQL side, it has effect just in the qlikview side because depending on how you structure your code you can use a replace statement for concatenating new records to an existing table.

So answering your question, the replace statement means nothing to your database, but instead it tells QlikView how this data should be treated (partial/complete reload).

Besides, In my opinion this replace statement is not the optimal solution for handling incremental load. For a more complex and robust solution, search for "Using QVDs for incremental load" in the QlikView help (F1). There you'll find examples of how to handle incremental load using qvds depending on your need (just add, replace, or updating records),

regards

View solution in original post

Not applicable
Author

Thanks, it was very clarifying