Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How are temporary files created in S3 when calling the driver? #455

Open
peidaqi opened this issue Oct 14, 2020 · 1 comment
Open

How are temporary files created in S3 when calling the driver? #455

peidaqi opened this issue Oct 14, 2020 · 1 comment

Comments

@peidaqi
Copy link

peidaqi commented Oct 14, 2020

Can someone here explain how the temporary files are created in S3 when calling the driver? It seems:

  1. When calling spark.read, a temporary file folder will be created with a file of length 1
    When calling any functions to evaluate the returned Dataframe, another temporary file folder will be created with the actual data
    What is the file created in first step?
  2. The temporary files created seems to be in plain text without schema. Is there anyway to make that parquet or export parquet files with schema?

Thanks!

@peidaqi
Copy link
Author

peidaqi commented Oct 20, 2020

I figured out. It's actually a sliced CSV by default and read using RedshiftInputFormat class.

But the question still holds - since Redshift now supports UNLOAD directly into parquet (https://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html), can we just use it instead to avoid the many escaping problems with CSV?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant