Forum Discussion

spartan27244's avatar
spartan27244
Resolver I
1 year ago
Solved

SQL Database (preview)

when using the data warehouse feature of Fabric in PySpark I can connect to the data warehouse and run a query as so... df = spark.read.option(Constants.DatabaseName, DataWarehouse).synapsesql(SQL)...
  • Ranganath_M's avatar
    1 year ago

    Data querying within the SQL database (preview) from a notebook is feasible only when the default language of the notebook is set to T-SQL. Upon switching the language to PySpark or Python, querying capabilities are limited to the Lakehouse, and not the databases.

     

    So currently, to execute any PySpark notebooks on the SQL database data, it is necessary to first ingest the data from the database into the Lakehouse using pipelines. Subsequently, PySpark notebooks can be run on the ingested data