qmacro / qmacro.github.io

MIT License
4 stars 4 forks source link

Exploring GitHub repo name distribution with jq | DJ Adams #19

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Exploring GitHub repo name distribution with jq | DJ Adams

Exploring GitHub repo name distribution with jq 07 May 2022 | 7 min read I wanted a brief rundown of the name prefixes for repositories in...

https://qmacro.org/blog/posts/2022/05/07/exploring-github-repo-name-distribution-with-jq/

judell commented 2 years ago

Hey DJ,

Just for fun I tried it this way using Steampipe.

with repo_names as (
  select 
    (regexp_match(full_name, '/([^\-]+)'))[1] as match
  from 
    github_search_repository
  where
    query = 'org:SAP-samples'
)
select
  match,
  count(*)
from
  repo_names
group by
  match
order by 
  count desc
judell commented 2 years ago

Results:

     match      | count 
----------------+-------
 cloud          |    63
 teched2020     |    59
 teched2021     |    33
 btp            |    28
 hana           |    24
 s4hana         |    16
 abap           |    14
 ui5            |    11
 data           |     9
 security       |     8
 sap            |     6
 byd            |     5
 smb            |     5
 fiori          |     5
 safety         |     4
 service        |     4
 localization   |     3
 cap            |     3
 scp            |     3
 b1             |     3
 mobile         |     3
judell commented 2 years ago

I've been thinking about jq having just learned about zq (https://www.brimdata.io/blog/introducing-zq/) which borrows ideas from SQL. Which in turn leads me back to ... admittedly I am hugely biased here ... SQL :-)

qmacro commented 2 years ago

Thanks so much Jon for this. As you know I looked at Steampipe early on, and found it to be wonderful. Unfortunately I got diverted and distracted onto other things, but it's still up there on my list to learn more about, in conjunction with the power of PostgreSQL too. This is a great example that I can use now to compare with my jq solution and thereby learn more. Incidentally, I wrote a brief post on that "introducing zq" post over here: Some thoughts on jq and statelessness.