Pyspark.read from MariaDB fetches duplicate header rows instead of data
Sometimes adding an alias to subquery confuses PySpark. Try:
.option(&quot;dbtable&quot;, &quot;select fname, lname from SYNTH_EHR_NORM.PATIENTS limit 20&quot;) \