TCC – ORA-01791: not a SELECTed expression

Love running into this error. What happens here is that I’m doing an export and I want it to return distinct rows and I want to sort it by a date, but I’ve modified the date to format it how I want to see it. For some reason when we preventDuplicates=”true” it sees that the date (having been converted) as not a selected expression.

So the trick is, on your sorting, you have to use the same custom function toChar to get it to sort by the order you want it to. Kind of a pain but in the end of the equation it makes sense that both the projection and the sort by are the same, too bad you can’t just use the alias…


TCC – Static Level Decode

This is for when you’re trying to list out location1, location2, etc…
Much easier to build as a complex projection but then the GUI converts it so you have to start from scratch to change.

<quer:projection alias="LocationLevel1" xmlns:quer="http://www.taleo.com/ws/integration/query">
        <quer:decode>
            <quer:field path="JobInformation,PrimaryLocation,Level"/>
            <quer:string>1</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Name"/>
            <quer:string>2</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Parent,Name"/>
            <quer:string>3</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Parent,Parent,Name"/>
            <quer:string>4</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Parent,Parent,Parent,Name"/>
            <quer:string>5</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Parent,Parent,Parent,Parent,Name"/>
        </quer:decode>
</quer:projection>

<quer:projection alias="LocationLevel2" xmlns:quer="http://www.taleo.com/ws/integration/query">
        <quer:decode>
            <quer:field path="JobInformation,PrimaryLocation,Level"/>
            <quer:string>1</quer:string>
            <quer:string/>
            <quer:string>2</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Name"/>
            <quer:string>3</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Parent,Name"/>
            <quer:string>4</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Parent,Parent,Name"/>
            <quer:string>5</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Parent,Parent,Parent,Name"/>
        </quer:decode>
</quer:projection>

<quer:projection alias="LocationLevel3" xmlns:quer="http://www.taleo.com/ws/integration/query">
        <quer:decode>
            <quer:field path="JobInformation,PrimaryLocation,Level"/>
            <quer:string>1</quer:string>
            <quer:string/>
            <quer:string>2</quer:string>
            <quer:string/>
            <quer:string>3</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Name"/>
            <quer:string>4</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Parent,Name"/>
            <quer:string>5</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Parent,Parent,Name"/>
        </quer:decode>
</quer:projection>

<quer:projection alias="LocationLevel4" xmlns:quer="http://www.taleo.com/ws/integration/query">
        <quer:decode>
            <quer:field path="JobInformation,PrimaryLocation,Level"/>
            <quer:string>1</quer:string>
            <quer:string/>
            <quer:string>2</quer:string>
            <quer:string/>
            <quer:string>3</quer:string>
            <quer:string/>
            <quer:string>4</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Name"/>
            <quer:string>5</quer:string>
            <quer:field path="JobInformation,PrimaryLocation,Parent,Name"/>
        </quer:decode>
</quer:projection>

TCC – WorkActionNumber

If you’ve ever tried to get at the requisition history, you’ll be aware of the WorkActionNumber that tells you what the event in the history is. The big issue is that even if you do an export on this table, it doesn’t give you all the elements (I have no idea why).
So here is the list in it’s full glory for your reference pleasure:

Read More


TCC – T-XML Subquery

So I’ve got a T-XML export from the requisition entity that needs to have the posting date on it. So I just created everything from the export to the SourcingRequest entity and all is good. Well not really, the destination folks that receive the file didn’t want to recode it on their side. So to make a long story short, here is how you pull the most recent open date in this situation from the requisition entity.

<quer:projection alias="LatestPostingDate" projectedValueType="string" projectedField="RuntimeString:LatestPostingDate" xmlns:quer="http://www.taleo.com/ws/integration/query">
	<quer:query projectedClass="SourcingRequest" alias="sqPostingDate" preventDuplicates="true" pagingsize="1">
		<quer:projections>
			<quer:projection alias="PostDate">
				<quer:maximum>
					<quer:customFunction name="TO_CHAR">
						<quer:field path="OpenDate"/>
						<quer:string>yyyy-MM-dd</quer:string>
					</quer:customFunction>
				</quer:maximum>
			</quer:projection>
		</quer:projections>
		<quer:filterings>
			<quer:filtering>
				<quer:equal>
					<quer:field path="Requisition,Number"/>
					<quer:field ownerQuery="PhenomExport" path="Number"/>
				</quer:equal>
			</quer:filtering>
		</quer:filterings>
	</quer:query>
