Jupiter Notebook - How to see a code behind a view | Community
Skip to main content
November 24, 2022
Solved

Jupiter Notebook - How to see a code behind a view

  • November 24, 2022
  • 1 reply
  • 859 views

Hi there,

 

there are many views created in Jupiter notebook but i am not able to find out the most recent code if someone overwrites the view.

 

Does someone know the sql command to find out the code behind an existing view?

something like "show view" command in teradata

 

Really appreciate you help

 

Regards

ER

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AtulChavan

Hi @er4 , I'm assuming you want to inspect your view definition which is created inside AEP via Jupyter notebook. This forum is for AEP and it uses PostgreSQL not Teradata. So with that assumption in order to access view definition inside AEP you can use below query which reads view definition from .Postgres 'pg_views' table.

select definition from pg_views where viewname = 'your view name'


      

1 reply

AtulChavan
Community Advisor
AtulChavanCommunity AdvisorAccepted solution
Community Advisor
December 5, 2022

Hi @er4 , I'm assuming you want to inspect your view definition which is created inside AEP via Jupyter notebook. This forum is for AEP and it uses PostgreSQL not Teradata. So with that assumption in order to access view definition inside AEP you can use below query which reads view definition from .Postgres 'pg_views' table.

select definition from pg_views where viewname = 'your view name'


      

ER4Author
February 15, 2023

Hi there

So sorry to reply so in late i was expecting an email to alert someone has replied.

Anyway your solution is what i was looking for and really made my Day

 

thank you very much for your help

Ettore