Skip to content

Infer Schema functionality breaks some examples #368

Closed
@matt-hooper

Description

It appears that the infer schema functionality changed between 0.2.9 and 0.2.11. This has broken some json based examples.

For example, the cryptocurrency example does not work using 0.2.10 (and above) of perspective.
The example reads from a json feed and auto-generates the table schema.

The generated schema is different between the two versions (even though the data from the feed is identical):

Version 0.2.9 Version 0.2.10
client_oid: "string" -
order_id: "string" order_id: "string"
order_type: "string" -
price: "float" price: "float"
product_id: "string" product_id: "string"
- remaining_size: "float"
sequence: "float" sequence: "float"
side: "string" side: "string"
size: "float" -
time: "datetime" time: "datetime"
type: "string" type: "string"

The renaming of the size field to remaining_size breaks the example:
image

I have also seen a similar issue with a different json based data source.
See attached example forecast_min.zip
forecast_min.zip

This example reads data from a json file.
When using 0.2.9 of perspective, the types of the data are correctly inferred:

image

When 0.2.11 is used, the types are all read as string values. None of the number types are inferred:

image

Is this new functionality intended?
Is it possible to force perspective to work in the old way and auto infer the number values (without manually passing a pre-defined schema)?

Metadata

Assignees

Labels

bugConcrete, reproducible bugs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions