"Schema" property not found in Postgres Connector

Hernan 20 Reputation points
2025-02-11T14:19:40.3+00:00

I created a linked service in Azure Data Factory, it points to a remote Postgres database. The connection is working. But when I specify a particular schema under the title "Additional connection properties", I get:

The value of the property 'schema' is invalid: 'Couldn't set schema Parameter name: schema'. Couldn't set schema Parameter name: schema The given key was not present in the dictionary.

This is the place where I set that property:

User's image

It seems specifying "schema" in "additional connection properties" is the only way to set an schema

I've read online that Postgres connections has a property "search_path", that is intended for the same thing, but is not possible to add properties manually, that is, I can only set properties showed in the list

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ganesh Gurram 7,295 Reputation points Microsoft External Staff Moderator
    2025-02-12T21:53:49.6333333+00:00

    @Hernan - I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer

    Ask: "Schema" property not found in Postgres Connector

    Solution: Well, I've just realized I can set a default schema for the user with:

    ALTER USER <my db> SET SEARCH_PATH TO <my schema>

    I'll take this alternate solution, thanks.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information. 

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue. 

     

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Amira Bedhiafi 33,071 Reputation points Volunteer Moderator
    2025-02-11T14:40:52.2633333+00:00

    I think that PostgreSQL connector in ADF does not directly support setting the schema through the "Schema" property in the additional connection properties instead it uses the search_path parameter to specify the schema.

    You can set the search_path directly in your SQL commands within the data pipeline. For example, at the beginning of your query, you can include:

    SET search_path TO myschema;
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.