Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @micheloh,

From what we’ve seen, this is currently a limitation of Lakehouse Federation foreign catalog creation rather than a problem with the connection itself.

The PostgreSQL connection can succeed, but the database value used when creating the foreign catalog is still validated, and names containing special characters such as : can trigger the [DATA_SOURCE_OPTION_CONTAINS_INVALID_CHARACTERS] error. Unfortunately, quoting or escaping the database name does not currently get around that validation.

So if the source database name cannot be changed, there isn’t a supported way today to create a foreign catalog directly against that database name.

The practical workaround for now is to access the PostgreSQL database through JDBC from a notebook or job instead of using a foreign catalog.

Sorry, we don’t have a better answer here.

FYI. There was a similar question in the past, too. 

If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***

View solution in original post