</quer:projection>

TCC – Referencing a User-defined Field Explicitly in an Import File

I ran across this and thought that it was odd. On a candidate import, instead of using the standard field Prefix, we were needing to target a user defined selection elements named Prefix. The error being returned was the following:

Error Detail:
Code: internal
Description: A general internal error occurred.
Reason: Relation “Prefix” not found for the entity “Candidate” in the product pack
The error occurred in the following step: Prepare Import
The corresponding code for this error in version 1.0 would have been: -1

It was odd because one is a field and the other a selection. The fix can be found in Doc ID 1047706.1 on the MOS.
Basically to explicitly declare a user defined field/selection, you need to prefix CustomField: to the field name in order to specify you’re speaking of a custom field. So Prefix,Description becomes CustomField:Prefix,Description and the error is solved.

Update:
This post isn’t as clear as it should be so here’s a better example. Let’s say you have a custom field in experience that’s called ReasonForLeaving. This is a custom field that is the same as the standard field called ReasonForLeaving. The reasons why it’s named the same are not important what is, is calling the right field:
Standard field would be:
TalentUser,Profile,Experiences,ReasonForLeaving
Custom field would be:
TalentUser,Profile,Experiences,CustomField:ReasonForLeaving

So make sure the ‘CustomField:’ declaration is for the field and not the reference location.



TCC – File Attachment Location by Candidate Visiblity

File attachments are (of course) part and parcel of integration tasks. One of the things that needs to be understood is the difference between candidate visible attachments and candidate non-visible attachments.
This comes into play in two scenerios. Exporting candidate attachments and exporting application attachments as each case has candidate visible/non-visible attachments.

So to document where each is here is the breakdown:
CANDIDATE
If you’re only looking to pull candidate visible attachments, these are located here: Candidate,AttachedFiles,FileContent
To pull both candidate visible/non-visible attachments, those are located here: Candidate,TalentUser,Profile,AttachedFiles,FileContent
APPLICATION
If you’re only looking to pull candidate visible attachments, these are located here: Application,AttachedFiles,FileContent
To pull both candidate visible/non-visible attachments, those are located here: Application,ProfileInformation,AttachedFiles,FileContent


TCC – Application Motive

So one of the more painful points of pulling application data is to get at the motive. It’s hard because the motive is literally buried in the history of the application profile. Here’s a complex projection that can help with the excruciating process.

<quer:projection alias="CSWMotive" xmlns:quer="http://www.taleo.com/ws/integration/query">
  <quer:query projectedClass="Application" alias="sqMotives" preventDuplicates="true" pagingsize="1">
    <quer:projections>
      <quer:projection alias="Motive">
        <quer:field path="ProfileInformation,HistoryItems,ApplicationTrackingCSWItem.CSWMotives,Mnemonic"/>
      </quer:projection>
    </quer:projections>
    <quer:filterings>
      <quer:filtering>
        <quer:equal>
          <quer:field path="Number"/>
          <quer:field ownerQuery="MainQuery" path="Number"/>
        </quer:equal>
      </quer:filtering>
      <quer:filtering>
        <quer:equal>
          <quer:field path="ProfileInformation,HistoryItems,ApplicationTrackingCSWItem.Step,Mnemonic"/>
          <quer:field ownerQuery="MainQuery" path="CSWLatestStep,Mnemonic"/>
        </quer:equal>
      </quer:filtering>
      <quer:filtering>
        <quer:equal>
          <quer:field path="ProfileInformation,HistoryItems,ApplicationTrackingCSWItem.Status,Mnemonic"/>
          <quer:field ownerQuery="MainQuery" path="CSWLatestStatus,Mnemonic"/>
        </quer:equal>
      </quer:filtering>
      <quer:filtering>
        <quer:equal>
          <quer:field path="ProfileInformation,HistoryItems,ApplicationTrackingCSWItem.Reverted"/>
          <quer:boolean>false</quer:boolean>
        </quer:equal>
      </quer:filtering>
      <quer:filtering>
        <quer:equal>
          <quer:field path="ProfileInformation,HistoryItems,ApplicationTrackingHistoryItem.CreationDate"/>
          <quer:query projectedClass="Application" alias="sqMaxDate" preventDuplicates="true" pagingsize="1">
            <quer:projections>
              <quer:projection alias="Motive">
                <quer:maximum>
                  <quer:field path="ProfileInformation,HistoryItems,ApplicationTrackingHistoryItem.CreationDate"/>
                </quer:maximum>
              </quer:projection>
            </quer:projections>
            <quer:filterings>
              <quer:filtering>
                <quer:equal>
                  <quer:field path="Number"/>
                  <quer:field ownerQuery="MainQuery" path="Number"/>
                </quer:equal>
              </quer:filtering>
              <quer:filtering>
                <quer:equal>
                  <quer:field path="ProfileInformation,HistoryItems,ApplicationTrackingCSWItem.Step,Mnemonic"/>
                  <quer:field ownerQuery="MainQuery" path="CSWLatestStep,Mnemonic"/>
                </quer:equal>
              </quer:filtering>
              <quer:filtering>
                <quer:equal>
                  <quer:field path="ProfileInformation,HistoryItems,ApplicationTrackingCSWItem.Status,Mnemonic"/>
                  <quer:field ownerQuery="MainQuery" path="CSWLatestStatus,Mnemonic"/>
                </quer:equal>
              </quer:filtering>
              <quer:filtering>
                <quer:equal>
                  <quer:field path="ProfileInformation,HistoryItems,ApplicationTrackingCSWItem.Reverted"/>
                  <quer:boolean>false</quer:boolean>
                </quer:equal>
              </quer:filtering>
            </quer:filterings>
          </quer:query>
        </quer:equal>
      </quer:filtering>
    </quer:filterings>
  </quer:query>
