[Python] How to save a json file from Databricks to windows network drive?

Discussão em 'Python' iniciado por Stack, Fevereiro 7, 2025.

  1. Stack

    Stack Membro Participativo

    I am working on a notebook Python in Databricks, I want to write data to a file with this code:

    #write the file
    file_path='/tmp/student_data.json'
    with open(file_path, 'w') as outfile:
    print("writing file to: ",file_path)
    json.dump(student_data, outfile)
    outfile.close()


    Is there any way to write (using the above code) from Databricks to a Windows Network Drive? The goal is to save a json file there...

    Continue reading...

Compartilhe esta Página