# Not able to use UDF that calls an AIP Logic function in pipeline builder

**URL:** <https://community.palantir.com/t/not-able-to-use-udf-that-calls-an-aip-logic-function-in-pipeline-builder/1799>\
**Category:** Ask the Community\
**Tags:** pipeline-builder, code-repositories, functions, aip-developer-tier\
**Created:** [November 8, 2024, 12:25am UTC](https://community.palantir.com/t/not-able-to-use-udf-that-calls-an-aip-logic-function-in-pipeline-builder/1799 "2024-11-08T00:25:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RajKarri](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/rajkarri/32/260_2.png) [@RajKarri](https://community.palantir.com/u/RajKarri)\
**Post date:** [November 8, 2024, 12:25am UTC](https://community.palantir.com/t/not-able-to-use-udf-that-calls-an-aip-logic-function-in-pipeline-builder/1799/1 "2024-11-08T00:25:01Z")

</div>

I have scenario like this.

1. AIP Logic function
2. Python code repository that makes a call to AIP logic function from step 1

```auto
@function
  def stock_data_classification(input_text: str) -> str:
      response = FoundryClient().ontology.queries.stock_data_classification_agent(input_text)
      return response

```

1. Pipeline builder transform step that uses UDF from step 2

It failed and expecting me to pass hostname to FoundryClient. When I passed hostname, error was like get token failed.

NOTE: Everything is working fine when tested published function directly in code repository.

---

<div class="post-metadata">

**Author:** ![RajKarri](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/rajkarri/32/260_2.png) [@RajKarri](https://community.palantir.com/u/RajKarri)\
**Post date:** [November 8, 2024, 6:50pm UTC](https://community.palantir.com/t/not-able-to-use-udf-that-calls-an-aip-logic-function-in-pipeline-builder/1799/2 "2024-11-08T18:50:10Z")

</div>

It’s not able to resolve hostname.

 ![2024-11-08_12-48](https://canada1.discourse-cdn.com/palantir/original/2X/2/226218cc8e225bee0910c336aa99e30e6f207dcc.png)

---

<div class="post-metadata">

**Author:** ![MattP](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@MattP](https://community.palantir.com/u/MattP)\
**Post date:** [November 11, 2024, 10:30am UTC](https://community.palantir.com/t/not-able-to-use-udf-that-calls-an-aip-logic-function-in-pipeline-builder/1799/3 "2024-11-11T10:30:54Z")

</div>

Can you describe in general terms what your AIP Logic function does? Would it be possible to replicate its functionality using a _Use LLM_ block in Pipeline Builder?

---

<div class="post-metadata">

**Author:** ![RajKarri](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/rajkarri/32/260_2.png) [@RajKarri](https://community.palantir.com/u/RajKarri)\
**Post date:** [November 11, 2024, 4:42pm UTC](https://community.palantir.com/t/not-able-to-use-udf-that-calls-an-aip-logic-function-in-pipeline-builder/1799/4 "2024-11-11T16:42:17Z")

</div>

Yeap. I’m settled for Use LLM in PB for now. My logic extracts data and labels them. I can’t repurpose this in other places as I put this in one pipeline.

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [April 17, 2025, 10:02pm UTC](https://community.palantir.com/t/not-able-to-use-udf-that-calls-an-aip-logic-function-in-pipeline-builder/1799/5 "2025-04-17T22:02:25Z")

</div>

Automatically bumped on April 17, 2025, 10:02pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [January 6, 2026, 6:16pm UTC](https://community.palantir.com/t/not-able-to-use-udf-that-calls-an-aip-logic-function-in-pipeline-builder/1799/6 "2026-01-06T18:16:44Z")

</div>

Automatically bumped on January 6, 2026, 6:16pm UTC


