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

feat(glue): add ExternalTable for use with connections #24753

Merged
merged 54 commits into from
Sep 11, 2023
Merged

feat(glue): add ExternalTable for use with connections #24753

merged 54 commits into from
Sep 11, 2023

Conversation

Rizxcviii
Copy link
Contributor

@Rizxcviii Rizxcviii commented Mar 22, 2023

Changing the table structure to include an initial TableBase abstract class, allowing different tables of different data sources to be created from. Initially there are two, S3Table and ExternalTable.

  • S3Table: The current table structure that has been used throughout the previous versions of the CDK
  • ExternalTable: The new glue table that will be used to store metadata about external data sources. This subclass will contain an externalDataLocation property to explicitly specify the Location property of the underlying CfnTable L1 construct
  • Table: This is now @deprecated to shift the usage towards S3Table

Closes #24741.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 labels Mar 22, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team March 22, 2023 18:20
@github-actions github-actions bot added the valued-contributor [Pilot] contributed between 6-12 PRs to the CDK label Mar 22, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation dismissed their stale review March 23, 2023 11:40

✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

2 similar comments
@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@Rizxcviii
Copy link
Contributor Author

Clarification Request: When performing buildup, it seems to build the entirety of the aws-cdk-lib folder. Is there any way around this, and only build aws-cdk-lib/core or the necessary modules within that folder?

@aws-cdk-automation aws-cdk-automation added the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Apr 13, 2023
@Rizxcviii
Copy link
Contributor Author

Ignore the request lol, I got it to work

@corymhall corymhall removed the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Apr 17, 2023
@Rizxcviii
Copy link
Contributor Author

@TheRealAmazonKendra Is it possible to get this PR reviewed please? Thank you.

@corymhall corymhall added the @aws-cdk/aws-glue Related to AWS Glue label May 8, 2023
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 8, 2023
@Rizxcviii
Copy link
Contributor Author

@corymhall @TheRealAmazonKendra Can this get reviewed? Thank you.

mrgrain
mrgrain previously requested changes Jul 4, 2023
Copy link
Contributor

@mrgrain mrgrain 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 this, this will be an important addition to the alpha module.

I'm not quite sure about the design however. The special cases inside the grant*() methods make me think we should have separate subclasses for this. I'm even leaning towards S3Table being the special case of the regular table that just takes a location string.

What do you think?

packages/@aws-cdk/aws-glue-alpha/README.md Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-glue-alpha/lib/table.ts Outdated Show resolved Hide resolved
@mrgrain
Copy link
Contributor

mrgrain commented Sep 11, 2023

@Rizxcviii Very close now! There's still a couple of unexpected changes to the deprecated Table I'd like reverted:

API elements with incompatible changes:
warn - PROP @aws-cdk/aws-glue-alpha.Table.encryption: type Optional<@aws-cdk/aws-glue-alpha.TableEncryption> (formerly @aws-cdk/aws-glue-alpha.TableEncryption): output type is now optional [changed-type:@aws-cdk/aws-glue-alpha.Table.encryption]
warn - INITIALIZER @aws-cdk/aws-glue-alpha.Table.<initializer>: argument props, takes @aws-cdk/aws-glue-alpha.S3TableProps (formerly @aws-cdk/aws-glue-alpha.TableProps): @aws-cdk/aws-glue-alpha.TableProps does not extend @aws-cdk/aws-glue-alpha.S3TableProps [incompatible-argument:@aws-cdk/aws-glue-alpha.Table.<initializer>]
warn - PROP @aws-cdk/aws-glue-alpha.TableProps.bucket: has been removed [removed:@aws-cdk/aws-glue-alpha.TableProps.bucket]
warn - PROP @aws-cdk/aws-glue-alpha.TableProps.encryption: has been removed [removed:@aws-cdk/aws-glue-alpha.TableProps.encryption]
warn - PROP @aws-cdk/aws-glue-alpha.TableProps.encryptionKey: has been removed [removed:@aws-cdk/aws-glue-alpha.TableProps.encryptionKey]
warn - PROP @aws-cdk/aws-glue-alpha.TableProps.s3Prefix: has been removed [removed:@aws-cdk/aws-glue-alpha.TableProps.s3Prefix]

You can check that list yourself by running yarn compat inside the package directory.

