where does this code run in interactive glue sessions

0

If I run this code in glue on a glue notebook / interactive session

import os
print(os.getcwd())

Where does it run exactly?

gefragt vor 3 Monaten119 Aufrufe
2 Antworten
0

When you run the provided code in an AWS Glue notebook or interactive session, it runs within the AWS Glue environment.Regardless of where the code is executed (whether in a notebook or interactive session), the os.getcwd() function returns the current working directory within the Glue environment. This directory is typically a temporary or transient location provided by Glue for storing intermediate files, logs, and outputs generated during the execution of ETL jobs or scripts.

profile picture
EXPERTE
beantwortet vor 3 Monaten
profile pictureAWS
EXPERTE
überprüft vor 3 Monaten
0

To be specific, that code runs on the driver of the Glue cluster created by the interactive session, so it points to /tmp on that server
If instead you ran %system pwd, it would execute the command locally and it would tell you the current path of the Jupyter process

profile pictureAWS
EXPERTE
beantwortet vor 3 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen