Registry /
data / semantic-link-functions-holidays
Install & Compatibility
Where this runs
tested against v0.14.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✓ 63.25s
py 3.11
✕ build_error
✓ 61.79s
py 3.12
✕ build_error
✓ 59.7s
py 3.13
✕ build_error
✓ 60.83s
py 3.9
✕ build_error
✕ build_error
1434MB installed
● package 1434MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
FabricDataFrame
✓ from sempy.fabric import FabricDataFrame
Semantic functions like `is_holiday` are dynamically exposed as methods on a FabricDataFrame, rather than imported directly. FabricDataFrame itself is imported from `sempy.fabric`.
This quickstart demonstrates how to create a `FabricDataFrame` and use the dynamically exposed `is_holiday` semantic function to determine if a given date is a public holiday in a specified country. The function relies on column metadata to identify relevant date and country columns.
from sempy.fabric import FabricDataFrame
import pandas as pd
# Create a FabricDataFrame with relevant columns and metadata
# In a real Microsoft Fabric environment, FabricDataFrame often comes from reading a Power BI semantic model.
df = FabricDataFrame(
pd.DataFrame({
"country": ["US", "AT", "DE", "US"],
"date": ["2023-01-01", "2023-01-06", "2023-10-03", "2023-07-04"]
}),
column_metadata={
"country": {"data_category": "Country"},
"date": {"data_category": "Date"}
}
)
# The is_holiday function is dynamically exposed if appropriate columns and metadata exist.
# It will return True if the date is a holiday in the given country.
df["is_public_holiday"] = df.is_holiday(col_country="country", col_date="date")
print(df)
Debug
Known issues
gotchaThis library is primarily designed for use within Microsoft Fabric Synapse Data Science notebooks. While parts of `sempy` can be installed standalone, the full integration and benefits of semantic functions are realized in the Fabric environment.fixEnsure you are operating within a Microsoft Fabric notebook for optimal experience, or be aware of the limitations outside of it.
affects: All
gotchaSemantic functions like `is_holiday` are not directly imported but are dynamically exposed as methods on a `FabricDataFrame`. This occurs when the DataFrame contains columns with appropriate data types and metadata (e.g., 'date' and 'country' columns with 'Date' and 'Country' data categories).fixStructure your `FabricDataFrame` with correct column names and metadata categories for functions to become available. Refer to the quickstart for an example.
affects: All
gotchaThe `semantic-link-functions-holidays` package wraps the `holidays` Python package. Any underlying issues, breaking changes, or specific usage patterns related to the `holidays` package might indirectly affect this semantic function.fixConsult the documentation for the `holidays` package if encountering unexpected behavior with holiday calculations.
affects: All
gotchaFor a complete Semantic Link experience, it is often recommended to install the meta-package `semantic-link` (`pip install semantic-link`). This ensures all individual semantic link function packages, including holidays, are installed. Only installing `semantic-link-functions-holidays` will limit available functionality.fixConsider `pip install semantic-link` if you need broader semantic link features beyond just holiday detection.
affects: All
gotchaIn Microsoft Fabric with Spark 3.4 or later, the core `semantic-link` package is preinstalled. However, specific function packages like `semantic-link-functions-holidays` may still need to be explicitly installed or updated to their latest version.fixAlways run `%pip install -U semantic-link` (or the specific function package) in your notebook cell to ensure you have the latest versions of all semantic link components.
affects: >=0.13.0 (when core became preinstalled)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'semantic_link_functions_holidays'
The `semantic-link-functions-holidays` library is not installed in the current Python environment.
fixpip install semantic-link-functions-holidays
ImportError: cannot import name 'is_holiday' from 'semantic_link_functions_holidays'
The `is_holiday` function is not directly exposed at the top level of the `semantic_link_functions_holidays` package; it resides in a submodule.
fixfrom semantic_link_functions_holidays.holiday import is_holiday
AttributeError: 'FabricDataFrame' object has no attribute 'is_holiday'
The `is_holiday` function is not a direct method of the `FabricDataFrame` object but a standalone semantic function designed to operate on a column.
fixfrom semantic_link.functions import is_holiday
fabric_df["IsHoliday"] = is_holiday(fabric_df["DateColumn"])
Upgrade
Version history
0.14.1latest on PyPI · released Apr 29, 2026
Audit
Dependencies
holidaysrequiredCore functionality for holiday detection is provided by this package.
sempyrequiredProvides the core FabricDataFrame data structure and functionality.
pandasrequiredFabricDataFrame is built upon the pandas DataFrame.