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

fix(plugins/maxcompute): handle schema-based table listing in resource retrieval #196

Conversation

bearaujus
Copy link

  • Refactored the GetResources method to account for schema-based table listings in MaxCompute.
  • Integrated odpsClient to retrieve schemas and iterate over them when fetching tables.
  • Fixed handling of schema exclusions based on credentials.
  • Ensured pagination support for table listing using markers.

…e retrieval

- Refactored the `GetResources` method to account for schema-based table listings in MaxCompute.
- Integrated `odpsClient` to retrieve schemas and iterate over them when fetching tables.
- Fixed handling of schema exclusions based on credentials.
- Ensured pagination support for table listing using markers.
- Updated resource URN generation to include schema information when available.
plugins/providers/maxcompute/credentials.go Outdated Show resolved Hide resolved
return nil, err
}

schemaRes := map[string]struct{}{"default": {}}
Copy link
Member

Choose a reason for hiding this comment

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

do we need to hardcode "default" here? is the list schemas API not returning the default schema record?

Copy link
Author

Choose a reason for hiding this comment

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

It will returning default schema when SchemaName is nil (this is the previous implementation)
image

So with this changes, we need to add default there to ensure default schema is iterated

Copy link
Member

Choose a reason for hiding this comment

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

yes understand that, but when we are fetching the list of schemas, are we not getting default schema in the list?

Copy link
Author

@bearaujus bearaujus Jan 10, 2025

Choose a reason for hiding this comment

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

Got it, this is to ensure that default scheme is included on list scheme (since I can't run it from my local because I dont have any access key for max compute)

plugins/providers/maxcompute/provider.go Outdated Show resolved Hide resolved
@Gadigeppa-J Gadigeppa-J merged commit d9dedb8 into main Jan 13, 2025
6 checks passed
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.

3 participants