John Liu Blog

Every drop counts

QGIS get data from API

To retrieve data via API call in QGIS, we can utilise Python code to make the API call. Launch QGIS, open Plugins -> Python Console. In Python Console, click Show Editor icon to open editor. In editor window, make new script or open the Python script and execute the Python script. Following is an example Python script to make API call. ##If keyring is not installed, run the following in QGIS Python console to install keyring.

Run container in Azure VM

We can run container (using Docker Desktop) inside Azure VM. Following are some considerations for the setup. Not all Azure VM support container. D4_v5 and above VM support nested virtulization. When creating the Zure VM, ensure the security type on the Basic tab is set to “Standard”, not “Trusted Launch”. Trusted Launch does not support Nested Virtualization. Azure Portal default to Trusted Launch. After VM is created, turn Windows featur “Windows Hypervisor Platform” on.

Hyper-v: Connect Host and Guest

To have network connectivity between Hyper-v host and guest, do the following steps: In Hyper-v Manager, click on Virtual Switch Manager, and create a new (if not already) Internal virtual switch. Enable VLAN ID. In the VM guest setting, configure a Network Adapter to use this Internal virtual switch. In host computer, in Control Panel, configure IPV4 address for the Internal netowrk created above step 1. No default gateway setting required.

SQL Playground Setup

This post descript the steps to setup a SQL Server failover cluster playground environment. Create a base server template VM of Windows Server 2022, with features .Net Framwork 3.5.1, Failover Clustering, and Multipath I/O installed via the Server Manager. Assign 4 Network Adapters, with the first adapter using NAT. Once the template server setup is done, run sysprep from cmd. The options for sysprep should be set to “Enter System Out-of-Box Experience (OOBE)” and the checkbox for Generalize should be checked, and set Shutdown option as Shutdown.

Power BI Embed Report in Application

This is a testing embed report with hidden filter: To hide the filters pan, clck on the eye icon aside the Filters header. The eye icon to hide individual filter doesn’t appear to be working in embed mode, until the entire filter pan is hidden. Following is the url with filter format URL?filter=Table/Field eq 'filter value' URL?filter=Table/Field in ('value1', 'value2') With ifram embeding, you will need to use &$ instead of ?