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

Small getting started guide on writes #311

Merged
merged 3 commits into from
Jan 30, 2024
Merged

Conversation

Fokko
Copy link
Contributor

@Fokko Fokko commented Jan 27, 2024

Just to get people started!

@Fokko Fokko added this to the PyIceberg 0.6.0 release milestone Jan 27, 2024
@Fokko Fokko force-pushed the fd-getting-started branch from 6c7d6e3 to 683b700 Compare January 27, 2024 19:36
Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

Thanks for the great tutorial! @Fokko. LGTM! Just have one comment about the usage of internal method


with table.update_schema() as update_schema:
# Blocked by https://github.com/apache/iceberg-python/pull/305
update_schema.union_by_name(Catalog._convert_schema_if_needed(df.schema))
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we use add_column instead?

update_schema.add_column("tip_per_mile", DoubleType())

I think it might be better not to use internal methods in the tutorial.

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 fully agree. I should have been more explicit in the comment above. Once #305 is in, we can update the union_by_name to also accept pa.Schema. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the context! Yes, I think it's a good idea. Let's do it after #305 😄

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 should have marked it as a draft. It is ready now @HonahX :)

Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @Fokko. Sorry for being late here.

@HonahX HonahX merged commit 2836c4a into apache:main Jan 30, 2024
6 checks passed
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.

2 participants