John Liu Blog

Every drop counts

Grant user access to Azure MSDN subscription

For old MSA-originated MSDN / Visual Studio subscriptions, we might not be able to grant user access to the subscription. The subscription is linked to your personal account, and there is a portal-side RBAC picker defect caused this issue. To grant access to the subscription to other users created in your directory, using following Azure CLI (Cloud Shell) and grant the user contributor role. az role assignment create \ --assignee-object-id <USER_OBJECT_ID> \ --assignee-principal-type User \ --role Contributor \ --scope /subscriptions/<SUBSCRIPTION_ID> Subsitute <USER_OBJECT_ID> with the Object ID for the user in Microsoft Entra ID, and <SUBSCRIPTION_ID> for the subscription in question.

Fabric Mirrored SQL Server Data Gateway Issue

When create mirrored SQL server in Fabric to on-premises SQL database, we will need to use On-Premises Data Gateway. We might encounter issue with Use Encrypted Connection option with self-signed certificate. To resolve issue with Use Encrypted Connection, try following solutions: Solution 1: Add your SQL Server to the “Trusted Servers” List: There is a “hidden” configuration in the On-premises Data Gateway that allows you to bypass certificate validation for specific servers.

Generate Self-signed Certificate

There are time we might need a certificate, for example, to set up Azure Service Principle without using secret. We can use PowerShell or OpenSSL to generate self-signed certificate. # 1. Config $certname = "SQLDataExportCert" # password for secure the private key file # use single quote to quote the string, to handle special character like $ $pwdstring = 'YourSecurePassword' # Define the expiration date (e.g., 5 years from today) $expiryDate = (Get-Date).

Fabric KQL Database

In Fabric KQL database, we can copy the Query URI link and using it (without the https://) as the Server Name in SSMS and use Microsoft Entra MFA authentication to connect to the KQL database and query the data using T-SQL syntax. Alternative, we can using the T-SQL syntax in the Fabric UI query tab but add the T-SQL comment line “–” as the first line of the query. That will indicate to the engine that the query syntax is T-SQL instead of KQL.

SQL Generate Parquet File

There are several ways to generate Parquet file from SQL. PolyBase can generate Parquet file to S3 or Azure but we can’t specify the file name generated. Refer to SQL Export to parquet file. Azure Data Factory (ADF) or Fabric pipe line Copy Activity can generate Parquet file with specific file name. Python script can generate Parquet file with specific name. Following are examples using Python script in SQL to generate the Parquet file.