destinations.path_utils
normalize_path_sep
def normalize_path_sep(pathlib: Any, path: str) -> str
Normalizes path in path
separator to one used by pathlib
check_layout
def check_layout(
layout: str,
extra_placeholders: Optional[Dict[str, Any]] = None,
standard_placeholders: Optional[Set[str]] = STANDARD_PLACEHOLDERS
) -> Tuple[List[str], List[str]]
Returns a tuple with all valid placeholders and the list of layout placeholders
Raises: InvalidFilesystemLayout
Returns: a pair of lists of valid placeholders and layout placeholders
create_path
def create_path(layout: str,
file_name: str,
schema_name: str,
load_id: str,
load_package_timestamp: Optional[pendulum.DateTime] = None,
current_datetime: Optional[TCurrentDateTime] = None,
extra_placeholders: Optional[Dict[str, Any]] = None) -> str
create a filepath from the layout and our default params
get_table_prefix_layout
def get_table_prefix_layout(
layout: str,
supported_prefix_placeholders: Sequence[
str] = SUPPORTED_TABLE_NAME_PREFIX_PLACEHOLDERS,
table_needs_own_folder: bool = False) -> str
get layout fragment that defines positions of the table, cutting other placeholders
allowed supported_prefix_placeholders
that may appear before table.