Can I use persist_for in connecting 2 derived table?

Context: 

I am currently working on 2 derived tables that uses templated filters and parameters. Now, I saw that there's a cascading derived table strategy where one derived table is dependent on the other one. Basically, I want to use the result of Table A and reference it to Table B derived table logic. 

I was using persist_for for both derived table. However, whenever I ran Table A then Table B, I get errors in Table B. 

Show More
The Google BigQuery Standard SQL database encountered an error while running this query.

I tried to remove the templated filters in Table A (which is not ideal for my use case but for testing purposes), then retain the templated filters that I'm using in Table B. Then persist_for worked perfectly. I was able to run Table A and Table B. 

 

Now, I want to know why I'm getting an error when both table is using templated filter when adding persist_for? Is there a way that I can achieve my goal of using the result of Table A in Table B while both derived table is using templated filters and parameters? 

 

0 0 106
0 REPLIES 0
Top Labels in this Space