visual studio 2010 - Dynamic file paths in Talend job -


i using talend open studio v5.4 data integration.

here brief description of job created in talend:

i have created job name refresh_bfo_table connects salesforce.com , fetches data account , opportunity tables , data populates local database named ofotaccdb.

in local database there 2 tables bfo_account , bfo_opportunity gets populated data retrieved salesforce.

now, connecting salesforce have used oauth2.0 authentication. have provided consumersecret, consumerkey, redirect uri in talend tsalesforcecomponent configuaration , jobs running talend.

as of v5.4, talend open studio supports oauth2.0 component tsalesforceconnection. in configuration of oauth2.0, talend asks following credentials:

  • salesforce webservice url=https://test.salesforce.com/services/oauth2

  • consumer key= 3mvg98rqvesxrgq6mxmniwk2uxkxenoakb4df._jbihtl5pidt3ue17yzu_oewyx3wv.7ylxli5nsnl55_y06

  • consumer secret=5550378321918973123

  • callback host=localhost

  • callback port=8443

  • token file=e:/ofot_workspace/token.properties

to noted making application internal environment had given webservice url "test.salesforce.com" not "login.salesforce.com".

now mentioned above jobs running talend when exporting these jobs vs2010. there problem token file path.we have created ui end user using visual basic. after exporting these jobs talend putting them in path c:\users\sumitg\documents\visual studio 2010\olm-v2\olm-test2\bin\debug\talend. olm-test2 vb project name. after making .exe file of vb project using inno setup compiler. creating .exe file every user can install on machine , use vb interface necessary task.

when user runs installer, installation goes fine during invocation of talend job oauth2.0 not able work don't token file.

to overcome problem have put token file in installation directory provided user well. creates problem property: token file=e:/ofot_workspace/token.properties no longer match location of oauth2 token in user's installation directory.

is there way can make token file path dynamic? want point installed directory.

try using relative path instead of absolute path: token file=e:/ofot_workspace/token.properties

this be: token file=../token.properties

here when talend job runs search file in 1 folder above current location of .bat/.sh file , try open .bat/.sh file talend generates , might using job execution - have relative path reference .jar files in lib folder of talend.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -