Run Semantic Converter and Download TDS File #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run Semantic Converter and Download TDS File | |
| on: | |
| workflow_dispatch: | |
| check_suite: | |
| types: [completed] | |
| jobs: | |
| run-semantic-converter: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Run semantic converter if dbt Cloud CI passed | |
| if: ${{ github.event_name == 'workflow_dispatch' || (github.event.check_suite.app.name == 'dbt Cloud' && github.event.check_suite.conclusion == 'success') }} | |
| run: | | |
| mkdir -p output && \ | |
| ./semantic_converter \ | |
| -H ${{ secrets.REDSHIFT_HOST_URL }} \ | |
| -d redshift \ | |
| -a password \ | |
| -D dev \ | |
| -P 5439 \ | |
| -l LOCAL \ | |
| -M "dim_customer, dim_date, dim_order, dim_product, fact_sales" \ | |
| -A ${{ secrets.DBT_ACCOUNT_ID }} \ | |
| -j ${{ secrets.DBT_UAT_JOB_ID }} \ | |
| -T ${{ secrets.DBT_TOKEN }} \ | |
| -s "./output/sales.tds" | |
| - name: Upload generated artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: generated-files | |
| path: ./output/ | |
| download-artifacts: | |
| runs-on: ubuntu-latest | |
| needs: run-semantic-converter | |
| steps: | |
| - name: Download generated artifacts | |
| uses: actions/download-artifact@v3 | |
| with: | |
| name: generated-files | |
| path: ./downloaded_files/ | |
| - name: List downloaded files | |
| run: ls ./downloaded_files |