Search code examples
azureazure-data-factorylinked-service

"Schema" property not found in Postgres Connector


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:

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

Note
I need to set an schema because all code that will run in the pipelines are not prefixed with schemas (this is by design, this allows us to send data to different schemas with the same code/pipelines)


Solution

  • Well, I found another way to solve it

    Since there is a specific user for this connection, I found that I can set the schema "at user level" with:

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

    With this, connections made through my linkedservice with that specific user, will be set to the desired schema transparently