class_docstr: Constructs a link to monitor a pipeline run in Azure Synapse.
docstr: Extracts the workspace_name, subscription_id and resource_group from the Synapse workspace url.
  
  :param workspace_url: The workspace url.
docstr_tok: ["Extracts","the","workspace_name",",","subscription_id","and","resource_group","from","the","Synapse","workspace","url",".",":","param","workspace_url",":","The","workspace","url","."]
code: def get_fields_from_url(self, workspace_url):
      """
      Extracts the workspace_name, subscription_id and resource_group from the Synapse workspace url.
  
      :param workspace_url: The workspace url.
      """
      import re
      from urllib.parse import unquote, urlparse
  
      pattern = r"https://web\.azuresynapse\.net\?workspace=(.*)"
      match = re.search(pattern, workspace_url)
  
      if not match:
          raise ValueError(
              f"Invalid workspace URL format, expected match pattern {pattern!r}."
          )
  
      extracted_text = match.group(1)
      parsed_url = urlparse(extracted_text)
      path = unquote(parsed_url.path)
      path_segments = path.split("/")
      if (len_path_segments := len(path_segments)) < 5:
          raise ValueError(
              f"Workspace expected at least 5 segments, but got {len_path_segments}."
          )
  
      return {
          "workspace_name": path_segments[-1],
          "subscription_id": path_segments[2],
          "resource_group": path_segments[4],
      }
  
imports: from __future__ import annotations
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Sequence
  from urllib.parse import urlencode
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.models import BaseOperator, BaseOperatorLink, XCom
  from airflow.providers.microsoft.azure.hooks.synapse import AzureSynapseHook, AzureSynapsePipelineHook, AzureSynapsePipelineRunException, AzureSynapsePipelineRunStatus, AzureSynapseSparkBatchRunStatus
label_desc: Use image node_id 1 for calling the AzureSynapsePipelineRunLink obj's underlying member method code with example usage: obj.get_fields_from_url(workspace_url) and returns: dict