When importing datasets with columns stored as int, DSS seems to want to store them as double.

stainlessteelra
stainlessteelra Registered Posts: 14 ✭✭✭✭

Using wip_discrete_jobs as an example we have columns that should be integers but are ingested as numeric.

For example,

Table:  wip_discrete_jobs

Column: wip_entity_id

Type:    numeric(38,15)

image-899bde11064548-a36b.png

If I query the table

SELECT wip_entity_id, organization_id  FROM khw_eng.wip_discrete_jobs WHERE wip_entity_id = 34922

The result is as expected with a scale of 15:

image-c5f1087e742e38-44e9.png

If I take this table as an input and do a data prepare step without adding any transformations, I end up with different column type.

image-50bc07be5ff958-aa77.png

Schema:           rpcadw

Table:    wip_discrete_jobs_prepared

Column: wip_entity_id

Type:                   float8

image-bc24b0848f4a18-33b7.png

If I query the table I end up NULL result:

SELECT wip_entity_id, organization_id  FROM rpcadw.wip_discrete_jobs_prepared WHERE wip_entity_id  = 349225

image-59c727fee18168-a7a4.png

To return the result I must round instead:

               SELECT wip_entity_id, organization_id  FROM rpcadw.wip_discrete_jobs_prepared WHERE round(wip_entity_id)  = 349225

image-efd4d8e2a4867-4963.png

We can see that the conversion to float by datiaku has not preserved the true value.

I also tried not normalizing float/doubles:

image-492000f6b34bb8-d7a6.png

But we have the same issue:

               SELECT wip_entity_id, organization_id  FROM rpcadw.wip_discrete_jobs_prepared2 WHERE round(wip_entity_id) = 349225

image-80e0df3d2646a-b299.png
Setup Info
    Tags
      Help me…