kiln / flourish-sdk

The SDK for developing Flourish templates
Other
80 stars 16 forks source link

SDK and Server don't respect data_type, hints in template.yml #80

Open aendra-rininsland opened 2 years ago

aendra-rininsland commented 2 years ago

I have a dataset that has a column that is mostly numbers, but a few values like 2A. I need to ensure this is a string, but the SDK keeps typing it as a number (and losing any alphabetical designations in the process, thus breaking the IDs). I've tried configuring it in template.yml a few ways, up to:

  - key: code
    name: Code
    dataset: geography
    type: column
    column: france_departments::B
    data_type: string
    assignment:
      hints:
        string: true  # This default can be omitted.
        number: false # This stops number columns being picked.

No matter how explicit I am, the SDK seems to ignore the data_type setting.

aendra-rininsland commented 2 years ago

Screenshot 2022-03-09 at 17 56 04

I tried publishing the template to see whether it was an issue restricted to the SDK and it appears not to — the data table loading on the server seems broken. The only way to ensure a column is typed as a number is to have no cells that can be coerced to a number.