TableAsset
class great_expectations.datasource.fluent.sql_datasource.TableAsset(*, name: str, type: Literal['table'] = 'table', id: Optional[uuid.UUID] = None, order_by: List[great_expectations.datasource.fluent.interfaces.Sorter] = None, batch_metadata: Dict[str, Any] = None, splitter: Optional[Union[great_expectations.datasource.fluent.sql_datasource.SplitterColumnValue, great_expectations.datasource.fluent.sql_datasource.SplitterMultiColumnValue, great_expectations.datasource.fluent.sql_datasource.SplitterDividedInteger, great_expectations.datasource.fluent.sql_datasource.SplitterModInteger, great_expectations.datasource.fluent.sql_datasource.SplitterYear, great_expectations.datasource.fluent.sql_datasource.SplitterYearAndMonth, great_expectations.datasource.fluent.sql_datasource.SplitterYearAndMonthAndDay, great_expectations.datasource.fluent.sql_datasource.SplitterDatetimePart]] = None, table_name: str = '', schema_name: Optional[str] = None)#
- add_splitter_column_value(column_name: str)Self #
Associates a column value splitter with this sql asset. :param column_name: A column name of the column to split on.
- Returns
This sql asset so we can use this method fluently.
add_splitter_datetime_part(column_name: str, datetime_parts: List[str]) Self #
Associates a datetime part splitter with this sql asset. :param column_name: Name of the date column where parts will be parsed out. :param datetime_parts: A list of datetime parts to split on, specified as DatePart objects or as their string equivalent e.g. “year”, “month”, “week”, “day”, “hour”, “minute”, or “second”
- Returns
This sql asset so we can use this method fluently.
add_splitter_divided_integer(column_name: str, divisor: int) Self #
Associates a divided integer splitter with this sql asset. :param column_name: A column name of the column to split on. :param divisor: The divisor to use when splitting.
- Returns
This sql asset so we can use this method fluently.
add_splitter_mod_integer(column_name: str, mod: int) Self #
Associates a mod integer splitter with this sql asset. :param column_name: A column name of the column to split on. :param mod: The mod to use when splitting.
- Returns
This sql asset so we can use this method fluently.
- add_splitter_multi_column_values(column_names: list[str])Self #
Associates a multi column value splitter with this sql asset. :param column_names: A list of column names to split on.
- Returns
This sql asset so we can use this method fluently.
- add_splitter_year(column_name: str)