Skip to content

Send slack notification with BQ results

License

Notifications You must be signed in to change notification settings

data-i-consulting/bq2slack-github-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bq2slack-github-action

Send slack notification with BQ results.

How to use

Sample github actions workflow yaml

name: Run SQL against BQ and notify slack
on:
  schedule:
    - cron:  '0 10 * * *' # run every day at 10:00

jobs:
  bq2slack:
    runs-on: ubuntu-latest
    name: Execute SQL query and send results to Slack
    steps:
      - name: Run
        uses: data-i-consulting/[email protected] # use the latest tag
        with:
          slack_webhook: ${{secrets.SLACK_WEBHOOK}}
          gcp_service_account: ${{secrets.GCP_SERVICE_ACCOUNT}}
          sql: |
            WITH something AS (
              SELECT 1 as my_number
            )

            SELECT * FROM something

Sample output

Screen Shot 2022-02-12 at 2 41 48

Development

npm i
npm run start

Build

npm i
npm run build

About

Send slack notification with BQ results

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •