Expand my Community achievements bar.

SOLVED

Jupiter Notebook - How to see a code behind a view

Avatar

Level 1
Level 1

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

1 Accepted Solution

Avatar

Correct answer by
Level 4

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'


      

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

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'


      

Avatar

Level 1
Level 1

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