diff --git a/workflows/shared/sq.md b/workflows/shared/sq.md new file mode 100644 index 0000000..654a692 --- /dev/null +++ b/workflows/shared/sq.md @@ -0,0 +1,139 @@ +--- +steps: + - name: Install sq from GitHub releases + run: | + # Install sq binary from official install script + # This downloads the latest release from GitHub and installs it to /usr/local/bin + /bin/sh -c "$(curl -fsSL https://sq.io/install.sh)" + + - name: Verify sq installation + run: | + sq version + echo "sq is installed and ready to use" +--- + + +You have access to the `sq` data wrangling tool for working with structured data sources. + +**sq capabilities:** +- Query CSV, Excel, JSON, and database files using jq-like syntax +- Join data across different source types +- Convert between data formats +- Inspect database structures and metadata +- Perform database operations (copy, truncate, drop tables) +- Compare data with `sq diff` + +**Using sq in this workflow:** +The sq binary is installed and available in PATH. Use it directly: +```bash +sq [command] [arguments] +``` + +**Example commands:** +```bash +# Inspect a data file +sq inspect file.csv + +# Query data with jq-like syntax +sq '.table | .column' file.csv + +# Output as JSON +sq --json '.table' file.csv + +# Filter and aggregate +sq '.table | where(.value > 100) | count' file.csv + +# Convert to different format +sq --markdown '.table' file.csv +``` + +For more information, see: https://sq.io/docs/