-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Glue::CfnTable: Not able to create a table by providing schema_name and registry_name #30076
Comments
@mehdimld Good morning. Thanks for opening the issue. The above error is returned by CloudFormation when the synthesized CF template is deployed. Could you please share the following:
I tried reproducing the issue using CDK stack written both in TypeScript and Python. The properties TypeScriptCDK stackimport * as cdk from 'aws-cdk-lib';
import * as glue from 'aws-cdk-lib/aws-glue';
import { Construct } from 'constructs';
export class TypescriptStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const cfnTable = new glue.CfnTable(this, 'MyCfnTable', {
catalogId: 'testcatalogid',
databaseName: 'testdatabasename',
tableInput: {
description: 'description',
tableType: 'EXTERNAL_TABLE',
name: 'testtablename',
partitionKeys: [{
name: 'name',
// the properties below are optional
comment: 'comment',
type: 'type',
}],
storageDescriptor: {
location: 's3://testbucket/',
schemaReference: {
schemaId: {
registryName: 'testregistryName',
schemaName: 'testschemaName',
}
}
},
}
});
}
}
|
Hey @ashishdhingra, I have tested it locally since then and have not been able to reproduce the problem. It might be related to the cdk/node version of our Jenkins instance (the one running the cdk deploy in the above screenshot). Although the code snippet you provided works correctly during the synth, it fails at deployment time, asking for the schema_version_number (or schema_version_id, but providing this prevents you from providing the registry_name and schema_name). Thanks a lot for your help; we can close the issue. |
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the bug
I've encountered an issue while trying to create a Glue table using the aws_glue.CfnTable construct in the AWS CDK Python library. According to the documentation, I should be able to specify the schema_reference using registry_name and schema_name. However, when I attempt to deploy this configuration, the deployment fails with an error indicating that these pieces of information are not being provided. Below is a screenshot of the code snippet I use and the error I get at deployment.
Expected Behavior
The table should be created with the schema referenced, as I provided both registry and schema name.
Current Behavior
Table creation fails
Reproduction Steps
Try to create a glue table using aws_glue.CfnTable, reference a schema and a registry.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.132.1
Framework Version
No response
Node.js Version
20.10.0
OS
Windows
Language
Python
Language Version
3.11
Other information
No response
The text was updated successfully, but these errors were encountered: