Module Import alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad Str body Expr Str ImportFrom alias If CompareIn Str NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Lambda arguments args NameParam defaults IfExp CompareGtE NameLoad NameLoad BinOpSub NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Lambda arguments args NameParam defaults IfExp CompareLtE NameLoad NameLoad BinOpSub NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Lambda arguments args NameParam defaults IfExp CompareLt NameLoad NameLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad If CompareIs NameLoad NameLoad body Return Call AttributeLoad Call NameLoad NameLoad keyword NameLoad attr If NameLoad body Return Call AttributeLoad Call NameLoad NameLoad keyword NameLoad attr orelse Return Call AttributeLoad Call NameLoad NameLoad keyword NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str Str body Expr Str ImportFrom alias If CompareIn Str NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore ListComp SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr Index Num comprehension NameStore NameLoad If CompareIn NameLoad NameLoad body Return NameLoad orelse Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str comprehension NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr decorator_list
N/A N/A datetime max_partition N/A N/A table schema field filter metastore_conn_id N/A default None None metastore_default N/A N/A 
    Gets the max partition for a table.

    :param schema: The hive schema the table lives in
    :type schema: string
    :param table: The hive table you are interested in, supports the dot
        notation as in "my_database.my_table", if a dot is found,
        the schema param is disregarded
    :type table: string
    :param hive_conn_id: The hive connection you are interested in.
        If your default is set you don't need to use this parameter.
    :type hive_conn_id: string
    :param filter: filter on a subset of partition as in
        `sub_part='specific_value'`
    :type filter: string
    :param field: the field to get the max value from. If there's only
        one partition field, this will be inferred

    >>> max_partition('airflow.static_babynames_partitioned')
    '2015-01-01'
     airflow.hooks HiveMetastoreHook N/A N/A . table N/A N/A N/A schema table N/A N/A table split . N/A hh N/A HiveMetastoreHook metastore_conn_id metastore_conn_id N/A N/A N/A hh max_partition schema schema table_name table field field filter filter N/A _closest_date N/A N/A target_dt date_list before_target N/A None N/A N/A 
    This function finds the date in a list closest to the target date.
    An optional parameter can be given to get the closest before or after.

    :param target_dt: The target date
    :type target_dt: datetime.date
    :param date_list: The list of dates to search
    :type date_list: datetime.date list
    :param before_target: closest before or after the target
    :type before_target: bool or None
    :returns: The closest date
    :rtype: datetime.date or None
     N/A fb N/A N/A N/A d N/A N/A N/A d target_dt N/A d target_dt N/A N/A datetime timedelta max N/A fa N/A N/A N/A d N/A N/A N/A d target_dt N/A d target_dt N/A N/A datetime timedelta min N/A fnone N/A N/A N/A d N/A N/A N/A d target_dt N/A target_dt d N/A d target_dt N/A N/A before_target None N/A N/A N/A N/A N/A min date_list key fnone date N/A before_target N/A N/A N/A N/A N/A min date_list key fb date N/A N/A N/A N/A N/A min date_list key fa date N/A closest_ds_partition N/A N/A table ds before schema metastore_conn_id N/A True default metastore_default N/A N/A 
    This function finds the date in a list closest to the target date.
    An optional parameter can be given to get the closest before or after.

    :param table: A hive table name
    :type table: str
    :param ds: A datestamp ``%Y-%m-%d`` e.g. ``yyyy-mm-dd``
    :type ds: datetime.date list
    :param before: closest before (True), after (False) or either side of ds
    :type before: bool or None
    :returns: The closest date
    :rtype: str or None

    >>> tbl = 'airflow.static_babynames_partitioned'
    >>> closest_ds_partition(tbl, '2015-01-02')
    '2015-01-01'
     airflow.hooks HiveMetastoreHook N/A N/A . table N/A N/A N/A schema table N/A N/A table split . N/A hh N/A HiveMetastoreHook metastore_conn_id metastore_conn_id N/A partitions N/A N/A hh get_partitions schema schema table_name table N/A N/A partitions N/A N/A None N/A part_vals N/A N/A N/A list N/A N/A p values N/A 0 N/A p partitions N/A N/A ds part_vals N/A N/A ds N/A N/A parts N/A N/A N/A N/A datetime datetime strptime pv %Y-%m-%d N/A pv part_vals N/A target_dt N/A N/A N/A datetime datetime strptime ds %Y-%m-%d N/A closest_ds N/A _closest_date target_dt parts before_target before N/A N/A N/A closest_ds isoformat N/A