def METHOD_NAME(
        source: Source,
        table_schema: DbTableSchema,
        database_name: Optional[str] = None
):
    return Dataset(
        name=Dataset._to_name(
            schema_name=table_schema.schema_name,
            table_name=table_schema.table_name.name,
            database_name=database_name
        ),
        source=source,
        fields=[
            # We want to maintain column order using ordinal position.
            Field.from_column(column) for column in sorted(
                table_schema.columns, key=lambda x: x.ordinal_position
            )
        ]
    )