packages/@aws-cdk/aws-glue-alpha/test/integ.table.ts Outdated Show resolved Hide resolved
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Sep 11, 2023
@mergify mergify bot dismissed mrgrain’s stale review September 11, 2023 11:27

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Sep 11, 2023
Copy link
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

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

See other comments.

@mergify mergify bot dismissed mrgrain’s stale review September 11, 2023 11:52

Pull request has been modified.

@Rizxcviii
Copy link
Contributor Author

@Rizxcviii Very close now! There's still a couple of unexpected changes to the deprecated Table I'd like reverted:

API elements with incompatible changes:
warn - PROP @aws-cdk/aws-glue-alpha.Table.encryption: type Optional<@aws-cdk/aws-glue-alpha.TableEncryption> (formerly @aws-cdk/aws-glue-alpha.TableEncryption): output type is now optional [changed-type:@aws-cdk/aws-glue-alpha.Table.encryption]
warn - INITIALIZER @aws-cdk/aws-glue-alpha.Table.<initializer>: argument props, takes @aws-cdk/aws-glue-alpha.S3TableProps (formerly @aws-cdk/aws-glue-alpha.TableProps): @aws-cdk/aws-glue-alpha.TableProps does not extend @aws-cdk/aws-glue-alpha.S3TableProps [incompatible-argument:@aws-cdk/aws-glue-alpha.Table.<initializer>]
warn - PROP @aws-cdk/aws-glue-alpha.TableProps.bucket: has been removed [removed:@aws-cdk/aws-glue-alpha.TableProps.bucket]
warn - PROP @aws-cdk/aws-glue-alpha.TableProps.encryption: has been removed [removed:@aws-cdk/aws-glue-alpha.TableProps.encryption]
warn - PROP @aws-cdk/aws-glue-alpha.TableProps.encryptionKey: has been removed [removed:@aws-cdk/aws-glue-alpha.TableProps.encryptionKey]
warn - PROP @aws-cdk/aws-glue-alpha.TableProps.s3Prefix: has been removed [removed:@aws-cdk/aws-glue-alpha.TableProps.s3Prefix]

You can check that list yourself by running yarn compat inside the package directory.

This is now fixed. I ran yarn compat after the fix and there appears to be no issues

@Rizxcviii Rizxcviii requested a review from mrgrain September 11, 2023 12:01
mrgrain
mrgrain previously approved these changes Sep 11, 2023
@mrgrain mrgrain changed the title feat(glue): glue tables can include glue connections feat(glue): ExternalTable can use connections Sep 11, 2023
@mrgrain mrgrain changed the title feat(glue): ExternalTable can use connections feat(glue): ExternalTable for use with connections Sep 11, 2023
@mrgrain mrgrain changed the title feat(glue): ExternalTable for use with connections feat(glue): add ExternalTable for use with connections Sep 11, 2023
@mergify
Copy link
Contributor

mergify bot commented Sep 11, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Sep 11, 2023
@mergify
Copy link
Contributor

mergify bot commented Sep 11, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot dismissed mrgrain’s stale review September 11, 2023 13:11

Pull request has been modified.

@Rizxcviii
Copy link
Contributor Author

@mrgrain There was an error regarding permissions to update the branch, and it recommended that I update the branch locally, I didn't know that it would remove your approval, my bad :'(

@mrgrain
Copy link
Contributor

mrgrain commented Sep 11, 2023

No worries! Sometimes there are conflicts and then it's unavoidable.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: e12dee6
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Sep 11, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 1c03cb3 into aws:main Sep 11, 2023
10 checks passed
@Rizxcviii Rizxcviii deleted the feature/glue-connection-for-tables branch September 11, 2023 15:42
mikewrighton pushed a commit that referenced this pull request Sep 14, 2023
Changing the table structure to include an initial `TableBase` abstract class, allowing different tables of different data sources to be created from. Initially there are two, `S3Table` and `ExternalTable`.

- `S3Table`: The current table structure that has been used throughout the previous versions of the CDK
- `ExternalTable`: The new glue table that will be used to store metadata about external data sources. This subclass will contain an `externalDataLocation` property to explicitly specify the `Location` property of the underlying `CfnTable` L1 construct
- `Table`: This is now `@deprecated` to shift the usage towards `S3Table`

Closes #24741.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-glue Related to AWS Glue effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run valued-contributor [Pilot] contributed between 6-12 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

glue: glue connections to be assigned to glue tables
6 participants