Semantic Link Functions - Validators is a Python library that extends Microsoft FabricDataFrames with semantic validation capabilities. It provides built-in functions for validating common data types such as email addresses and credit card numbers, leveraging the underlying 'validators' Python package. This library is part of the broader Microsoft Fabric semantic link ecosystem, enabling enhanced data quality within data science workflows in Fabric notebooks. It is actively maintained, with the current version being 0.14.0.
pip install semantic-link-functions-validatorsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `semantic-link-functions-validators` to validate email addresses and credit card numbers within a `FabricDataFrame`. The validation functions (`is_email`, `is_credit_card`) are called directly as methods on the DataFrame series. This example is designed for use within a Microsoft Fabric notebook environment where `FabricDataFrame` is available and semantic link is active.
Downgrade pandas to a version below 3.0, or ensure you are using a compatible version of 'semantic-link' (e.g., semantic-link >= 0.13.1 or semantic-link-sempy >= 0.9.4) which includes a fix. Alternatively, install 'semantic-link-sempy' instead of the full 'semantic-link' meta-package if you only need core SemPy functionalities and individual function packages.
For full functionality and integration, run this library within a Microsoft Fabric notebook. Ensure the appropriate Fabric runtime (Spark 3.4+) is used, where 'semantic-link' may be preinstalled or easily updated.
Check Microsoft Fabric documentation for current authentication best practices. Consider downgrading the `semantic-link-sempy` package to a stable version (e.g., 0.9.3 was mentioned as a workaround in some cases) or ensuring the workspace environment is correctly configured to provide valid tokens.
Install the package using pip: `pip install semantic-link-functions-validators`
Ensure 'semantic-link' is installed and enable the default extension for pandas DataFrames: `import semantic_link; semantic_link.enable_default_extension()`. Alternatively, use `from semantic_link.fabric import FabricDataFrame`.
Access the validation function through the 'sl' accessor: `df.sl.is_email('email_column')`