2

we are doing tagging in Spotfire. For this purpose we are using a python script. inside that script for data source connection we are using follwong code.

dbsettings = DatabaseDataSourceSettings( "System.Data.OracleClient","Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx.XXX.com)(PORT=1530))(CONNECT_DATA=(SID=xxxx)));User Id=xxxx;Password=xxxx45",sqlSelect)
ds = DatabaseDataSource(dbsettings)

Is there any way not to hard code this.Can we take in data source connection that is configured in library? For example, is there a way to call below attached data source in python script like, dbsettings =Datasource:Sample data source
(Sample data source is the data source configured in libarary)

(please see the attached picture)Data source from library

J K
  • 165
  • 2
  • 14
  • are you trying to "not hard code it" or are you trying to "use a data source from the library"? please clarify. – niko Nov 29 '16 at 10:31
  • 1
    thanks for your reply, Can i insert this same data source from library in script instead of hard cording it.is there any other way to not hard code it? – J K Nov 29 '16 at 15:22
  • You can use information links to write back to the database if that is what you are trying to do. Just create your update statement using the SQL button under the Pre-Updates or Post-Updates. Make sure you return something back to Spotfie using the Query option. The radio buttons are misleading. They should be tabs because you might think that it will execute one or the ohter, but not all. example: update dev.myTable set status=?status, comment_text=?comment, USERNAME='%CURRENT_USER%' where itemId in (?selectedIds) and set your parameters (if any) under the parameters section. – jleviaguirre Nov 30 '16 at 19:53
  • @JK Were you able to achieve this in any way? I have a similar use case. – thebigshaikh Dec 09 '19 at 09:13

0 Answers0