Forum Discussion

ani_informa's avatar
ani_informa
Helper III
5 years ago
Solved

Postgres connection using ODBC

Hi

 

I have connected powerbi desktop to postgres database using ODBC and I am able to connect successfully however when I am expanding database in powerbi desktop and trying to add objects, I am able to see only tables and I am not able see single view. Am I missing something ?

  • Pragati11's avatar
    Pragati11
    5 years ago

    Hi ani_informa ,

     

    What you can do is, while you are connecting with your PostgreSQL DB, select your DSN.

    After that there is an "Advanced Options", expand it and write a query (SELECT * from VIEW;) to retrieve data from your view.

     

    Check if this resolves your issue.

     

    Thanks,

    Pragati

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI ani_informa 

    While connecting to the postgres, the ID you use(Probably yours).

    Does it has access to query the view.

     

    Views might be user created and you probably need permission granted to your ID to use it.

     

    • ani_informa's avatar
      ani_informa
      Helper III

      Hi Pranit

       

      I can access views using the user in dbwear so I have access to views.

    • ani_informa's avatar
      ani_informa
      Helper III

      Thanks for your response !!

       

      I am able to connect to Postgres database using ODBC but I am only able to see tables and I am NOT able to see views available under postgres db.

       

      So what I did

      1. Connect to Postgres database using ODBC option ( Get Data )

      2. Under Navigator option, When I expanded Orders schema, I am able to see only tables and sql views were not visible. so in below snap account, contact, currency are tables

       

       

      • Pragati11's avatar
        Pragati11
        Super User

        Hi ani_informa ,

         

        What you can do is, while you are connecting with your PostgreSQL DB, select your DSN.

        After that there is an "Advanced Options", expand it and write a query (SELECT * from VIEW;) to retrieve data from your view.

         

        Check if this resolves your issue.

         

        Thanks,

        Pragati