Class JdbcOptions
java.lang.Object
com.complexible.stardog.virtual.api.JdbcOptions
Options used by JDBC data sources. Included in
api package for visibility by source_metadata CLI command.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault limit for bulk fetching row countsstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDetermines what methods for determining a table's row count will be used and in what fall-back order.static final Stringstatic final StringIn cases where a brute-forceSELECT COUNT(*)is used to determine a table's row count (seeJDBC_ROW_COUNT_ESTIMATE_STRATEGY, and the dialect supports the SQLTABLESAMPLEkeyword, this option determines the percentage of rows to include in the sample.static final Stringstatic final Stringstatic final StringMaximum number of tables to fetch row counts for in a single bulk query.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiesgetDriverProperties(Map<?, ?> dsOptions) Creates a newPropertiesinstance consisting of all the driver properties found in the supplied DS options file (with theext.prefixes removed).static booleanisSkipValidation(Properties options) static StringpassthroughOption(String optionName)
-
Field Details
-
JDBC_URL
- See Also:
-
JDBC_USERNAME
- See Also:
-
JDBC_PASSWORD
- See Also:
-
JDBC_DRIVER
- See Also:
-
JDBC_PASSTHROUGH
- See Also:
-
JDBC_PASSTHROUGH_SCOPE
- See Also:
-
JDBC_PASSTHROUGH_OAUTH
- See Also:
-
PASSTHROUGH_PREFIX
- See Also:
-
PASSTHROUGH_ACCESS_TOKEN
- See Also:
-
SQL_DIALECT
- See Also:
-
SQL_DEFAULT_CATALOG
- See Also:
-
SQL_CATALOGS
- See Also:
-
SQL_DEFAULT_SCHEMA
- See Also:
-
SQL_SCHEMAS
- See Also:
-
SQL_WILDCARD
- See Also:
-
SQL_SKIP_VALIDATION
- See Also:
-
JDBC_STATEMENT_FETCH_SIZE
- See Also:
-
JDBC_ROW_COUNT_ESTIMATE_STRATEGY
Determines what methods for determining a table's row count will be used and in what fall-back order. Each dialect has a method getting row count from database metadata, which is usually either looking at indexes or querying the system tables. This option controls whether a brute forceSELECT COUNT(*)should be used.NOTE: The index/system-table method is considered a failure if it returns a row count estimate less than 2.
Valid options are:
JdbcOptions.RowCountEstimateStrategy.JDBC_GET_INDEX_INFO: Do not useSELECT COUNT(*)JdbcOptions.RowCountEstimateStrategy.COUNT_FALLBACK: Fallback toSELECT COUNT(*)if dialect's method failsJdbcOptions.RowCountEstimateStrategy.COUNT_FIRST: TrySELECT COUNT(*)first
- See Also:
-
JDBC_TABLE_SAMPLE_PERCENTAGE
In cases where a brute-forceSELECT COUNT(*)is used to determine a table's row count (seeJDBC_ROW_COUNT_ESTIMATE_STRATEGY, and the dialect supports the SQLTABLESAMPLEkeyword, this option determines the percentage of rows to include in the sample. Valid range is 0-100. 0 indicates to not use theTABLESAMPLEkeyword. E.g.SELECT COUNT(*) FROM table_name TABLESAMPLE SYSTEM (10 PERCENT)- See Also:
-
METADATA_ROW_COUNT_BULK_FETCH_LIMIT
Maximum number of tables to fetch row counts for in a single bulk query. Set to 0 to disable bulk fetching (use individual queries for each table). Default is 1000. Applies to databases that support bulk row count queries (BigQuery, Snowflake, PostgreSQL, etc.)- See Also:
-
DEFAULT_METADATA_ROW_COUNT_BULK_FETCH_LIMIT
public static final int DEFAULT_METADATA_ROW_COUNT_BULK_FETCH_LIMITDefault limit for bulk fetching row counts- See Also:
-
-
Constructor Details
-
JdbcOptions
public JdbcOptions()
-
-
Method Details
-
getDriverProperties
Creates a newPropertiesinstance consisting of all the driver properties found in the supplied DS options file (with theext.prefixes removed).- Parameters:
dsOptions- Data Source options includingext.-prefixed driver properties
-
isSkipValidation
-
passthroughOption
-