Example of Script Mapping

How do you write a script with the following mapping?

If amount = 0 then card member target to IGNORE the case, map it to himself.

I have this so far, but no luck

account = fdmRow.getString ("ACCOUNT")

quantity = fdmRow.getString ("AMOUNT")

If (amount) == 0:

fdmResult = 'IGNORE '.

on the other

fdmResult = account

Hello

What error do you get?

After missing colon (:) on the other.

Also, you have found the AMOUNT as string so you should cast as float

I hope that this script should work:

account = fdmRow.getString ("ACCOUNT")

quantity = float (fdmRow.getString ("AMOUNT"))

If amount == 0:

    fdmResult = 'IGNORE '.

Another thing:

    fdmResult = account

Tags: Business Intelligence

Similar Questions

  • Script mapping problem

    Hello experts,

    I am quite new to FDM and Iv'e tried to write a script of simple conditional mapping without success. for my dimension entity, in most cases, the source is ths same as target, although there are some cases where this doesn't apply and have to go to a NA_Entity. For example:

    SOURCE TARGET

    PE00_0001 PE00_0001

    PE00_0002 PE00_0002

    PE00_0003 PE00_0003

    AL00_0001 NA_Entity

    PE00_0004 PE00_0004

    CO_HWE NA_Entity

    PE00_0005 PE00_0005

    ......

    As you can see, all the source entities that start with "PE" are equal to the entity target and any other entity not starting not not by PE must be mapped to 'NA_Entity '. I think it's quite inefficient to keep an explicit plan, so we decided to create a conditional mapping script (does not work yet) which reads as follows:

    If left (varValues (15), 2) = "PE".

    Result = varValues (15)

    Another result = "NA_Entity."

    Whenever I try to import a file I get away:

    Error: An error occurred importing the file.

    Details: Invalid as Clause: for card size (ENTITY) and rule (Peps)

    ERROR:

    Code............................................. 4026

    Description... Not valid as Clause: for card size (ENTITY) and rule (Peps)

    Process... clsImpProcessMgr.fLoadAndProcessFile

    The component... upsWObjectsDM

    Version.......................................... 1112

    Thread........................................... 5416

    IDENTIFICATION:

    User............................................. admin

    Name of the computer... CTARESULDESA2

    App Name......................................... INT_IECI

    Client App....................................... WebClient

    CONNECTION:

    Provider......................................... SQLOLEDB

    Database server... 10.228.128.168

    Name of the database... FDM_INTIECI

    Trust connect... Fake

    Connect status... Open connection

    GLOBALS:

    Location......................................... Argentina-EP

    Location ID... 758

    Location Seg... 3

    Category......................................... Reales

    ID of the category... 13

    Period........................................... Nov - 2013

    Period ID........................................ 2013 11-30

    POV Local........................................ Fake

    Language......................................... 1033

    User Level....................................... 1

    All Partitions... True

    Is Auditor....................................... Fake

    I followed the guide to script and Iv'e I tried several scripts, all without success. The only solution I found is now an explicit plan where 99% of the elements map to themselves and the other card by 1% in "NA_Entity", not very friendly.

    Thank you very much for your help

    Santiago Ruiz.

    You don't mention what version of FDM, you work with, but there should be no need for the script.

    Explicit mappings are the most efficient from a performance point of view, but account given what you want to achieve, then, all you need are two 'Like' mapping entries.

    the first will be mapping EP * EP * and the mapping of the second entry * to "NA_Entity" to pick up all the other codes.

    Otherwise if you treat millions of records and have a performance problem, an alternative may be to change the type of no "PE" recorded with a script on the import format, but I think that both records should be the easiest.

  • FDM Script Mapping

    Hi Experts,

    I'm thinking about the best way to handle some mappings of FDM. All of our current mappings are explicit individual mappings. However, there are some entities and accounts we would card differently now.

    Example:

    If any of these entities...
    Entities
    1001
    1002
    1003
    1004
    1005
    Map this account to this account...
    Accounts
    1234 > 5678
    4321 > 8765
    1111 > 2222

    We are looking for a little less than 500 possible combinations of entities and account (we have thousands of accounts and entities in total) and I want to find the way the most optimized to go about this. I know there are a lot of considerations based on the order in which dimensions/map types and impact on overall performance. I have considered using If/Then cross-dimensional scripts, but I am concerned about performance issues. Also, if it's the best route is it possible to mount several (10 +) If/Then condition in one script? Any insight/recommendations would be greatly appreciated. Thanks in advance!

    See you soon!

    You can get what you want to use the standard mappings if you concatanate code account and entity as the source for the account dimension value code in your import format for example Account_Entity. Then...

    (1) for all your explicit existing maps simply modify them as cards by adding a * generic until the end, keeping the same target
    (2) for all your exceptions where the entity determines target (the 500 you have identified) add explicit maps based on the value of source full concatanated.

    This approach will be more efficient that cross the three-dimensional mapping and will involve much less effort to implement and maintain as you already most of the mappings in place and all changes can be quickly imnplemented to change existing mappings in an excel template or re-import in the mapping tables

  • Example of Script for UCCX 8.5 deployment for a scenario of office help

    Hi all

    I'm looking to implement UCCX 8.5 initially for our help desk call center.   I wanted to see if anyone had an example script that I would be able to watch.

    The scenario is an extension of the calling party calls 3333

    The message that you have reached the IT Helpdesk

    Press 1 for a State of the system systems

    Press 2 to speak to a support Office Specialist, if all agents number our busy he would turn outward, outward services.

    Press 3 for more specific support questions.

    Any help would be greatly appreciated.

    This is a high-level script that does what you want.  You would need to change the details of how you want it to work, but this should help you in the right direction.

  • Need an example of script for the waiting time expected

    Hello

    Does anyone have an example script that they can send me that indicates how and where to use statistical control of get and how to generate a prompt to read a message to a caller who says what is the waiting period?

    Thank you

    Chuck

    [email protected] / * /.

    There is a position in the queue thing.

    First you stor in the parameter value and then read it...

    My modified script which should explain is attached. You can actually use, but must change that I deleted my customer info.

    Please note so useful.

    Thank you

    Barnes.

  • Using wildcard characters in the Script Map

    Hi everyone, im new in FDM and I have some doubts on mapping scripts.

    I have to recreate this translation in FDM Hyperion rule:

    ACC_SAP tm_sap Reverse sign UD4
    N21099Z300 {NULL} FAKE CD1
    D31199Z000 {NULL} FAKE CD1
    ???? 99 * FAKE CD

    ACC_SAP is the account of the source
    TM_SAP will be loaded UD5 (as looking up)

    How can I manage with a similar mapping?

    I guess the use of the script, but im not sure how to use wildcards wildcard in scripts, is - it possible?

    Another related issue, in an explicit mapping, how can I manage with NULL values if I want to assign [none] value, what I have to insert the value NULL into the field source th?

    BR and thanks

    As long as you're using wildcards in the source and them pointing to a single account, you can do all that you have demonstrated. All this is done directly in the similar table. No script is needed.

    ??? 99 * goes to the HFM_99 or whatever your target.

  • Change of REPORT in a Script Map

    Is it possible to change the current sheet in the REPORT, using a script?

    I have 9 leaves in the REPORT, each with different cards on them and try to update the axis minimum and maximum values x for all 9 sheets. This is part of an automated process of data communication.

    I'm confused, because if I record the process of change a parameter in Sheet1, and then on the sheet 2, it applies the changes, in order, for only 1 sheet. There is nothing in the script to tell DIAdem to switch from the current sheet.

    Any help would be greatly appreciated.

    Try changing the "GraphSheetCurrNo" variable, it's the active sheet.

  • Select all the script maps

    Hi all

    Hoping someone out there can help, I need my script to end with one of the following 3 options:

    Select all: as in "cmd one"

    Select all the objects on the layer "Tabs".

    Select all the objects with the Script title boxes"tabs".

    Reason being, when the script ends I need a bunch of boxes to be pre-selected loan for a manual deselect by 1 point (chosen by the user) and then they Deletes selected objects manually to finish. (I didn't understand my original script here as has no impact on the autonomous part I need for the final selection)

    Hoping that this is a simple script but as it is rare to have a script of object selection and not do something with them, I think it's impossible to create.

    Thank you, Bren

    Read the object model and you will find that the equivalent script Cmnd + A is as follows:

    app.selection = null;
    pItems = app.windows[0].activeSpread.pageItems;
    app.select (pItems, SelectionOptions.ADD_TO);
    

    To select all items in the layer tab page, filter the items in the page:

    app.selection = null;
    pItems = app.windows[0].activeSpread.pageItems;
    
    for (i = pItems.length-1; i >= 0; i--) {
      if (pItems[i].itemLayer.name === 'Tab') {
        app.select (pItems[i], SelectionOptions.ADD_TO);
      }
    }
    

    To select objects with a certain script label is a variant of the (or an addition to) the second script.

    Peter

  • The HTML output to the existing script maps help

    I found a script that had a lot of things that I needed. I have since deleted stuff we didn't need and added some other stuff that we need. The result is good, but now I want to turn this into a page in HTML and it gets an error. Any help would be greatly appreciated. I'm pretty good with PowerShell to be somewhat dangerous with things.

    $Cluster = 'CLUS-1'
    $ClusterName = Get-Cluster $Cluster
    $Datastores = $ClusterName | Get-Datastore | Where {$_.Name -notlike '*LOCAL'  -and $_.Name -notlike 'VM_Datastore*' -and $_.Name -notlike 'Templates' -and $_.Name -notlike 'ISO' -and $_.Name -notlike '*SCRATCH*' -and $_.Name -notlike 'Archive'}
    $Clusters = Get-View -ViewType ComputeResource | Where {$_.Name -like $ClusterName.Name}
    
    $Clusters | % {
    $Cluste                      = $_
    $VMHostsView                 = $null
    $VMHostsView                 = Get-View $Cluste.Host -Property Name, Hardware, Config
    $VMss                        = $ClusterName | Get-VM
    $HostCount                   = ($VMHostsView | Measure-Object).Count
    $VMCount                     = 0 + ($VMss | Measure-Object).Count
    $VMsPerHost                  = [Math]::Round(($VMCount/$HostCount), 1)
    $vCPU                        = 0 + ($VMss | Measure-Object -Sum -Property NumCPU).Sum
    $allocatedram                = 0 + ($VMss | Measure-Object -Sum -Property MemoryGB).Sum
    $avgrampervm                 = [Math]::Round(($allocatedram/$VMCount), 1)
    $pCPUSocket                  = ($VMHostsView | % { $_.Hardware.CPUInfo.NumCpuPackages } | Measure-Object -Sum).Sum
    $TpCPUSocket                += $pCPUSocket
    $pCPUCore                    = ($VMHostsView | % { $_.Hardware.CPUInfo.NumCpuCores } | Measure-Object -Sum).Sum
    $vCPUPerpCPUCore             = [Math]::Round(($vCPU/$pCPUCore), 1)
    $TotalClusterRAMGB           = [Math]::Round((Get-Cluster $Cluster | Get-VMHost | % { $_ } | Measure-Object -Property MemoryTotalGB -Sum).Sum)
    $TotalClusterRAMusageGB      = [Math]::Round((Get-Cluster $Cluster | Get-VMHost | % { $_ } | Measure-Object -Property MemoryUsageGB -Sum).Sum)
    $TotalClusterRAMUsagePercent = [Math]::Round(($TotalClusterRAMusageGB/$TotalClusterRAMGB)*100)
    $TotalClusterRAMFreeGB       = [Math]::Round(($TotalClusterRAMGB-$TotalClusterRAMUsageGB))
    $TotalClusterRAMReservedGB   = [Math]::Round(($TotalClusterRAMGB/100)*15)
    $TotalClusterRAMAvailable    = [Math]::Round(($TotalClusterRAMFreeGB-$TotalClusterRAMReservedGB))
    $newvmcountram               = [Math]::Round(($TotalClusterRAMAvailable/$avgrampervm))
    $DSCount                     = 0 + ($datastores | Measure-Object).Count
    $TotalDSCapacityGB           = 0 + [Math]::Round((($datastores | Measure-Object -Sum -Property CapacityGB).Sum), 0)
    $TotalDSFreeGB               = 0 + [Math]::Round((($datastores | Measure-Object -Sum -Property FreespaceGB).Sum), 0)
    $TotalDSUsedGB               = [Math]::Round(($TotalDSCapacityGB - $TotalDSFreeGB),0)
    $allocatedstorage            = 0 + ($VMss | Measure-Object -Sum -Property ProvisionedSpaceGB).Sum
    $avgstoragepervm             = [Math]::Round(($allocatedstorage/$VMCount), 1)
    $newvmcountstorage           = [Math]::Round(($TotalDSFreeGB/$avgstoragepervm))
    
    New-Object PSObject |
    Add-Member -Pass NoteProperty "Cluster Name" $ClusterName.Name |
    Add-Member -Pass NoteProperty "Cluster - Host Count" $HostCount |
    Add-Member -Pass NoteProperty "Cluster - VM Count" $VMCount |
    Add-Member -Pass NoteProperty "Cluster - VM per Host" $VMsPerHost |
    Add-Member -Pass NoteProperty "Compute - Number of pCPU" $TpCPUSocket |
    Add-Member -Pass NoteProperty "Compute - pCPU per Core" $pCPUCore |
    Add-Member -Pass NoteProperty "Compute - Number of vCPU" $VCPU |
    Add-Member -Pass NoteProperty "Compute - vCPU per pCore" $vcpuperpcpucore |
    Add-Member -Pass NoteProperty "Compute - Total Memory (GB)" $TotalClusterRAMGB |
    Add-Member -Pass NoteProperty "Compute - Total Memory Used (%)" $TotalClusterRAMUsagePercent |
    Add-Member -Pass NoteProperty "Compute - Total Memory Used (GB)" $TotalClusterRAMusageGB |
    Add-Member -Pass NoteProperty "Compute - Total Memory Free (GB)" $TotalClusterRAMfreeGB |
    Add-Member -Pass NoteProperty "Compute - Total Memory Allocated (GB)" $TotalClusterRAMReservedGB |
    Add-Member -Pass NoteProperty "Compute - RAM Available for NEW VMs (GB)" $TotalClusterRAMAvailable |
    Add-Member -Pass NoteProperty "Compute - Average RAM allocated per VM" $avgrampervm |
    Add-Member -Pass NoteProperty "Compute - Remaining VMs based on available RAM" $newvmcountram |
    Add-Member -Pass NoteProperty "Storage - Datastore Count" $DSCount |
    Add-Member -Pass NoteProperty "Storage - Total Datastore Capacity (GB)" $TotalDSCapacityGB |
    Add-Member -Pass NoteProperty "Storage - Total Datastore Free (GB)" $TotalDSFreeGB |
    Add-Member -Pass NoteProperty "Storage - Total Datastore Used (GB)" $TotalDSUsedGB |
    Add-Member -Pass NoteProperty "Storage - Average storage allocated per VM" $avgstoragepervm |
    
    
    Add-Member -Pass NoteProperty "Compute - Remaining VMs based on available storage" $newvmcountstorage
    }
    

    {on the last line of the script after} add below line

    | ConvertTo-Html | Out-file c:\log.html

  • script maps powered network

    Hello all I have a problem I use see planner to deploy some related clones and my office is 32-bit Windows xp for some reason any the

    E1000 network adapter do not check connected start and connect to power on when the gold statue has these options selected before cloning.

    So I have to manually check these options on the desktop "there are 300 of them" someone at - it a script I can run to check these options if I don't manually

    must be done?

    Thanks I hope someone has something that they could share with me.

    Try something like this

    Get-Cluster -Name MyCluster | Get-VM rdclient* | Get-NetworkAdapter | where {!$_.ConnectionState.StartConnected} |Set-NetworkAdapter -Connected:$true -StartConnected:$true -Confirm:$false
    
  • Adobe story - film script has only one model. Why? For example the script TV has more models.

    Adobe story - film script has only one model. Why?

    Hello

    With TV, we found that all productions has a different format and that's why we added some samples formats that have been requested. With the Film, the format is better to be in a standard format (which we are in our model of film).

    Kind regards

    Sunny

  • help strengthen the existing script maps

    So I tried initially comes to loop through all the files but could not understand so I made sure that I could pass the file as a parameter, but ideally, I want it to all virtual machines without having to enter all the settings. Any ideas on the best way to do this? I want to the csv files for each folder with all the attributes that are customized for each virtual machine contained in.

    ##Variables

    Param ($param1)

    $report = @)

    $folders = get-file $Param1 # | name sort

    ############################################################################################

    ###########################

    ForEach ($folder in $folders)

    {

    $vms = get-vm-location $folder

    ForEach ($vm to $vms)

    {

    $ReportObj = "" | Select "File", "Virtual Machine", "POC", "Username", "Password",

    $ReportObj. "" Folder "= $folder.name

    $ReportObj. "' Virtual Machine ' = $vm.name

    $ReportObj. "' POC ' = $vm. CustomFields

    $ReportObj. "' Username ' = $vm. CustomFields

    $ReportObj. "' Password ' = $vm. CustomFields

    $Report += $ReportObj

    $csvfile = "D:\". "$folder".csv ".

    $report | Export-CSV $csvfile - NoTypeInformation

    }

    }

    The Get-FolderPath filter returns anything you put in the $row.

    Then if you add additional properties, they will be in the CSV files.

    For example, the following version adds the Notes property and all of the custom attributes

    filter Get-FolderPath {
         $vmImpl = $_
         $_ | Get-View | % {
              $row = "" | select Name, Path, Notes
              $row.Name = $_.Name
    
              $current = Get-View $_.Parent
              $path = ""
              do {
                   $parent = $current
                   if($parent.Name -ne "vm"){$path = $parent.Name + "\" + $path}
                   $current = Get-View $current.Parent
              } while ($current.Parent -ne $null)
              $row.Path = $path
              $row.Notes = $vmImpl.Description
              $vmImpl.CustomFields.GetEnumerator() | %{
                   $row | Add-Member -Name $_.Key -Value $_.Value -MemberType NoteProperty
              }
              $row
         }
    }
    
    Get-VM | Get-FolderPath | Group-Object -Property Path | %{$_.Group | Export-Csv ("C:\" + ($_.Name.TrimEnd("\")).Replace("\","-") + ".csv")}
    

    This version also solves the problem with the file name of the CSV files which was leaking.

  • Coldfusion script mapping

    Hi all

    I have a my site under a directory outside the C:\InetPub\wwwroot CFIDE dishes is stored.
    the site is C:\Sites\mysite\html\
    Everything works fine except that cfmenu, etc. work dosent. Same thing with debugging.
    This problem started when moving to CF8.
    I also tried to copy the html on the wwwroot directory and all works well here. So there must be a problem with the maps I belive.

    It drives me crazy

    All the best

    BosseP

    In IIS, you must create a virtual directory named "CFIDE" for the Web site that uses C:\Sites\mysite\html\. Just that it points to C:\InetPub\wwwroot\CFIDE and all should start working.

  • How to check the user POV period and year in the mapping script?

    Hello

    I want to use information from period and the year in the script map.

    for example: if I load the March data, I use Custom 3 Q1 dimension. So I want to check my active period of user POV in my C3 automatically mapping as in the Import Script, something like this:

    Select the option get Month (dblPerKey)

    Cases 1 to 3

    Result = Q1

    Box of 4 to 6

    Result = Q2

    ......

    The test results with dblPerKey:

    It seems that if I use the Script to Import, then dblPerKey contains the value, but when you use the script to map, then dblPerKey is empty. At least when I tested this script returns 1899 script 'result = Year (dblPerKey).

    Summary:

    In the import script: (dblPerKey) Year returns as a result of user POV selection year

    In the mapping script: Year (dblPerKey) always returns 1899

    Question: Is there a way to check user POV when mapping scripts?

    Thanks a lot for your answers

    BR

    Karnie

    Replying to myself: I need to use varValues (3) in map scripts. Not a dblPerKey.

  • Live (like Facebook-timeline for example) content in the map?

    Hello

    actually I m testing of DPS - and it s great new!

    A question: is it possible to display the Live content (such as Facebook-timeline for example) in the map? -I think this would be a great feature...

    Thank you very much!

    Best regards

    Lars

    Lars salvation,

    It is currently not possible, but we think the addition of a new type of card in the future that would support that style of content. We agree, this would be a great feature

    Neil

Maybe you are looking for