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

Add printAthenaCreateTable() support #28

Merged
merged 1 commit into from
Jun 20, 2020

Conversation

nsphung
Copy link
Contributor

@nsphung nsphung commented Jun 19, 2020

Add printAthenaCreateTable() support #23

It's about the same as in spark-daria.

@nsphung nsphung changed the title Add printAthenaCreateTable() support #23 Add printAthenaCreateTable() support Jun 19, 2020
def to_list_of_dictionaries(df):
return list(map(lambda r: r.asDict(), df.collect()))


def print_athena_create_table(df, athena_table_name, s3location):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be easier to return a str and then allow the developer to print it or use it with any athena connector?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can but I was trying to stay connected with the Scala implementation in spark-daria def printAthenaCreateTable(df: DataFrame, athenaTableName: String, s3location: String): Unit

Should I change it ? If so, what kind of result/format string you expect ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could have the athena_create_table that returns the str and then we keep the print_athena_create_table to stay connected with the scala implementation?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afranzi - I like that idea. I'll merge this in, but think the athena_create_table would be a good addition too!

@MrPowers MrPowers merged commit 0f31220 into MrPowers:master Jun 20, 2020
@MrPowers
Copy link
Owner

@nsphung - thanks for the contribution! Keep them coming ;)

@nsphung nsphung deleted the printAthenaCreateTable branch June 20, 2020 14:59
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

Successfully merging this pull request may close these issues.

None yet

3 participants