Azure Tutorials
Published in

Azure Tutorials

Create Python Wheel File & Deploy Production pipelines with Python wheel task in Databricks

1. Create wheel file using the VS Code

  1. Install the Visual Studio Code : here
mkdir PythonWheelDemo
cd PythonWheelDemo
code .

Create Setup File

import setuptools

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="ingestion",
version="0.0.1",
author="Sagar Lad",
author_email="azuretutorials@gmail.com",
description="Package to create data ingestion",
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.7',
)

Create Readme File

# Example PackageThis is a simple example package. You can use
[Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
to write your content.

Create Init File

from .ingestion import etl

Create Package Function File

def etl(df, database, table):
database ="meta"
table ="fan"
connection_string=""
df.write()
print(f"Command Executed:")

Install Python Wheel Packages

Install Check Wheel Package

Create & Verify Wheel File

python setup.py bdist_wheel 

2. Data bricks Python Wheel Task

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store