Skip to content

API Reference

All symbols below are importable from the top-level fyrnheim package:

from fyrnheim import Entity, TableSource, PrepLayer, ...
ExportDescription
EntityPydantic model defining a business entity with source, layers, and quality
LayersConfigContainer for all transformation layers on an entity
SourceBase type for all source types
FieldDeclares a required field with name and type on an entity
MaterializationTypeEnum for table materialization strategy (table, view, incremental)
IncrementalStrategyEnum for incremental load strategy
SourcePriorityPriority level for field resolution in identity graphs
ExportDescription
BaseTableSourceBase class for table-backed sources
TableSourceRead from a single warehouse table or local parquet file
DerivedSourceBuild identity graphs by joining multiple entities on a shared key
DerivedEntitySourceReference another entity as a source for derived joins
AggregationSourceAggregate from another entity with GROUP BY
EventAggregationSourceAggregate raw event streams from a table
IdentityGraphConfigConfiguration for identity graph resolution in DerivedSource
IdentityGraphSourceA single source in an identity graph with field mappings
UnionSourceCombine multiple sources into a common schema
SourceTransformsContainer for source-level transforms (casts, renames, etc.)
TypeCastCast a column to a different type
RenameRename a column in the source
DivideDivide a column by a value
MultiplyMultiply a column by a value
ExportDescription
PrepLayerClean raw data: type casts, renames, computed columns
DimensionLayerAdd business logic columns
SnapshotLayerTrack changes over time (daily snapshots, SCD)
ActivityConfigDetect events from state changes
ActivityTypeDefine an activity type with trigger and timestamp
AnalyticsLayerDate-grain metric aggregation
AnalyticsMetricA single metric in an analytics layer
AnalyticsModelConfiguration for analytics model output
AnalyticsSourceSource configuration for analytics
ComputedMetricA metric derived from other metrics
ExportDescription
SourceMappingMap entity field names to source column names
ExportDescription
ComputedColumnA computed column with name and expression
MeasureReusable metric definition for analytics layers
LifecycleFlagsMulti-column component producing is_active, is_churned, etc.
TimeBasedMetricsMulti-column component for tenure and recency
DataQualityChecksBundled quality check patterns for reuse
ExportDescription
QualityConfigContainer for quality checks on an entity
QualityCheckBase class for all quality checks
NotNullCheck that a column has no null values
NotEmptyCheck that a column has no empty strings
InRangeCheck that values fall within a numeric range
InSetCheck that values are in an allowed set
MatchesPatternCheck that values match a regex pattern
ForeignKeyCheck referential integrity against another entity
UniqueCheck that column values are unique
MaxAgeCheck that timestamps are within a maximum age
CustomSQLArbitrary expression that must evaluate to true
QualityRunnerProgrammatic runner for quality checks
CheckResultResult of a single quality check
EntityResultResult of all quality checks for an entity
ExportDescription
hash_emailSHA-256 hash of a lowered, trimmed email
hash_idSHA-256 hash of a column value
hash_md5MD5 hash of a column value
hash_sha256SHA-256 hash of a column value
concat_hashConcatenate columns and hash the result
ExportDescription
date_diff_daysNumber of days between two date columns
date_trunc_monthTruncate a date to the first of the month
date_trunc_quarterTruncate a date to the first of the quarter
date_trunc_yearTruncate a date to the first of the year
days_sinceNumber of days between a date column and today
extract_yearExtract year from a date
extract_monthExtract month from a date
extract_dayExtract day from a date
earliest_dateThe earliest (minimum) date across columns
latest_dateThe latest (maximum) date across columns
ExportDescription
categorizeMap column values to categories via a dictionary
categorize_containsCategorize by substring matching
lifecycle_flagProduce a boolean flag based on column value
boolean_to_intConvert a boolean column to 0/1
ExportDescription
to_json_structParse a JSON string column into a struct
json_extract_scalarExtract a scalar value from JSON
json_valueExtract a value from JSON
ExportDescription
sum_Sum of a column
count_Count of a column
count_distinctCount of distinct values
avg_Average of a column
min_Minimum value
max_Maximum value
row_number_byRow number within a partition
cumulative_sumCumulative sum
lag_valuePrevious row’s value
lead_valueNext row’s value
first_valueFirst value in a window
last_valueLast value in a window
any_valueAny non-null value
ExportDescription
extract_email_domainExtract the domain from an email address
is_personal_email_domainCheck if an email domain is a personal provider
account_id_from_domainDerive an account ID from an email domain
ExportDescription
parse_iso8601_durationParse an ISO 8601 duration string
ExportDescription
generateGenerate transformation code from entity definitions
GenerateResultResult of code generation
IbisCodeGeneratorLow-level code generator for Ibis transforms
runRun all entity pipelines
run_entityRun a single entity pipeline
RunResultResult of running all entity pipelines
EntityRunResultResult of running a single entity pipeline
IbisExecutorLow-level executor for running Ibis transforms
ExecutionResultResult of a single execution step
create_connectionCreate an Ibis backend connection
EntityRegistryRegistry for discovering and managing entities
EntityInfoMetadata about a registered entity
ExportDescription
ExecutionErrorError during pipeline execution
SourceNotFoundErrorSource table or file not found
TransformModuleErrorError loading a generated transform module
FyrnheimEngineErrorBase error class for engine errors
CircularDependencyErrorCircular dependency detected in entity graph