</quer:projection>

TCC – TALEO_HOST vs TALEO_ZONE

As you know a lot of times it’s extremely helpful to have the zone designation on a export file title so you know exactly what zone it came out of. I find this really helpful in cases where you’re pulling UDSElements.
Here’s how these two variables work:
TALEO_HOST – Gives the full URL of the zone (e.g. ptrthinktalent.taleo.net)
TALEO_ZONE – Gives only the zone portion of the URL (e.g. ptrthinktalent) so the taleo.net is assumed.


TCC – Min Mid & Max Salaries

The minimum, mid-point and maximum salaries are fairly important things that come up when importing requisitions or on new hire exports. So this should be a simple process to identify right? I mean there should be a MinimumSalary, MidPointSalary and a MaximumSalary, it’s a no brainer or so one would think.

Unfortunately a naming convention like this would make things too easy and that’s just not allowed. So for posterity I’ve listed these to keep me from banging my head against the wall next time I need them (from the requisition entity):

MinimumSalary – JobInformation,OfferParameter,PayValue
MidPointSalary – JobInformation,MidPointSalary
MaximumSalary – JobInformation,OfferParameter,MaximumSalary


TCC – EEO Question Update

So there are times when you’re loading candidates and you want to bring in the EEO that’s been answered in another system. The MOS has an article on how to answer one question, but what if you want to answer more than one?

Create a file called CandidateDiversityAnswerUpdate_ld.xml

Add the following XML to the file:

<?xml version="1.0" encoding="UTF-8"?>
<load:load productCode="RC1502" model="http://www.taleo.com/ws/tee800/2009/01" root="Candidate" operation="merge" locale="en" header="true" delimiter="," quote=""" xmlns:load="http://www.taleo.com/ws/integration/load">
    <load:columns>
        <load:column parameter="1" type="DATA" path="EmailAddress" searchType="SEARCH_AND_VALUE" searchTarget="." localeType="NONE"/>
        <load:column parameter="1" type="DATA" path="FirstName" localeType="NONE"/>
        <load:column parameter="1" type="DATA" path="LastName" localeType="NONE"/>
        <load:column parameter="1" type="DATA" path="DiversityAnswers,PossibleAnswer,Question,Code" searchType="SEARCH" searchTarget=".." entityMarker="true" entityTarget="../.." localeType="NONE"/>
        <load:column parameter="1" type="DATA" path="DiversityAnswers,PossibleAnswer,Sequence" searchType="SEARCH" searchTarget="." localeType="NONE"/>
        <load:column parameter="1" type="DATA" path="DiversityAnswers,PossibleAnswer,Question,Code" searchType="SEARCH" searchTarget=".." entityMarker="true" entityTarget="../.." localeType="NONE"/>
        <load:column parameter="1" type="DATA" path="DiversityAnswers,PossibleAnswer,Sequence" searchType="SEARCH" searchTarget="." localeType="NONE"/>
    </load:columns>
    <load:processingInstructions/>
</load:load>