0
def get_dw_dim_channel_by_channel(self, channel):
    url = 'db-warehouse-dw/dim_channel?$filter=channel_name eq \'{}\''.format(channel)
    print ("debug: url = {}{}".format(self.host, url))
    return self.get(url, headers=self.headers, auth=self.auth)

Here the value for channel_name is "WDC Kitchen & Bath Center".

The error after executing the above code:

{"error":{"code":null,"message":"The URI is malformed."}}

What must I do to fix it?

khelwood
  • 55,782
  • 14
  • 81
  • 108
Fariya
  • 19
  • 6

1 Answers1

0

The ampersand needs to be percent-encoded. Try to use:

channel = channel.replace("&", "%26")
Achille G
  • 748
  • 6
  • 19