Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

PostgreSQL Data Source with number in table name not recognized

Hi everyone,

 

I would like to build a Power BI report with a data source that has numbers as their name e.g. 25hourshotel

 

We have a database host selector and a database selector, so that we will only havbve to write the host and database in these fields and it will be automatically inserted in all queries, so thats what you see in the first screenshot. 

In the second screenshot i tried to fill in the database name but the same error occurs.

Any ideas on how I can fix that?

 

2021-01-27 10_49_53-MultiChannel_Reporting_25hours_hotel - Power Query Editor.png2021-01-27 10_48_36-MultiChannel_Reporting_25hours_hotel - Power Query Editor.png

Thanks for your help!

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

PostgreSQL table names should not start with a number.

If you have to work with tables that do, you can wrap the table name in double quotes

PostgreSQL SQL Syntax and Use | PostgreSQL Naming Rules | InformIT

Try this for your SELECT

"SELECT * from ""25hourshotel.25hourshotel.overview"""

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

2 REPLIES 2
PhilipTreacy
Super User
Super User

Hi @Anonymous 

PostgreSQL table names should not start with a number.

If you have to work with tables that do, you can wrap the table name in double quotes

PostgreSQL SQL Syntax and Use | PostgreSQL Naming Rules | InformIT

Try this for your SELECT

"SELECT * from ""25hourshotel.25hourshotel.overview"""

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi Phil,

 

unfortunately I didn't create the data source and had to work with the number in the name. Anyway, I tried the double and triple quotes and they solved my problem, thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.