top | item 36698158

(no title)

derN3rd | 2 years ago

Yesterday I had the case where I needed to create analytics tables in Clickhouse based on typescript types for around 150 types.

Thought I'd give it a try and gave chatGPT 2 examples of existing tables and the corresponding TS types and asked it if it understood what it should do next. It explained the existing logic and also 2 edge cases hidden (e.g. if a type was boolean the column was UInt8 (to save 0/1))

Then I pasted all types in batches of 15 in and it generated with only 2-3 corrections needed, probably saving me around 1-2h of manual checking and/or creating. It understood that certain fields are non LowCardinality and therefore not used it.

discuss

order

No comments yet.