Class DataSourceOptions

java.lang.Object
com.complexible.stardog.virtual.api.DataSourceOptions

public class DataSourceOptions extends Object
Options shared by data sources of all types.
  • Field Details

    • DEFAULT_RESULT_LIMIT

      public static final int DEFAULT_RESULT_LIMIT
      The default limit used for data source queries.
      See Also:
    • DEFAULT_BATCH_SIZE

      public static final int DEFAULT_BATCH_SIZE
      The default batch size used for queries with batches
      See Also:
    • DATA_SOURCE_QUERY_RESULT_LIMIT

      public static final String DATA_SOURCE_QUERY_RESULT_LIMIT
      The option to define the limit for data source query results. Data source query results are kept in-memory so it is not recommended to set this limit to a high value.
      See Also:
    • UNIQUE_KEY_SETS

      public static final String UNIQUE_KEY_SETS
      See Also:
    • DATES_TIMEZONE_IGNORE

      public static final String DATES_TIMEZONE_IGNORE
      Undocumented. When true, a date/time literal that carries a time zone no longer fails to translate. An xsd:date, such as xsd:date(NOW()), is compared by its calendar fields. An xsd:dateTime or xsd:dateTimeStamp, such as NOW(), is converted to DATES_TIMEZONE_TARGET and compared without its zone. A workaround until time zone comparisons are pushed faithfully (PLAT-9682).
      See Also:
    • DATES_TIMEZONE_TARGET

      public static final String DATES_TIMEZONE_TARGET
      Undocumented. With DATES_TIMEZONE_IGNORE, the time zone a zoned dateTime literal is converted to before its zone is dropped: an offset such as -05:00, or a zone ID such as America/New_York, which follows daylight time. Defaults to UTC. Set it to the database session's time zone, which is how most databases compare a zone-less literal with a column that holds instants (PLAT-9682).
      See Also:
    • FOREIGN_KEY_SETS

      public static final String FOREIGN_KEY_SETS
      User-provided foreign key declarations. Each foreign key is a parenthesized list of child_table.column->parent_table.column pairs. Multiple foreign keys are separated by commas.
       (CHILD_SCHEMA.CHILD_TABLE.COL1->PARENT_SCHEMA.PARENT_TABLE.COL1)
       (CHILD.COL1->PARENT.COL1,CHILD.COL2->PARENT.COL2)
       
      See Also:
    • FUNCTIONAL_DEPENDENCY_SETS

      public static final String FUNCTIONAL_DEPENDENCY_SETS
      User-provided functional dependency declarations. Each functional dependency is a parenthesized determinant columns -> dependent columns declaration whose table-qualified columns all reference the same table. Multiple functional dependencies are separated by commas.
       (SCHEMA.TBL.ORG_ID -> SCHEMA.TBL.ORG_NAME, SCHEMA.TBL.ORG_CITY)
       (TBL.ORG_ID, TBL.DEPT_CODE -> TBL.DEPT_NAME)
       
      Declares that any two rows agreeing on the determinant columns agree on the dependent columns, with NULL treated as a value. Unlike UNIQUE_KEY_SETS, the determinant need not be unique in the table. Used to eliminate self-joins over denormalized tables.
      See Also:
    • BATCH_SIZE

      public static final String BATCH_SIZE
      See Also:
    • CATALOG_AUTO_ADD_PROVIDERS

      public static final String CATALOG_AUTO_ADD_PROVIDERS
      Per-data-source override for the server option of the same name, which controls whether Data Catalog automatically registers a metadata provider for a newly added JDBC data source. When this option is absent the server-level value is used.

      Set it to false for data sources that should never be cataloged, in particular short-lived ones: an auto-added provider outlives the data source it is linked to and its scheduled import fails once the data source is gone. Virtual graph imports set this to false for the temporary data source they create.

      See Also:
    • SECRETS_MANAGER

      public static final String SECRETS_MANAGER
      Secrets Management Integration
      See Also:
    • SECRETS_KEY

      public static final String SECRETS_KEY
      See Also:
    • SECRETS_VERSION

      public static final String SECRETS_VERSION
      See Also:
    • SECRETS_AWS_REGION

      public static final String SECRETS_AWS_REGION
      See Also:
    • SECRETS_AWS_SECRET_KEY

      public static final String SECRETS_AWS_SECRET_KEY
      See Also:
    • SECRETS_AWS_ACCESS_KEY

      public static final String SECRETS_AWS_ACCESS_KEY
      See Also:
    • SECRETS_GOOGLE_PROJECT_ID

      public static final String SECRETS_GOOGLE_PROJECT_ID
      See Also:
    • SECRETS_GOOGLE_KEY

      public static final String SECRETS_GOOGLE_KEY
      See Also:
    • SECRETS_AZURE_URL

      public static final String SECRETS_AZURE_URL
      See Also:
    • SECRETS_AZURE_TENANT_ID

      public static final String SECRETS_AZURE_TENANT_ID
      See Also:
    • SECRETS_AZURE_CLIENT_ID

      public static final String SECRETS_AZURE_CLIENT_ID
      See Also:
    • SECRETS_AZURE_CLIENT_SECRET

      public static final String SECRETS_AZURE_CLIENT_SECRET
      See Also:
    • SECRETS_HASHICORP_VAULT_URL

      public static final String SECRETS_HASHICORP_VAULT_URL
      See Also:
    • SECRETS_HASHICORP_VAULT_TOKEN

      public static final String SECRETS_HASHICORP_VAULT_TOKEN
      See Also:
  • Constructor Details

    • DataSourceOptions

      public DataSourceOptions()
  • Method Details

    • getUniqueKeySets

      public static Map<String,Set<Set<String>>> getUniqueKeySets(Properties options)
      Returns the parsed value of the UNIQUE_KEY_SETS option. Takes String of unique keys, grouped by parentheses, delimited by commas and a returns a Map from each referenced table to the set of key sets. Uses default function that splits table and column on last dot. e.g.:
       ("Table1"."Column1"), ("Table1"."Column3", "Table1"."Column4"), (mongocol.[unwind1;unwind2].unwind1.field1)
       
      is parsed to:
       {""Table1"" : [[""Column1""], [""Column3"", ""Column4""]]},
       {"mongocol.[unwind1;unwind2]" : [["unwind1.field1"]]}
    • getUniqueKeySets

      public static Map<String,Set<Set<String>>> getUniqueKeySets(Properties options, Function<String,Pair<String,String>> splitTableColumn)
      Parses the UNIQUE_KEY_SETS option using the provided Function to split a table and column string into a Pair. See: getUniqueKeySets(Properties)
    • isDatesTimezoneIgnore

      public static boolean isDatesTimezoneIgnore(Properties options)
    • getDatesTimezoneTarget

      public static ZoneId getDatesTimezoneTarget(Properties options)
    • getBatchSize

      public static int getBatchSize(Properties options)
    • getForeignKeySets

      public static List<DataSourceOptions.ForeignKeyDeclaration> getForeignKeySets(Properties options)
      Parses the FOREIGN_KEY_SETS option. Format: (child_table.col->parent_table.col, child_table.col2->parent_table.col2) Multiple FKs are in separate parenthesized groups.
      Returns:
      list of foreign key declarations, or null if the option is not set
    • getFunctionalDependencySets

      public static List<DataSourceOptions.FunctionalDependencyDeclaration> getFunctionalDependencySets(Properties options)
      Parses the FUNCTIONAL_DEPENDENCY_SETS option. Format: (table.det_col, ... -> table.dep_col, ...) Multiple functional dependencies are in separate parenthesized groups.
      Returns:
      list of functional dependency declarations, or null if the option is not set