發表文章

目前顯示的是 12月, 2023的文章

在 VS code 中使用 Bigquery

圖片
事前準備 VS Code 一份我們要跑的.sql檔(optional) Google Google Cloud Project 已經在使用中的BigQuery 動工 設定/新增Service account 新增 設定權限(我是只給讀取) 安裝Extension並連線 安裝 設定驗證 跑起來啦~ clone/open/寫 一個.sql檔 執行(如何設定) 限制 目前有幾個不便之處,例如巢狀的資料無法被載入,即使匯出也一樣。下圖大家可以看到不管是.csv或.json都跟原本的資料有遺漏,注意,不只是視覺上無法顯示,是資料有遺漏 這張表應該左邊也要改成json來呈現,比較看得出差異 後記 在這之前,我已經把.sql上傳在git,並使用 VS Code 編輯,但每次要跑Query時就要重回到網頁上。現在使用了這套方法,所有事情都能在IDE中完成,並且在VS Code中將結果排序的速度還比網頁快上許多,以利開發。也可以用extension本身的open功能,直接在VS Code內比較兩個json的差異,非常好用。隔天工作完全沒有用到瀏覽器操作! 這邊文章還沒補完但是同事想看,所以先發佈ㄌ。 資料來源 BigQuery Driver for SQLTools

學習筆記-6

圖片
Git VS Code Git Graph 的 drop 跟 git reset 的比較 應該是同一種東西~ 會把選取的commit刪除,並且並且還原檔案,這正是這兩者與undo的不同之處(undo 會將檔案保留commit前的狀態,所以會跟最新的commit比較,可以直接推新的commit)。雖然我現在想要undo,但是短時間找不到方法。 我應該要將 .gitignore 加進 .gitignore 裡嗎? 簡答:不該!( 來源 ) 詳答(冗答?) by GPT: No, you should not include .gitignore in the .gitignore file itself. Sharing Ignoring Rules: The .gitignore file contains rules for ignoring certain files and directories in your Git repository (like build outputs, temporary files, or system-specific files). By tracking this file in Git, you ensure that every contributor to the project has the same set of ignore rules, which helps in maintaining consistency. Collaborative Maintenance: Including .gitignore in your repository allows team members to propose or modify ignore rules collaboratively. This is particularly important in projects where new tools, dependencies, or build processes might introduce new files that should be ignored. Project Standardization: When new contributors clone the repository, th