Removing any retool transformation when viewing data

My team reviews the values produced by sample values from a dataset in a retool app and then applies our own normalization to those values. The app has worked for all of our use cases, however, we noticed recently that there is a discrepancy between what our api returns for sample values and what the retool visualizes in a table as the same value. Is there a way to turn this feature off? It is important that the value seen in the table is the exact same as the value returned from the api.


You can try changing the column type from "Auto" to "Text" and it won't try to show it as a formatted date.

thanks @dcartlidge

we looked into that but unfortunately the schema changes dynamically based on the results of the api query. If it was a static schema that solution would work.

Any other ideas?

You can supply a dynamic schema to the table component, so you could specify the columns and datatypes through that? I'm thinking a simple map of a record and set it to number or text based on the datatype so it won't ever default to auto

the column names pulled from the api could technically have infinite combinations, i'm assuming I would have to predefine every one? Don't think that solution would work. Is it not possible to define auto v text at the table level instead of the column level?

Ah, I wasn't thinking of predfining them, more like a preprocessor mapping function that grabs the first record of your dataset and creates a schema where everything is defined as "text" or "number" based on the type of data it finds. Hacky but might work for your use case. I'm not sure if there's a way to specify that the table shouldn't attempt to create a schema other than to define your own one.

Hey Matt (and hey Dave! Always a pleasure to see you in threads :slightly_smiling_face:) ! Would it be alright if I stepped into your org to take a look?

1 Like

Hi @victoria that would be great. To reproduce the transformation use the "Dataset Mapper" app and select the dataset pictured below. You will see that the table shows a transformed "date" column given what the get_sample_data query returns
Screenshot 2023-04-17 at 10.41.44 AM

Hey just following up here. @victoria any thoughts?

Hey Matt! So sorry for the delay here.

I just stepped into your org, made a copy of your app and checked out table2.

Noticed your table was a bit behind our current table component, so I clicked to upgrade it and it seems like the dates do indeed match up?

Let me know if you see the same in the Dataset Mapper - copy app in your org!

As a side note, when I upgraded the table, your _nio_sample_128 column no longer showed the Xs, so I manually changed it into a Boolean type column with Xs as the default False values.

Hey @victoria thanks for getting back to me

Even with the updated table, the results still dont match our raw feed. Instead of saying "Dec.." we want it to match the format shown below. It's important for our downstream workflows that we see the exact values without any transformations

Screenshot 2023-05-01 at 4.22.38 PM

Ah! I see. If you set the column type to "String" or "Text", does it show the original date format?

Yes but the schema and/or values change dynamically depending on the dataset selected from the dropdown (#338 in this case). Meaning I would have to select the dataset, have the dataset load, and then go in and manually change all columns to 'text.' In this case it's likely just easier to look at the raw api response. The ask is something like 'show me the untransformed values in this table no matter what is loaded'

Ah, got it :thinking:

I think dynamic column settings in the Table (legacy) component would be your best bet then!

In the Table (legacy) component,

  1. Click the additional settings toggle in the Content section
  2. Use dynamic column settings

You'll input an array like so:

(In this example, I'm not changing the first two column names, so I just enter their names to include them. I'm changing the "untitled" column to be of type text though!)

Let me know if you have any questions at all!

In this example, "untitled" is the name of the column right? In my use case, I don't know the name of the columns ahead of time, only after each api call. The schema, headers, and values will be different depending on the dataset loaded into the table. In that case, I couldn't indicate 'column y' should be type test because I don't know the name 'column y' ahead of time?

Hey Matt! Indeed, "untitled" is the name of the column.

Got it :pensive:

If you'd like, you could use this in your column settings field to set ALL columns to a Text column by default:

Array.from({ length: formatDataAsArray(query1.data).length }, (_, i) => ({ name: Object.keys(query1.data)[i], type: "string" }))

Let me know if that helps at all! Otherwise, I'll keep you updated on the feature request to disable auto column types in a table :slight_smile: