on 06-10-2015 12:57 PM
Hello!
I'm having troubles trying to define adapter properties using environment variables (I'd like to use env variables instead explicit path declarations in order to improve project portability). As an example I have the following simple project:
As you see it just read streams using a CSV input stream adaptor with certain properties (by declaring variables explicitly like this, the project works properly as expected).
To get this more portable I'm trying to define the 'dir' parameter as an environment variable. To get that, I've modified the CCL file by defining a property set as follows:
... and then, declaring the properties in the corresponding CCR file as follows:
As you see, one of these properties (the 'dir' name) is now an environment variable, so I've also declared that variable on my Windows operating system:
... but now the project is not working and I cant figure out what is wrong (I can't see error traces regarding this). I've been trying different possibilities: as you see I've declared the variable at user level and also at system level, and also I've been playing with 'C:/TEMP' instead of 'C:\TEMP' and other things like that... but without positive results.
Am I doing something wrong...? Could somebody help with this...?
Thanks a lot in advance.
Pd.- Related with this: Is it possible in some way to read environment variables using CCL functions...?
Hi Ignacio,
Regarding your question of:
"Pd.- Related with this: Is it possible in some way to read environment variables using CCL functions...?"
It is not possible to read environment variables using CCL functions.
Thanks,
Alice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've found a solution to the problem: it seems that it is necessary to define environment variables according the host operating conventions. So for MS-Windows it should be something like '%ENV_VARIABLE%' instead of '${EN_VARIABLE}'.
For this specific case we have to declare:
<Property name="dir">%SAP_ESP_STREAMS_INPUT_DIR%</Property>
instead of
<Property name="dir">${SAP_ESP_STREAMS_INPUT_DIR}</Property>
... that's all
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.