Using my SQL scripts in data schema expression | Community
Skip to main content
Heku_
Level 5
August 2, 2023
Solved

Using my SQL scripts in data schema expression

  • August 2, 2023
  • 2 replies
  • 966 views

Hello, I would like to use this function:

In the data schema declaration like this:

<attribute expr="GetEmailPreDomain('prefix@xxx.xxx')" label="x" name="x"
type="string"/>

So its value is "prefix"

 

How can I do this?

Thank you in advance.

@Manoj_Kumar_ @ParthaSarathy @Parvesh_Parmar @DavidKangni 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Amine_Abedour

Hello @heku_,

 

Please referre to this documentation to do what you want to do : 

https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/api/adding-additional-sql-functions.html?lang=en

 

Br,

Amine

2 replies

ParthaSarathy
Community Advisor
Community Advisor
August 2, 2023

Hi @heku_ ,

Try this expression,

expr="Substring(@email,0 ,Length(@email)-Length(GetEmailDomain(@email)))"

<attribute expr="Substring(@email,0 ,Length(@email)-Length(GetEmailDomain(@email)))" label="Email Prefix" name="emailPrefix" type="string"/>

Disconnect & Reconnect.

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
Heku_
Heku_Author
Level 5
August 3, 2023

Thank you, but i need to do more complex things, like doing a SELECT x FROM actual table order by x DESC LIMIT 1

Amine_Abedour
Community Advisor
Amine_AbedourCommunity AdvisorAccepted solution
Community Advisor
August 3, 2023
Amine ABEDOUR