Skip to content

Instantly share code, notes, and snippets.

View mniehoff's full-sized avatar

Matthias Niehoff mniehoff

View GitHub Profile
@mniehoff
mniehoff / DuckDB_in_Databricks.ipynb
Last active April 17, 2025 21:54
How to use DuckDB in Databricks to process data stored in Databricks Unity Catalog. https://www.codecentric.de/wissens-hub/blog/access-databricks-unitycatalog-from-duckdb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mniehoff
mniehoff / databricks_python_library_job_executor.py
Created November 25, 2021 15:57
Example Script to run code that is in python package. Can be used to run Python Packages as Python job on databricks. Use this script as "python_file" and pass the job_module and the job_args as "parameter" like this: [ "--job-module=package.subpackage.module", "--job-method=run_job" ]
import importlib
import argparse
def get_installed_packages():
import pkg_resources
installed_packages = pkg_resources.working_set
return sorted(["%s==%s" % (i.key, i.version) for i in installed_packages])