CI/CD techniques with Git and Databricks Git folders (Repos)

CI/CD techniques with Git and Databricks Git folders (Repos)

733 Lượt nghe
CI/CD techniques with Git and Databricks Git folders (Repos)
Learn techniques for using Databricks Git folders in CI/CD workflows. Documentation Link: ================== CI/CD techniques with Git and Databricks Git folders (Repos) https://docs.databricks.com/aws/en/repos/ci-cd-techniques-with-repos Update Repo using Rest API: https://docs.databricks.com/api/workspace/repos/update Prerequisite: =========== 🔁Automate Deployment to AWS with GitHub Actions | From Zero to Hero in 85 minutes https://youtu.be/N5Z_M1HWTMA?si=qDVNzJFGM2LRY-Wu GIT Repo Integration with ‪Databricks: https://youtu.be/KEl5PB1AM7A?si=pSeT1qdxR5qrFjuu Github Action Code: ================= name: Update Databricks Repo on PR Merge to Master on: push: branches: - main jobs: update-repo: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.9' # Use the appropriate Python version you need - name: Install dependencies run: | python -m pip install --upgrade pip pip install requests - name: Run Databricks Repo Update Script run: | python -c " import requests import json # Set your Databricks workspace URL and the personal access token DATABRICKS_URL = '{Paste your Databricks Account URL}' TOKEN = '{Provide your Databricks Token' # Define the repo_id you want to update repo_id = {repo_id} # Replace with your repo ID # Define the new branch or tag you want to update the repo to new_branch_or_tag = '{Branch Name}' # Set up the API endpoint endpoint = f'{DATABRICKS_URL}/api/2.0/repos/{repo_id}' # Prepare the payload with the new branch or tag payload = { 'branch': new_branch_or_tag } # Define the headers including the authorization token headers = { 'Authorization': f'Bearer {TOKEN}', 'Content-Type': 'application/json' } # Send the PATCH request to update the repo response = requests.patch(endpoint, headers=headers, data=json.dumps(payload)) # Check if the request was successful if response.status_code == 200: repo_details = response.json() print('Repository updated successfully:', repo_details) else: print(f'Failed to update repo: {response.status_code} - {response.text}') " Check this playlist for more Data Engineering related videos: https://youtube.com/playlist?list=PLjfRmoYoxpNopPjdACgS5XTfdjyBcuGku Apache Kafka form scratch https://youtube.com/playlist?list=PLjfRmoYoxpNrs0VmIq6mOTqXP52RfZdRf Snowflake Complete Course from scratch with End-to-End Project with in-depth explanation-- https://doc.clickup.com/37466271/d/h/13qc4z-104/d4346819bd8d510 *Explore our vlog channel:* https://www.youtube.com/@funwithourfam/videos Continuous integration and delivery using GitHub Actions in Databricks Databricks CI/CD using Github Actions CI/CD techniques with Git and Databricks Git folders CI/CD with Databricks and GitHub CI/CD techniques with Git and Databricks Repos Developer Best Practices on Databricks 🙏🙏🙏🙏🙏🙏🙏🙏 YOU JUST NEED TO DO 3 THINGS to support my channel LIKE SHARE & SUBSCRIBE TO MY YOUTUBE CHANNEL #databricks #github #versioncontrol #pyspark #cicd