Forum Discussion

FrancisRomstad's avatar
FrancisRomstad
Copper Contributor
Jan 25, 2022
Solved

Newbe, exporting full result from Azure Synapse Notebook cell

Hi,    I have had success querying data from Customer Insights in Azure Synapse. I have a notebook attached to a sparkpool with language Spark Sql. Now I have come to a point where I want to get t...
  • FrancisRomstad's avatar
    Jan 27, 2022

    Solved it by using PySpark

     

    Added a linked Azure Blob Storage and used this with pandas

     

    %%pyspark
    
    import pandas
    df = spark.sql("SELECT string(birthdate) FROM CIDataBase.Customer")
    data = df.toPandas()
    data.to_csv('abfss://synapseexport/test.csv', storage_options = {'linked_service' :    'AzureDataLakeStorage1Output'})

     

Resources