Monday, May 02, 2022

Azure Data Architect Interview Questions

Py4JJavaError : An error occurred while calling o536.json. : Operation failed: "This request is not authorized to perform this operation.", 403, HEAD, https://storageaccount.dfs.core.windows.net/container/?upn=false&action=getAccessControl&timeout=90

Py4JJavaError : An error occurred while calling o536.json. : Operation failed: "This request is not authorized to perform this operation.", 403, HEAD, https://storageaccount.dfs.core.windows.net/container/?upn=false&action=getAccessControl&timeout=90

If we try to access data from ADLS gen2 without the "Storage Blob Data Contributor" role on the storage account, they will receive the error message: Operation failed: "This request is not authorized to perform this operation.",403.

Once the storage account is created, select Access control (IAM) from the left navigation. Then assign the following roles or ensure they are already assigned. Assign yourself to the Storage Blob Data Owner role on the Storage Account. 

LINQ to Entities does not recognize the method 'System.String GetUserId(System.Security.Principal.IIdentity)' method, and this method cannot be translated into a store expression. Source=EntityFramework

 This exception occurs because LINQ to SQL query internally builds an SQL query and executes it on the database directly and hence when one tries to use the ToString method which is a .Net data type conversion method and cannot be used for an SQL Query.

 Solution to this problem is to use the StringConvert method of the SqlFunctions class for converting the Integer value to String.

How can I clean up the SSISDB?


 
Below are the Queries to clean SSIS DB. These are the internal tables that can be deleted.
 
USE SSISDB
    GO
    DELETE FROM [internal].[executions] 
    GO
    DELETE FROM [internal].[executable_statistics]
    GO
    DELETE FROM [internal].[execution_component_phases]
    GO
    DELETE FROM [internal].[execution_data_statistics] 
    GO
    DELETE FROM [internal].[execution_data_taps] 
    GO
    DELETE FROM [internal].[execution_parameter_values]
    GO
    DELETE FROM [internal].[execution_property_override_values]
    GO
    DELETE FROM [internal].[extended_operation_info]
    GO
    DELETE FROM [internal].[operation_messages]
    GO
    DELETE FROM [internal].[event_messages]
    GO
    DELETE FROM [internal].[event_message_context]
    GO
    DELETE FROM [internal].[operation_os_sys_info]
    GO
    DELETE FROM [internal].[operation_permissions]
    GO
    DELETE FROM [internal].[validations]
    GO