> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Run the Salesforce Data 360 Pipeline Connector Externally

> Use YAML to configure the Salesforce Data 360 pipeline connector for Data Streams, Calculated Insights, and Data Transforms, including status and lineage.

export const CodePanel = ({children, fileName = 'config.yaml', showLineNumbers = false}) => {
  const codePanelRef = useRef(null);
  const codeContentRef = useRef(null);
  const isProgrammaticScroll = useRef(false);
  const hoverTimeout = useRef(null);
  useEffect(() => {
    let tries = 0;
    const wrapLines = () => {
      const root = codeContentRef.current;
      if (!root) return;
      const pres = Array.from(root.querySelectorAll('pre'));
      if (!pres.length) {
        if (tries++ < 20) requestAnimationFrame(wrapLines);
        return;
      }
      let globalLine = 1;
      pres.forEach(pre => {
        const code = pre.querySelector('code') || pre;
        if (!code || code.dataset.wrapped === 'true') return;
        const raw = code.textContent || '';
        let lines = raw.split('\n');
        while (lines[0] === '') lines.shift();
        while (lines[lines.length - 1] === '') lines.pop();
        code.innerHTML = lines.map(line => {
          const ln = globalLine++;
          const num = showLineNumbers ? `<span class="line-number">${ln}</span>` : '';
          const safe = line.replace(/</g, '&lt;').replace(/>/g, '&gt;') || ' ';
          return `<span class="code-line" data-line="${ln}">${num}${safe}</span>`;
        }).join('');
        code.dataset.wrapped = 'true';
      });
    };
    wrapLines();
  }, [children, showLineNumbers]);
  useEffect(() => {
    const panel = codePanelRef.current;
    const content = codeContentRef.current;
    if (!panel || !content) return;
    const waitForLines = () => {
      const codeLines = content.querySelectorAll('.code-line');
      if (!codeLines.length) {
        requestAnimationFrame(waitForLines);
        return;
      }
      setupHighlighting(codeLines);
    };
    const setupHighlighting = codeLines => {
      const layout = panel.closest('.split-layout');
      const sections = layout.querySelectorAll('.content-section');
      const parseLines = str => {
        if (!str) return [];
        const out = [];
        str.split(',').forEach(p => {
          if (p.includes('-')) {
            const [s, e] = p.split('-').map(Number);
            for (let i = s; i <= e; i++) out.push(i);
          } else {
            const n = Number(p);
            if (!isNaN(n)) out.push(n);
          }
        });
        return out;
      };
      const clearHighlight = () => {
        codeLines.forEach(l => l.classList.remove('highlighted'));
      };
      const highlight = lines => {
        clearHighlight();
        lines.forEach(n => {
          const el = content.querySelector(`.code-line[data-line="${n}"]`);
          if (el) el.classList.add('highlighted');
        });
      };
      const scrollToLines = lines => {
        if (!lines.length) return;
        const first = lines[0];
        const targetLine = lines.length > 1 ? first : lines[0];
        const el = content.querySelector(`.code-line[data-line="${targetLine}"]`);
        if (!el) return;
        isProgrammaticScroll.current = true;
        const containerRect = content.getBoundingClientRect();
        const elRect = el.getBoundingClientRect();
        const offset = elRect.top - containerRect.top + content.scrollTop;
        const TOP_PADDING = 16;
        content.scrollTo({
          top: Math.max(offset - TOP_PADDING, 0),
          behavior: 'smooth'
        });
        setTimeout(() => {
          isProgrammaticScroll.current = false;
        }, 200);
      };
      const activate = (section, scroll) => {
        if (section.classList.contains('active')) return;
        sections.forEach(s => s.classList.remove('active'));
        section.classList.add('active');
        const lines = parseLines(section.dataset.lines);
        highlight(lines);
        if (scroll) scrollToLines(lines);
      };
      const observer = new IntersectionObserver(entries => {
        if (isProgrammaticScroll.current) return;
        entries.forEach(e => {
          if (e.isIntersecting) activate(e.target, false);
        });
      }, {
        threshold: 0.3,
        rootMargin: '-80px 0px -40% 0px'
      });
      sections.forEach(section => {
        observer.observe(section);
        section.addEventListener('click', () => activate(section, true));
        section.addEventListener('mouseenter', () => {
          clearTimeout(hoverTimeout.current);
          hoverTimeout.current = setTimeout(() => activate(section, true), 80);
        });
      });
      if (sections[0]) activate(sections[0], false);
    };
    waitForLines();
  }, []);
  const handleCopy = e => {
    const btn = e.currentTarget;
    const codeLines = codeContentRef.current?.querySelectorAll('.code-line');
    if (!codeLines || codeLines.length === 0) return;
    const text = Array.from(codeLines).map(line => {
      const clone = line.cloneNode(true);
      const lineNumber = clone.querySelector('.line-number');
      if (lineNumber) lineNumber.remove();
      return clone.textContent;
    }).join('\n');
    if (!text) return;
    navigator.clipboard.writeText(text).then(() => {
      btn.dataset.copied = 'true';
      setTimeout(() => btn.dataset.copied = 'false', 1500);
    });
  };
  return <div className="code-panel" ref={codePanelRef}>
      <div className="code-header">
        {fileName}
        <button className="copy-btn" aria-label="Copy full code" data-copied="false" onClick={handleCopy}>
          <svg className="icon-copy" viewBox="0 0 15 16" fill="currentColor">
            <path d="M10.113 3.124H2.205C1.463 3.124.86 3.655.86 4.31v10.005c0 .654.603 1.186 1.345 1.186h7.908c.742 0 1.345-.532 1.345-1.186V4.31c0-.655-.606-1.186-1.345-1.186Z" />
            <path d="M13.138.5H5.229c-.742 0-1.344.531-1.344 1.186 0 .23.209.414.47.414s.47-.184.47-.414c0-.197.182-.357.404-.357h7.909c.223 0 .404.16.404.357V11.69c0 .196-.181.356-.404.356-.262 0-.47.184-.47.415 0 .23.208.415.47.415.742 0 1.344-.532 1.344-1.186V1.686C14.482 1.03 13.88.5 13.138.5Z" />
          </svg>

          <svg className="icon-check" viewBox="0 0 20 20" fill="currentColor">
            <path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-7.25 7.25a1 1 0 01-1.414 0l-3.25-3.25a1 1 0 011.414-1.414l2.543 2.543 6.543-6.543a1 1 0 011.414 0z" clipRule="evenodd" />
          </svg>
        </button>
      </div>

      <div className="code-content" ref={codeContentRef}>
        {children}
      </div>
    </div>;
};

