Skip to content

Examples of how to use Foundational Lineage API

Notifications You must be signed in to change notification settings

foundational-io/lineage-api-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lineage API Examples

This repository contains example code for using the Foundational Lineage API. You can run the examples either directly on your local machine or within a Docker container.

Getting Started

Clone the Repository

To get started, clone this repository to your local machine:

git clone https://github.com/foundational-io/lineage-api-examples.git
cd lineage-api-examples

Create an API Token

Before running the examples, you need an API token. Follow the instructions here to generate your API key: Creating an API Token

Configure Your API Credentials

Update the following variables in the main.py file under hello_lineage_graph folder:

ENTITY_NAME = "table_name_to_search_for"
API_KEY_ID = "your_api_key_id"
API_KEY_SECRET = "your_api_key_secret"

Running the Example Code

You can run the example in two ways: directly on your machine or within Docker.

Option 1: Run Without Docker

  1. Install the required dependencies:
    pip install -r requirements.txt
  2. Run the example script:
    python hello_lineage_graph/main.py

Option 2: Run Within Docker

  1. Build the Docker image:
    docker build -t lineage-api-example .
  2. Run the container:
    docker run --rm lineage-api-example

Option 3: Use MCP Server

This repository includes an MCP server implementation that provides convenient access to the Foundational API. To use it:

  1. Install the MCP package:

    pip install mcp
  2. Test that the server is running correctly by executing:

    mcp run /path/to/lineage-api-examples/mcp/foundational_mcp_server.py
  3. Configure the MCP server in your AI assistant settings (e.g., Claude). Add the following configuration, replacing the paths and API credentials with your own:

    {
      "mcpServers": {
        "FoundationalRamp": {
          "command": "/path/to/your/python/mcp",
          "args": [
            "run",
            "/path/to/lineage-api-examples/mcp/foundational_mcp_server.py"
          ],
          "env": {
            "FOUNDATIONAL_API_KEY": "your-api-key",
            "FOUNDATIONAL_API_SECRET": "your-api-secret"
          }
        }
      },
      "globalShortcut": ""
    }

The MCP server provides tools for searching entities, getting entity details, and exploring upstream/downstream dependencies through your AI assistant.

Additional Resources

Support

If you have any questions, please contact [email protected].

About

Examples of how to use Foundational Lineage API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •