class_docstr: Class for handling FeatureProcessor S3 Artifact Lineage
class_docstr_tok: ["Class","for","handling","FeatureProcessor","S3","Artifact","Lineage"]
docstr: Load or create the FeatureProcessor Pipeline's raw data Artifact.
  
  Arguments:
      raw_data (Union[CSVDataSource, ParquetDataSource, BaseDataSource]): The raw data to be
          retrieved.
      sagemaker_session (Session): Session object which manages interactions
          with Amazon SageMaker APIs and any other AWS services needed. If not specified, the
          function creates one using the default AWS configuration chain.
  
  Returns:
      Artifact: The raw data artifact.
docstr_tok: ["Load","or","create","the","FeatureProcessor","Pipeline","'s","raw","data","Artifact",".","Arguments",":","raw_data","(","Union","[","CSVDataSource",",","ParquetDataSource",",","BaseDataSource","]",")",":","The","raw","data","to","be","retrieved",".","sagemaker_session","(","Session",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed",".","If","not","specified",",","the","function","creates","one","using","the","default","AWS","configuration","chain",".","Returns",":","Artifact",":","The","raw","data","artifact","."]
code: def retrieve_raw_data_artifact(
      raw_data: Union[CSVDataSource, ParquetDataSource, BaseDataSource],
      sagemaker_session: Session,
  ) -> Artifact:
      """Load or create the FeatureProcessor Pipeline's raw data Artifact.
  
      Arguments:
          raw_data (Union[CSVDataSource, ParquetDataSource, BaseDataSource]): The raw data to be
              retrieved.
          sagemaker_session (Session): Session object which manages interactions
              with Amazon SageMaker APIs and any other AWS services needed. If not specified, the
              function creates one using the default AWS configuration chain.
  
      Returns:
          Artifact: The raw data artifact.
      """
      raw_data_uri = (
          raw_data.s3_uri
          if isinstance(raw_data, (CSVDataSource, ParquetDataSource))
          else raw_data.data_source_unique_id
      )
      raw_data_artifact_name = (
          "sm-fs-fe-raw-data"
          if isinstance(raw_data, (CSVDataSource, ParquetDataSource))
          else raw_data.data_source_name
      )
  
      load_artifact: ArtifactSummary = (
          S3LineageEntityHandler._load_artifact_from_s3_uri(
              s3_uri=raw_data_uri, sagemaker_session=sagemaker_session
          )
      )
      if load_artifact is not None:
          return S3LineageEntityHandler.load_artifact_from_arn(
              artifact_arn=load_artifact.artifact_arn,
              sagemaker_session=sagemaker_session,
          )
  
      return S3LineageEntityHandler._create_artifact(
          s3_uri=raw_data_uri,
          artifact_type="DataSet",
          artifact_name=raw_data_artifact_name,
          sagemaker_session=sagemaker_session,
      )
  
imports: from __future__ import absolute_import
  import logging
  from typing import Union, Optional, List
  from sagemaker import Session
  from sagemaker.feature_store.feature_processor import CSVDataSource, ParquetDataSource, BaseDataSource
  from sagemaker.feature_store.feature_processor.lineage._feature_processor_lineage_name_helper import _get_feature_processor_schedule_lineage_artifact_name, _get_feature_processor_trigger_lineage_artifact_name
  from sagemaker.feature_store.feature_processor.lineage._pipeline_schedule import PipelineSchedule
  from sagemaker.feature_store.feature_processor.lineage._pipeline_trigger import PipelineTrigger
  from sagemaker.feature_store.feature_processor.lineage._transformation_code import TransformationCode
  from sagemaker.feature_store.feature_processor.lineage.constants import TRANSFORMATION_CODE_STATUS_ACTIVE, FEP_LINEAGE_PREFIX, TRANSFORMATION_CODE_ARTIFACT_NAME
  from sagemaker.lineage.artifact import Artifact, ArtifactSummary
label_desc: Use image node_id 1 for calling the S3LineageEntityHandler obj's underlying member method code with example usage: obj.retrieve_raw_data_artifact(raw_data, sagemaker_session) and returns: S3LineageEntityHandler, S3LineageEntityHandler