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

standardize how we return schemas from the api #3886

Open
big-andy-coates opened this issue Nov 18, 2019 · 0 comments
Open

standardize how we return schemas from the api #3886

big-andy-coates opened this issue Nov 18, 2019 · 0 comments

Comments

@big-andy-coates
Copy link
Contributor

Newer code tends to return schemas through the API using SQL, e.g.

ID INT KEY, NAME STRING, ADDRESS STRUCT<HOUSE_NO INT, STREET STRING, ...>

Where as the older code exposes this using a json version of the Connect schema, e.g.

[
   {
      "name": "ID",
      "schema": {
         "type": "INT",
        "fields": null,
        "memberSchema": null
       }
   },
  {
      "name": "NAME",
      "schema": {
         "type": "STRING",
        "fields": null,
        "memberSchema": null
       }
   },
  {
      "name": "ADDRESS",
      "schema": {
         "type": "STRUCT",
        "fields": [
             {
                "name": "HOUSE_NO",
                "schema": {
                "type": "INT",
                "fields": null,
                "memberSchema": null
                }
          } ,
          {
                "name": "STREET",
                "schema": {
                "type": "STRING",
                "fields": null,
                "memberSchema": null
                }
           }
        ],
        "memberSchema": null
       }
   }
 
]

The later being handled by EntityUtil.

We should probably standardize on one format.

Note: #3526

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant