Proposed changes to GlueTable in mojap-metadata #138
Replies: 9 comments 17 replies
-
You can check for the existence of "glue_table_properties" in the metadata using |
Beta Was this translation helpful? Give feedback.
-
I'm a big fan of this, think that once its implemented we can make use of it in a few different places! Question - have you thought about how to handle different data-types?The properties stored in the glue data catalog are always strings but we are likely to need to pass them as/convert them to different or more structured types (ints/lists etc.). We do this in |
Beta Was this translation helpful? Give feedback.
-
Should we also support setting |
Beta Was this translation helpful? Give feedback.
-
As discussed @lalithanagarur :
|
Beta Was this translation helpful? Give feedback.
-
About making
On a related note, is it possible to modify get_table_properties so you only get values you're interested in? cc @lalithanagarur @tmpks |
Beta Was this translation helpful? Give feedback.
-
In respect to Glue table properties that we don't want overwritten - I can't see anything in relation to Iceberg tables. I've found 'In accordance with Iceberg specifications, table properties are stored in the Iceberg table metadata file rather than in AWS Glue.' So I'm going with the list that is here. If anyone has any other relevant links - please let me know. I can't seem to find a list of table parameters set in the Glue Catalog by any other services than Glue Crawler. |
Beta Was this translation helpful? Give feedback.
-
Update
|
Beta Was this translation helpful? Give feedback.
-
Post our conversation on 22/05, we have agreed to:
|
Beta Was this translation helpful? Give feedback.
-
Original proposed Changes
The purpose of this discussion is to discuss the changes made to the methods in the GlueTable class and the name of the additional arguments. The PR for these changes is here.
As We want to hear what thoughts and suggestions others may have here! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Actual Changes post Discussion
(Original proposed changes are in a comment below)
Created new readme.md under glue_converter, and added a link in the central readme.md to this.
Updated the metadata json schema with
glue_table_properties
and enforced string type validation.Added 2 private functions functions
_update_table_parameters
and_get_table_parameters
._update_table_parameters
adds the key, value pairs forprimary_key
andglue_table_properties
from the metadata to the parameters parameter in the table input. Will not add any key, value pairs for keys inglue_table_properties
that are protected properties defined in_glue_table_properties_aws
and/or other protected glue table properties such asprimary_key
._get_table_parameters
addsglue_table_properties
and/orprimary_key
from the table properties in the Glue Data Catalog to the metadata ifglue_table_properties
are defined orupdate_primary_key
is True. Setglue_table_properties
to"*"
to add glue_table_properties to the metadata with all available table properties from the Glue Data Catalog.Added
_update_table_parameters
togenerate_from_meta
in GlueTable to read theglue_table_properties
from the metadata schema and populate this and/orprimary_key
under table properties in the Glue Data Catalog. Raises a warning if there are any protected properties inglue_table_properties
, and will not write these properties to the Glue Data Catalog.Added
_get_table_parameters
togenerate_to_meta
in GlueTable to get the table properties from the Glue Data Catalog and populate this in the metadata schema. Option for user to specify the glue table properties to retrieve - set to None by default, or"*"
to get all. These key, value pairs (includingprimary_key
if explicitly defined or if"*"
) will be populated inglue_table_properties
in the metadata schema. Added functionality to updateprimary_key
in the metadata, default is set to False.Added
_update_table_parameters
togenerate_from_meta
in GlueConverter.Added tests to check these changes.
Beta Was this translation helpful? Give feedback.
All reactions