0

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)

4
  • Which activity are you using here? provide the activity configurations as well? Commented Feb 11 at 13:13
  • Is for copy activity (to send data to remote Postgres) and lookup activities (to get data from Postgres). However I haven't started the pipeline yet, as for now I'm just creating the linked service and testing the connection Commented Feb 11 at 13:20
  • Can you try debugging the pipeline with a lookup activity? let me know whether its giving the same error or expected output? Commented Feb 11 at 16:45
  • There's no pipeline at this point. The connection works fine, but when I add the "schema" parameter, and then click "test connection" I get that error Commented Feb 11 at 19:41

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.