def auto_track_url(track):
    """
    Automatically sets the bigDataUrl for `track`.

    Requirements:

        * the track must be fully connected, such that its root is a Hub object
        * the root Hub object must have the Hub.url attribute set
        * the track must have the `source` attribute set
    """
    hub = track.root(cls=Hub)

    if hub is None:
        raise ValueError(
            "track is not fully connected because the root is %s" % repr(hub))
    if hub.url is None:
        raise ValueError("hub.url is not set")
    if track.source is None:
        raise ValueError("track.source is not set")