How to specify tab size for custom dataset queries (4 vs 8 spaces)

For my team, we mainly create Spice datasets using custom SQL queries.

In most cases, the tab size is 4 spaces, which is what I want. But randomly, some datasets will have a tab size of 8 spaces, which really throws off the formatting and makes the queries difficult to read.

I cannot find a setting anywhere to specify the desired tab size. Does anyone have any ideas why this might be happening and how to prevent it?

Screenshot 2024-03-01 094821

Thanks

Hi @twilly
do i got it right you want to format the SQL statement?
Are you copy&paste the statements or write it directly in QS?
BR

Yes, you are correct. I’m asking about the spacing in the SQL statement.

It is copy/pasted from a document with a tab size set at 4, but QuickSight is formatting the code with a tab size of 8.

I’ll add that when I originally created the dataset the spacing was correct. Then I came back to make some edits and the tab spacing had changed to what you see in the screenshot, and I can’t change it back.

This only happens sometimes, but I can’t figure out the pattern or how to change the behavior.

I guess it happens somewhere during the copy. But you can’t change anything in QuickSight.