on ‎2016 May 04 6:35 PM
Hi folks,
Is there anyone having a full list of HCI-DS scripts functions available. We are investigating the HCI-DS scripts further than what we do and would like to develop these ones in order to call functions and may be even use Flat Files creation on the HCI server.
We easily handle calling Global variables, Time tags for Jobs run etc... but sure we can develop something more ingenious
I am asking this as both HCI-DS help and SAP support docs are not listing full detailed functions available in terms of scripts.
Thanks in advance for your expertise,
Regards,
Julien
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Alecsandra, this might be useful indeed.
I was more thinking of a script reading a FF onto the HCI server and making the input data in Global variables.
You know customers sometimes do not want to either hardcode filters in their DF or having a long list of GV set up especially when we filter on LOCID imagine a big company making filters on warehouses #.
We could have a FF stored onto the HCI server with the warehouses # in it and then a script calling this FF and adapt the GV accordingly.
Hope it makes sense on an email
Thanks again for your help.
Julien
Julien
I am working on a script that I got from SAP Help.
I am not able to understand couple of things because example is not clear:
1. In following line what does Task_Name mean?
if (get_data('<task_name>') = " or $G_RESET = 'Y')
$G_STARTDATE = to_date('1900-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss');
Above statement is used to get the Start Date from a saved Global Variable as in step 2 (in Post Script).
2. print('Saving enddate for next startdate: [$G_ENDDATE]');
save_data('<task_name>',to_char($G_EDATE,'yyyy-mm-dd hh24:mi:ss'));
I am able to get the values in the variable but in the following run $G_EDATE value is not available even when its successfully saved.
Other question I have is that why SAP is using a date using to_CHAR function. It did not work that way for me. It worked when I moved to DATETIME variable.
When my problem now is to be able to read the save variable in item 1.
I am really looking for some help to resolve this.
Thanks
RS
Hi RS,
Can you please specify what you are trying to achieve from the script, your example is not really clear to me.
In regards of the Task_Name, it must be the name of your task where you have the script. You are trying to input a script into a Dataflow which is part of a task ... this is the one.
The to_char is used for converting a date or numeric data to a string. If it worked for you with DATETIME it all depends on your input format date.
Let me know,
Julien
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Save_Data() is used in combination with Get_Data() to save a value to be used across executions of a task. E.g. you can save the $G_LAST_EXTRACT_DATE from one execution in the post load script and read it back in the next execution of the task to implement a delta load logic.
Thanks,
Ben.
---
Product Manager SAP HANA Cloud Integration for data services (HCI-DS) and HANA smart data integration (SDI)
Thanks Ben!
I am aware of the functionality but here is the problem.
I do have an Enddate from the Preload script in a global variable.
It retains the value.
Net I use save_data as recommended by SAP using another global variable.
save_data($G_TODATE, to_char($G_ENDDATE,'yyyy-mm-dd hh24:mi:ss'));
But i am not getting any value in in $G_TODATE.
When I dont have a value here I cant read it using get_data.
But when I dont use save_date I can display the value.
I hope I was clear enough.
Thanks
Your save_data() should look like this:
save_data('TASK_XYX_EndDate',to_char($G_ENDDATE,'yyyy-mm-dd hh24:mi:ss'));
This will save the end date as a permanent variable with the name TASK_XYZ_EndDate (you can choose any name, recommendation is to use the task name to avoid that you overwrite the value from different tasks).
In order to pick up the value in the next run you use:
$G_TODATE = get_data('TASK_XYX_EndDate');
Thanks,
Ben.
Ben, highly appreciable. Should TASK_XYX_EndDate not be a variable?
TASK_XYX_EndDate would be a global variable isn't it?
Something like $TASK_XYX_EndDate othewise it throws an error.
How can we display saved and get values?
This statement is used in Postload script.
After I hear back from you I will give it another shot.
thanks again
RS
No $ sign needed, no declaration needed either.
Try this very simple example:
Pre-load script:
save_data('ANY TEXT','100');
Post-load script:
Print(get_data('ANY TEXT'));
In the pre-load script we create an entry with the name ANY TEXT and store the value 100.
In the post load script we get the value for ANY TEXT and print it in the monitor log.
There are no global variables used at all in this example. Only global variables need the $ sign and declaration before you can use them.
Hi Ben,
I have not heard back from you since your last help.
Thanks again!
You know I am trying to create a delta process using HCI Data Services.
I need to copy one HCP table to another HCP table (With data), how can I create a data flow when source is also HCP and target is also HCP?
I am sure you know.
Looking forward,
RS
| User | Count |
|---|---|
| 17 | |
| 16 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.