Better HN
topnewbestaskshowjobs
Log inSign up

regexman1

108 karma · joined Sep 25, 2024 (2y ago) · 16 submissions

Submissions

comment 3mo ago · link · parent

Brilliant

2.

Show HN: A TUI for Inspecting Snowflake Tasks(github.com ↗)

3 points · by regexman1 · 3mo ago · discuss

comment 2y ago · link · parent

I'm an analyst so I literally only query for analytical purposes. I don't have any SQL code embedded in an application so the 1=1 is purely for tweaking/testing a query more quickly.

I certainly didn't use AI, all these tips/tricks are from work experience and reading Snowflake documentation and the like, but I guess I can't convince you either way. Regardless I appreciate the feedback!

comment 2y ago · link · parent

I've amended the README.md to explain what I meant. My error was in using the word dynamic!

comment 2y ago · link · parent

Just to be clear I'm using it for the same reason as trailing commas.

If I'm inspecting a dataset I use WHERE 1=1 so I can add and remove conditions more easily.

I realise the confusion is in my wording of dynamic - I might amend the README.md to clarify. Thanks for the feedback!

6.

Show HN: A command-line tool for bulk deleting your GitHub gists(github.com ↗)

1 points · by regexman1 · 2y ago · discuss

comment 2y ago · link · parent

That's right - it's just a quicker way of being able to comment/uncomment conditions when doing EDA or debugging.

comment 2y ago · link · parent

Not at all actually, I just hadn't really planned to add this as a tip. Additionally I thought an in-line view was fine for the examples included. But maybe I will!

comment 2y ago · link · parent

Fair point!

comment 2y ago · link · parent

I appreciate the feedback, no offence taken. I'm an analyst so I often find the leading comma useful when I'm testing something and want to quickly comment a column out but I take your point.

And I agree, I should have used CTEs for this query, I was just trying to save lines of code which had the unintended consequence of quite an ugly query. However I did want to use it as an example of indentation being useful to make it slightly easier to read. Although perhaps I'm the only one who thinks so.

I greatly appreciate the constructive criticism.

comment 2y ago · link · parent

That's a totally valid point haha.

comment 2y ago · link · parent

I didn't realise that, great to know. Thanks!

comment 2y ago · link · parent

I'll add this as a caveat. I'm an analyst so my SQL isn't really exposed to anyone other than myself and so I wasn't aware of this, thanks for flagging.

14.

SQL Tips and Tricks(github.com ↗)

332 points · by regexman1 · 2y ago · 161 comments