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?

asked 3 months ago110 views
2 Answers
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
EXPERT
answered 3 months ago
profile pictureAWS
EXPERT
reviewed 3 months ago
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
EXPERT
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions