0

I've written a blob storage trigger function and in it I'm receiving an error

Cannot drop the table 'TABLE_NAME', because it does not exist or you do not have permission.

Here's the code that the error is originating from.

data = pd.read_sql('SELECT * FROM ['+blob_name_file+']', conn)
df2 = pd.concat([data,processed_df])
df2.to_sql(blob_name_file, conn, if_exists = 'replace', index=False)

This code runs when there's a new column that needs to be appended to the table. It tries to drop the table and create a new one, although, it seems my blob storage trigger function doesn't have permission to drop tables from the database. I've allowed Azure services and resources to access my database in its firewall, but what else can I do to make sure my trigger has the permissions it needs?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
BlakeB9
  • 345
  • 1
  • 3
  • 13
  • 1
    You have to look into Managed Identity direction. Create managed identity for Azure function and also allow that identity to specific permission in DB. – dotnetstep Mar 14 '22 at 16:34
  • 1
    @dotnetstep thank you for the reply. It sent me in the right direction. – BlakeB9 Mar 15 '22 at 15:54

0 Answers0