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

[BUG] Can't access item in array data type #390

Open
jonochang opened this issue Apr 8, 2024 · 1 comment
Open

[BUG] Can't access item in array data type #390

jonochang opened this issue Apr 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jonochang
Copy link

Describe the bug
When making the following query
SELECT keyName, tagSet[0], instanceId, instanceState, instanceType FROM awscc.ec2.instances
we get the following error

error:  You have an error in your stackql syntax; parser error: Code: INVALID_ARGUMENT
syntax error at position 25 near '['

To Reproduce

stackql exec "SELECT keyName, tagSet[0], instanceId, instanceState, instanceType FROM awscc.ec2.instances WHERE region = 'ap-southeast-2';"

Expected behavior
Expect to be able to access an item in the array type as defined in documentation here: https://awscc.stackql.io/providers/awscc/ec2/instances/

The aim is to extract the Name tag and value.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: MacOSX
  • CLI

Smartphone (please complete the following information):
N/A

Additional context
Add any other context about the problem here.

@jonochang jonochang added the bug Something isn't working label Apr 8, 2024
@jeffreyaven
Copy link
Member

hey @jonochang the issue is with the aws provider in this case, the awscc.instances resource is a view projected from the aws provider, the aws provider is xml based and the tagSet field is not getting properly marshalled into an array, we will get this fixed and let you know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants