Of the above components, only the components (SQLBaseComponent/SQLLookupRule, MQLRelationalComponent) provide support for this setting. The read-only value is passed into the underlying JDBC connection object.
Creating global defaults for these settings
If you want to set a global default for max rows, query timeout, or read-only, you can modify the bean definition for the SQL Connection bean in the file
pentaho-solutions/system/pentahoObjects.spring.xml and add the default properties there. Below is an example that shows setting the global defaults to 10,000 rows, 90 seconds for query timeout, and true for read-only.
<bean id="connection-SQL" class="org.pentaho.platform.plugin.services.connections.sql.SQLConnection" scope="prototype"> <property name="maxRows" value="10000" /> <property name="queryTimeout" value="90" /> <!-- In Seconds --> <property name="readOnly" value="true" /> </bean>
With the defaults above applied, every time a SQLConnection object is created by the Pentaho Object Factory, those properties will be injected into the connection by default. The defaults of course will be overridden by settings in the metadata model, and also at the individual component level in an action sequence.