Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Could you please let me know if we can extract the count of a table in a variable post left join?
details in below :
A:
Load
*
From [QVD_A]qvd;
Left Join
B:
Load
*
From [QVD_B]qvd;
//Count after the b joining A,
I tried Let vVarA = noOfRows(A);
TRACE $(A); but this is not working
Left Join
C:
Load
*
From [QVD_C]qvd;
//Count after the C joining A..
Left Join
😧
Load
*
From [QVD_D]qvd;
//Will get final Count of all the tables once reload finish.
Hi,
can change the variable as below:
Let vVarA = NoOfRows('Tablename');
** please note '' is missing in your table name
now if we use the variable in front end then we can get the total count
=$(vVarA)
Please note if we do left join, then only the related information from Table A will be loaded from rest of the tables.
And since we are concatenating with multiple tables the count in variable will reflect total rows from all the tables
Hi,
can change the variable as below:
Let vVarA = NoOfRows('Tablename');
** please note '' is missing in your table name
now if we use the variable in front end then we can get the total count
=$(vVarA)
Please note if we do left join, then only the related information from Table A will be loaded from rest of the tables.
And since we are concatenating with multiple tables the count in variable will reflect total rows from all the tables
The table name needs quotes
...NoOfRows('A')
Hi Punit, Post your join logic, take a resident of table create a metadata table. Example: LOAD 'A' as TableName, NoOfRows('A') as TableRows Resident 'A'; Depending on your requirement you can use this table as it is or pull info from it & store it in variable.
Hi vardhancse
Tried with both single qoute an double quote but this is not working.
This worked Thank you
Hi jontydkpi
Tried with both single qoute an double quote in table name, but is not working for me.
This worked Thank you
Good that you were able to get the solution.
Please mark is as correct answer so that it might be helpful to others