pkg-resources

AnalysisException: Path does not exist: dbfs:/databricks/python/lib/python3.7/site-packages/sampleFolder/data;

AnalysisException: Path does not exist: dbfs:/databricks/python/lib/python3.7/site-packages/sampleFolder/data; Question: I am packing the following code in a whl file: from pkg_resources import resource_filename def path_to_model(anomaly_dir_name: str, data_path: str): filepath = resource_filename(anomaly_dir_name, data_path) return filepath def read_data(spark) -> DataFrame: return (spark.read.parquet(str(path_to_model("sampleFolder", "data")))) I confirmed that the whl file contains the parquet files under sampleFolder/data/ directory correctly. When i …

Total answers: 2

Parameters of resource_filename in pkg_resource in python

Parameters of resource_filename in pkg_resource in python Question: I don’t understand how exactly pkg_resource.resource_filename() work and what are its parameters. I searched a lot on web but their official documentation does not cover it well. Can someone explain it? Asked By: Ayush Jain || Source Answers: Here are a few examples. I have wheel 0.24 …

Total answers: 2