Skip to content

Conversation

@german-typedef
Copy link
Contributor

@german-typedef german-typedef commented Jul 17, 2025

TL;DR

Added support for specifying a location when saving DataFrames as tables using a cloud session.

What changed?

  • Added location to the create_catalog method, this allows us to specify the root level for catalogs.

Copy link
Contributor Author

german-typedef commented Jul 17, 2025

@german-typedef german-typedef marked this pull request as ready for review July 17, 2025 20:59
@german-typedef german-typedef changed the base branch from 07-17-fix_make_catalog_use_sc_method_to_implement_does_table_exist to graphite-base/91 July 18, 2025 17:46
@german-typedef german-typedef force-pushed the 07-17-fix_use_the_cloud_catalog_when_doing_save_as_table_in_a_cloud_session branch from 9d19ab6 to eac9275 Compare July 18, 2025 17:55
@german-typedef german-typedef changed the base branch from graphite-base/91 to 07-17-fix_make_catalog_use_sc_method_to_implement_does_table_exist July 18, 2025 17:55
@german-typedef german-typedef changed the base branch from 07-17-fix_make_catalog_use_sc_method_to_implement_does_table_exist to graphite-base/91 July 18, 2025 17:57
@german-typedef german-typedef force-pushed the 07-17-fix_use_the_cloud_catalog_when_doing_save_as_table_in_a_cloud_session branch from eac9275 to 796a233 Compare July 18, 2025 17:57
@graphite-app graphite-app bot changed the base branch from graphite-base/91 to main July 18, 2025 17:57
@german-typedef german-typedef force-pushed the 07-17-fix_use_the_cloud_catalog_when_doing_save_as_table_in_a_cloud_session branch from 796a233 to 8397d8c Compare July 18, 2025 17:57
Copy link
Contributor

@bcallender bcallender left a comment

Choose a reason for hiding this comment

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

looks fine, just a few minor nits

@german-typedef german-typedef force-pushed the 07-17-fix_use_the_cloud_catalog_when_doing_save_as_table_in_a_cloud_session branch from 8397d8c to 293ea49 Compare July 22, 2025 23:47
Copy link

@rohitrastogi rohitrastogi left a comment

Choose a reason for hiding this comment

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

needs one more round of reviews

@german-typedef german-typedef force-pushed the 07-17-fix_use_the_cloud_catalog_when_doing_save_as_table_in_a_cloud_session branch 2 times, most recently from 7646651 to ec78306 Compare July 28, 2025 00:12
@german-typedef german-typedef force-pushed the 07-17-fix_use_the_cloud_catalog_when_doing_save_as_table_in_a_cloud_session branch 2 times, most recently from f040c35 to b80ea4c Compare July 28, 2025 00:30
@german-typedef german-typedef force-pushed the 07-17-fix_use_the_cloud_catalog_when_doing_save_as_table_in_a_cloud_session branch from b80ea4c to fdbfa46 Compare July 28, 2025 16:55
@german-typedef german-typedef force-pushed the 07-17-fix_use_the_cloud_catalog_when_doing_save_as_table_in_a_cloud_session branch 3 times, most recently from b2b040a to 6b9a23e Compare August 15, 2025 17:08
@german-typedef
Copy link
Contributor Author

My bad, this was out for a while. I've addressed all the comments.

@german-typedef german-typedef force-pushed the 07-17-fix_use_the_cloud_catalog_when_doing_save_as_table_in_a_cloud_session branch from 6b9a23e to f451b4f Compare August 19, 2025 16:59
@german-typedef german-typedef force-pushed the 07-17-fix_use_the_cloud_catalog_when_doing_save_as_table_in_a_cloud_session branch from 4260ef1 to 222310d Compare August 19, 2025 18:20
catalog_name: str
catalog_id: UUID

CLOUD_SUPPORTED_SCHEMES = ["s3"]
Copy link
Contributor

Choose a reason for hiding this comment

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

we'll have to adjust this in #157

return schema_type

@staticmethod
def _get_table_location_from_table_identifier(table_identifier: TableIdentifier) -> str:
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't the location be based on the base location in the catalog? if the user provides a bucket or prefix as the catalog's base location, all of the paths for dbs and tables should be relative to that base location, i would think.

f"2) Use a different table name.")
elif table_exists and query_metrics:
# trunk-ignore-begin(bandit/B101)
assert mode == "ignore", "only mode to fulfill this invariant is ignore."
Copy link
Contributor

Choose a reason for hiding this comment

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

particular reason to choose assert here and not raise an exception?

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.

4 participants