export const ContentSection = ({id, title, lines, children}) => <div className="content-section" data-content-id={id} data-lines={lines}>
    {title && <h4>{title}</h4>}
    {children}
  </div>;

export const ContentPanel = ({children}) => <div className="content-panel">{children}</div>;

export const CodePreview = ({children}) => {
  const [instanceId] = useState(() => `preview-${Math.random().toString(36).slice(2)}`);
  useEffect(() => {
    const nav = document.querySelector('nav') || document.querySelector('header') || document.querySelector('[class*="nav"]');
    if (nav) {
      document.documentElement.style.setProperty('--navbar-height', `${nav.offsetHeight}px`);
    }
  }, []);
  return <div className="split-layout" data-preview-id={instanceId}>
      {children}
    </div>;
};

export const ConnectorDetailsHeader = ({name, icon, stage, availableFeatures, unavailableFeatures = [], availableFeaturesCollate = []}) => {
  const showSubHeading = availableFeatures?.length > 0 || unavailableFeatures?.length > 0 || availableFeaturesCollate?.length > 0;
  const totalAvailableFeatures = [...availableFeatures || [], ...availableFeaturesCollate || []];
  return <div className="container">
      <div className="Heading">
        <div className="flex items-center gap-3">
          {icon && <div className="IconContainer">
              <img src={icon} alt={name} noZoom className="ConnectorIcon" />
            </div>}
          <h1 className="ConnectorName">{name}</h1>
          <span className={`StageBadge ${stage === 'PROD' ? 'prod' : 'beta'}`}>
            {stage}
          </span>
        </div>
      </div>
      {showSubHeading && <div className="SubHeading">
          <div className="FeaturesHeading">Feature List</div>
          <div className="FeaturesList">
            {totalAvailableFeatures.map(feature => <div className="FeatureTag AvailableFeature" key={feature}>
                ✓ {feature}
              </div>)}
            {unavailableFeatures.map(feature => <div className="FeatureTag UnavailableFeature" key={feature}>
                ✕ {feature}
              </div>)}
          </div>
        </div>}
    </div>;
};

