-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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-alpha): cannot create 2 partitionIndexes simultaneously #24813
Comments
Hi @clueleaf , thanks for reaching out. Its stated in the available documentation that you can have a maximum of 3 partition indexes in the table. But its also stated here - `
We also use +1s to help prioritize our work, and are happy to re-evaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for re-prioritization. (edited) |
@khushail Thank you for your investigation. const bucket = new s3.Bucket(stack, 'DataBucket');
const database = new glue.Database(stack, 'MyDatabase', {
databaseName: 'database',
});
const csvTable = new glue.Table(stack, 'CSVTable', {
database,
bucket,
tableName: 'csv_table',
columns: [
{ name: 'col1', type: glue.Schema.STRING },
{ name: 'col2', type: glue.Schema.STRING },
{ name: 'col3', type: glue.Schema.STRING },
],
partitionKeys: [
{ name: 'year', type: glue.Schema.SMALL_INT },
{ name: 'month', type: glue.Schema.BIG_INT },
],
partitionIndexes: [{ indexName: 'index1', keyNames: ['month'] }],
dataFormat: glue.DataFormat.CSV,
});
csvTable.addPartitionIndex({ indexName: 'index2', keyNames: ['month', 'year'] }) |
@clueleaf , could you please share the error that you see when it fails. As I am not able to repro this error, it might be helpful for reference while creating a PR. |
Sure.
|
thanks @clueleaf . |
I have same issue, it worked previously. |
IMO, the best thing is to avoid returning nothing in the Something like this (currently doesn't work because it returns void): const table = new S3Table(this, 'Something', {
.
.
.
});
const pI1 = table.addPartitionIndex({
indexName: 'year_month_day',
keyNames: ['year', 'month', 'day']
});
const pI2 = table.addPartitionIndex({
indexName: 'country_site',
keyNames: ['country', 'site']
});
pI1.addDependency(pI2); # Does't work because pI1 and pI2 are void |
Describe the bug
When passing 2 indexes to
partitionIndexes
ofglue.Table
, table creation fails.Expected Behavior
Glue table and indexes are created.
Current Behavior
Table indexes creation fails.
Reproduction Steps
Create a glue table with 2 indexes.
It fails sometimes even if only one index is passed to
partitionIndexes
and the rest is added usingtable.addPartitionIndex
.Possible Solution
I think this a restriction of Glue service.
Additional Information/Context
No response
CDK CLI Version
2.70.0
Framework Version
No response
Node.js Version
18
OS
macOS Ventura
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: