API Reference

get_qualified_column_name

monad.ui.target_function.get_qualified_column_name

monad.ui.target_function.get_qualified_column_name(column_name, data_sources_path=None)

Returns correct column name to access the joined attributes in the target function for business scenario.

Example

There are three data sources, 'transactions', 'products' and 'categories'. The join hierarchy is like this:

  • 'categories' table is joined to 'products',
  • 'products' table is joined to 'transactions'.

If we want to use 'category_name' column from 'categories' data_source which was joined in YAML config file, we need to use get_qualified_column_name to qualify the column name as below:

from monad.ui.target_function import get_qualified_column_name

joined_column_name = get_qualified_column_name('category_name', ['products', 'categories'])
Parameters

column_name : str
Name of the attribute column we intend to use in the function


data_sources_path : list[str] | None
Default: None
List representing join hierarchy. It should omit the main data source to which other data sources were joined.

Returns

str