<ConnectorDetailsHeader icon="/public/images/connectors/data360.png" name="Salesforce Data 360 Pipeline" stage="BETA" availableFeatures={["Pipelines", "Pipeline Status", "Lineage", "Tags"]} unavailableFeatures={["Owners"]} />

Use this guide to configure the Salesforce Data 360 pipeline connector.

Configure and run Salesforce Data 360 workflows externally with YAML. Metadata, lineage, and Pipeline Status require separate workflows:

* [Requirements](#requirements)
* [Metadata Ingestion](#metadata-ingestion)

## How to Run the Connector Externally

To run the Ingestion via the UI you'll need to use the OpenMetadata Ingestion Container, which comes shipped with
custom Airflow plugins to handle the workflow deployment.

If, instead, you want to manage your workflows externally on your preferred orchestrator, you can check
the following docs to run the Ingestion Framework **anywhere**.

<Columns cols={2}>
  <Card title="External Schedulers" href="/v2.1.x-SNAPSHOT/deployment/ingestion">
    Get more information about running the Ingestion Framework Externally
  </Card>
</Columns>

## Requirements

OpenMetadata connects to Salesforce Data 360 through the Salesforce REST API using a **connected app** that authenticates with the OAuth 2.0 client credentials flow. Configure a connected app for the client credentials flow. The app provides the **Consumer Key** and **Consumer Secret**. Grant the app the **Manage Data Cloud** and **Access Data Cloud APIs** scopes. Give the integration user permission to view the Data Streams, Calculated Insights, and Data Transforms you want to ingest. To resolve lineage, ingest the Salesforce Data 360 database first and point `data360DbServiceName` to that service.

### Python Requirements

Use a Python version supported by the `openmetadata-ingestion` package that matches your OpenMetadata server. To find the supported range for your release, check the `Requires-Python` metadata of that release’s ingestion package.

To run the Salesforce Data 360 pipeline ingestion, install:

```bash theme={null}
pip3 install "openmetadata-ingestion[data360pipeline]"
```

## Metadata Ingestion

All connectors are defined as JSON Schemas. See the
[Data360 pipeline connection JSON Schema](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/pipeline/data360PipelineConnection.json)
for the structure used to create a Salesforce Data 360 connection.
To create and run a metadata ingestion workflow, create a YAML configuration.
The configuration connects to the source, processes entities if needed, and reaches the OpenMetadata server.
The workflow is modeled around the following
[JSON Schema](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/metadataIngestion/workflow.json).

### 1. Define the YAML Config

This sample config runs the Metadata workflow for Salesforce Data 360. It creates pipeline definitions and tags, but doesn't ingest lineage or Pipeline Status.

<CodePreview>
  <ContentPanel>
    <ContentSection id={1} title="Source Configuration" lines="1-6">
      Configure the source type and service name for your Salesforce Data 360 connector.
    </ContentSection>

    <ContentSection id={2} title="Consumer Key" lines="7">
      **consumerKey**: The consumer key from your Salesforce connected app. This is the client identifier used for OAuth authentication.
    </ContentSection>

    <ContentSection id={3} title="Consumer Secret" lines="8">
      **consumerSecret**: The consumer secret from your Salesforce connected app. This is the client secret used for OAuth authentication.
    </ContentSection>

    <ContentSection id={4} title="Salesforce API Version" lines="9">
      **salesforceApiVersion**: The Salesforce REST API version to call. Defaults to `63.0`. Change this only if your Salesforce org requires a different version.
    </ContentSection>

    <ContentSection id={5} title="Salesforce Domain" lines="10">
      **salesforceDomain**: The domain of your Salesforce instance, used to build the login URL. Defaults to `login`. Use `test` for a sandbox, or your My Domain subdomain for a custom domain.
    </ContentSection>

    <ContentSection id={6} title="Data 360 Database Service Name" lines="11">
      **data360DbServiceName**: The name of the Salesforce Data 360 database service in OpenMetadata to use for lineage resolution. Set this to the service you created with the Data 360 database connector so pipeline lineage can link to the right tables.
    </ContentSection>

    <ContentSection id={7} title="Service Mapping" lines="12">
      **serviceMapping**: A JSON object mapping a Data 360 connector or data source name to the OpenMetadata service that holds it, used to resolve the upstream table of a Data Stream. For example: `{"S3_Connector": "my-s3-service"}`. Defaults to `{}`.
    </ContentSection>

    <ContentSection id={8} title="Include Bulk Lineage" lines="13">
      **includeBulkLineage**: When enabled, OpenMetadata also ingests lineage from Data Lake Objects to Data Model Objects for every data space. This walks all Data Model Objects in the configured Data 360 database service, so it's off by default.
    </ContentSection>

    <ContentSection id={9} title="Pagination Limit" lines="14">
      **paginationLimit**: How many Data 360 objects to request per page when listing pipeline objects. Defaults to `10`. Valid values are `1`–`200`.
    </ContentSection>

    <ContentSection id={10} title="Source Config" lines="15-34">
      The `sourceConfig` is defined [here](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/metadataIngestion/pipelineServiceMetadataPipeline.json):

      * **dbServiceNames**: Database Service Name for the creation of lineage, if the source supports it.
      * **includeTags**: Set the **Include Tags** toggle to control whether to include tags as part of metadata ingestion.
      * **includeUnDeployedPipelines**: Set the **Include UnDeployed Pipelines** toggle to control whether to include un-deployed pipelines as part of metadata ingestion. By default it is set to `true`.
      * **markDeletedPipelines**: Set the **Mark Deleted Pipelines** toggle to flag pipelines as soft-deleted if they are not present anymore in the source system.
      * **pipelineFilterPattern** and **chartFilterPattern**: Note that the `pipelineFilterPattern` and `chartFilterPattern` both support regex as include or exclude.
      * **includeOwners**: Set the **Include Owners** toggle to control whether to include owners to the ingested entity if the owner email matches with a user stored in the OM server as part of metadata ingestion. If the ingested entity already exists and has an owner, the owner will not be overwritten. It supports boolean values either `true` or `false`.
      * **overrideLineage**: Set the **Override Lineage** toggle to control whether to override the existing lineage. It supports boolean values either `true` or `false`.
      * **overrideMetadata**: Set the **Override Metadata** toggle to control whether to override the existing metadata in the OpenMetadata server with the metadata fetched from the source. If the toggle is set to true, the metadata fetched from the source will override the existing metadata in the OpenMetadata server. If the toggle is set to false, the metadata fetched from the source will not override the existing metadata in the OpenMetadata server. This is applicable for fields like description, tags, owner, and displayName. It supports boolean values either `true` or `false`.
    </ContentSection>

    <ContentSection id={11} title="Sink Configuration" lines="35-37">
      To send the metadata to OpenMetadata, it needs to be specified as `type: metadata-rest`.
    </ContentSection>

    <ContentSection id={12} title="Workflow Configuration" lines="38-54">
      The main property here is `openMetadataServerConfig`, where you can define the host and security provider of your OpenMetadata installation.

      * **loggerLevel**: Specify the logger level depending on your needs. If you are troubleshooting an ingestion, use `DEBUG` for more detailed traces.
      * **JWT token**: JWT tokens allow clients to authenticate against the OpenMetadata server. See [Enable JWT Tokens](/deployment/security/enable-jwt-tokens) and [JWT Troubleshooting](/deployment/security/jwt-troubleshooting) for more information.
      * **storeServiceConnection**: If set to `true` (default), sensitive information is stored encrypted with the Fernet Key or externally if you have configured a [Secrets Manager](/deployment/secrets-manager). If set to `false`, the service is created, but the service connection information is only used by the Ingestion Framework at runtime and is not sent to the OpenMetadata server.
      * **SSL configuration**: If you have added SSL to the [OpenMetadata server](/deployment/security/enable-ssl), configure the certificates for ingestion. Set `verifySSL` to `ignore`, or set it to `validate` and provide `sslConfig.caCertificate` with a local path to the server certificate. See [SSL Troubleshooting](/deployment/security/enable-ssl/ssl-troubleshooting) for more information.
      * **ingestionPipelineFQN**: Fully qualified name of the ingestion pipeline, used to identify the current ingestion pipeline.
    </ContentSection>
  </ContentPanel>

  <CodePanel fileName="data360pipeline_config.yaml">
    ```yaml theme={null}
    source:
      type: data360pipeline
      serviceName: local_data360_pipeline
      serviceConnection:
        config:
          type: Data360Pipeline
          consumerKey: <consumer key>  # REQUIRED
          consumerSecret: <consumer secret>  # REQUIRED
          # salesforceApiVersion: "63.0"
          # salesforceDomain: login
          # data360DbServiceName: <data360 database service name>
          # serviceMapping: '{"S3_Connector": "my-s3-service"}'
          # includeBulkLineage: false
          # paginationLimit: 10
    ```

    ```yaml theme={null}
      sourceConfig:
        config:
          type: PipelineMetadata
          # lineageInformation:
          #   dbServiceNames: []
          #   storageServiceNames: []
          # markDeletedPipelines: True
          # includeTags: True
          # includeLineage: true
          # includeUnDeployedPipelines: true
          # pipelineFilterPattern:
          #   includes:
          #     - pipeline1
          #     - pipeline2
          #   excludes:
          #     - pipeline3
          #     - pipeline4
          # includeOwners: true # false
          # overrideLineage: false # true
          # overrideMetadata: false # true
    ```

    ```yaml theme={null}
    sink:
      type: metadata-rest
      config: {}
    ```

    ```yaml theme={null}
    workflowConfig:
      loggerLevel: INFO  # DEBUG, INFO, WARNING or ERROR
      openMetadataServerConfig:
        hostPort: "http://localhost:8585/api"
        authProvider: openmetadata
        securityConfig:
          jwtToken: "{bot_jwt_token}"
        ## Store the service Connection information
        storeServiceConnection: true  # false
        ## Secrets Manager Configuration
        # secretsManagerProvider: aws, azure or noop
        # secretsManagerLoader: airflow or env
        ## If SSL, fill the following
        # verifySSL: validate  # or ignore
        # sslConfig:
        #   caCertificate: /local/path/to/certificate
    # ingestionPipelineFQN: <service name>.<ingestion name> ## e.g., "my_redshift.metadata"
    ```
  </CodePanel>
</CodePreview>

### 2. Configure the Lineage Workflow

Lineage is not part of the Metadata workflow. Run a separate workflow with source type `data360pipeline-lineage`. Use the same service name and connection values as the Metadata workflow.

`data360DbServiceName` is required for this workflow. The workflow fails if it is unset because the connector cannot resolve Data 360 objects to OpenMetadata tables. `includeBulkLineage` also runs only in this Lineage workflow.

```yaml theme={null}
source:
  type: data360pipeline-lineage
  serviceName: local_data360_pipeline
  serviceConnection:
    config:
      type: Data360Pipeline
      consumerKey: <consumer key>  # REQUIRED
      consumerSecret: <consumer secret>  # REQUIRED
      data360DbServiceName: <data360 database service name>  # REQUIRED FOR LINEAGE
      # serviceMapping: '{"S3_Connector": "my-s3-service"}'
      # includeBulkLineage: false
  sourceConfig:
    config:
      type: PipelineMetadata

sink:
  type: metadata-rest
  config: {}

workflowConfig:
  loggerLevel: INFO
  openMetadataServerConfig:
    hostPort: "http://localhost:8585/api"
    authProvider: openmetadata
    securityConfig:
      jwtToken: "{bot_jwt_token}"
```

### 3. Configure the Pipeline Status Workflow

Pipeline Status is not part of the Metadata workflow. Run a separate Usage workflow with source type `data360pipeline-usage`. Despite its workflow name in the UI, this agent ingests pipeline run status. It doesn't ingest query usage.

```yaml theme={null}
source:
  type: data360pipeline-usage
  serviceName: local_data360_pipeline
  serviceConnection:
    config:
      type: Data360Pipeline
      consumerKey: <consumer key>  # REQUIRED
      consumerSecret: <consumer secret>  # REQUIRED
  sourceConfig:
    config:
      type: PipelineMetadata
      statusLookbackDays: 1

sink:
  type: metadata-rest
  config: {}

workflowConfig:
  loggerLevel: INFO
  openMetadataServerConfig:
    hostPort: "http://localhost:8585/api"
    authProvider: openmetadata
    securityConfig:
      jwtToken: "{bot_jwt_token}"
```

### 2. Run with the CLI

First, we will need to save the YAML file. Afterward, and with all requirements installed, we can run:

```bash theme={null}
metadata ingest -c <path-to-yaml>
```

Note that from connector to connector, this recipe will always be the same. By updating the YAML configuration,
you will be able to extract metadata from different sources.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.