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

Wrong Error Code? #7

Open
Imisrael opened this issue Jul 8, 2022 · 1 comment
Open

Wrong Error Code? #7

Imisrael opened this issue Jul 8, 2022 · 1 comment

Comments

@Imisrael
Copy link

Imisrael commented Jul 8, 2022

I upgraded from the older nodejs client and now my ingest is broken. I am creating the schema but am getting the following error:

$ docker run --network host --name ingest ingest:latest

/app/ingest.js:14
const conInfo = new griddb.ContainerInfo({
                ^
GSException {
  mCode: -1,
  mMessage: 'Expected 1st element of ColumnInfo property is string',
  mLocation: '',
  mStackSize: 1
}

It's definitely mis-attributed because my ingest code is fine:


var containerName = "Cereal"
```javascript
var conInfo = new griddb.ContainerInfo({
          'name': containerName ,
          'columnInfoList': [
                        ["name", griddb.GS_TYPE_STRING],
                        ["mfr", griddb.GS_TYPE_STRING],
                        ["type", griddb.GS_TYPE_STRING],
                        ["calories", griddb.GS_TYPE_INTEGER],
                        ["protein", griddb.GS_TYPE_INTEGER],
                        ["fat", griddb.GS_TYPE_INTEGER],
                        ["sodium", griddb.GS_TYPE_INTEGER],
                        ["fiber", griddb.GS_TYPE_FLOAT],
                        ["carbo", griddb.GS_TYPE_FLOAT],
                        ["sugars", griddb.GS_TYPE_INTEGER],
                        ["potass", griddb.GS_TYPE_INTEGER],
                        ["vitamins", griddb.GS_TYPE_INTEGER],
                        ["shelf", griddb.GS_TYPE_INTEGER],
                        ["weight", griddb.GS_TYPE_FLOAT],
                        ["cups", griddb.GS_TYPE_FLOAT],
                        ["rating", griddb.GS_TYPE_FLOAT]
            ],
     'type': griddb.ContainerType.COLLECTION,
    'rowKey': false
});

As you can see, I definitely have a string where the errors says I don't
@AnggaSuherman
Copy link
Member

AnggaSuherman commented Jul 12, 2022

Thanks for opening an issue.

Try changing the type declaration:
["calories", griddb.GS_TYPE_INTEGER] => ["calories", griddb.Type.INTEGER]

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

No branches or pull requests

2 participants