Codota Logo
CustomDataSource
Code IndexAdd Codota to your IDE (free)

How to use
CustomDataSource
in
org.rakam.analysis.datasource

Best Java code snippets using org.rakam.analysis.datasource.CustomDataSource (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: rakam-io/rakam

public CustomDataSource getDatabase(String project, String schema) {
  try (Handle handle = dbi.open()) {
    Query<Map<String, Object>> bind = handle.createQuery("SELECT type, options FROM custom_data_source WHERE project = :project AND lower(schema_name) = :schema_name")
        .bind("project", project)
        .bind("schema_name", schema.toLowerCase(Locale.ENGLISH));
    CustomDataSource first = bind.map((index, r, ctx) ->
        new CustomDataSource(r.getString(1), schema, JsonHelper.read(r.getString(2), JDBCSchemaConfig.class))).first();
    if (first == null) {
      throw new RakamException(NOT_FOUND);
    }
    return first;
  }
}
origin: rakam-io/rakam

public CustomDataSourceList listDatabases(String project) {
  try (Handle handle = dbi.open()) {
    List<CustomDataSource> customDataSources = handle.createQuery("SELECT schema_name, type, options FROM custom_data_source WHERE project = :project")
        .bind("project", project)
        .map((index, r, ctx) -> {
          JDBCSchemaConfig read = JsonHelper.read(r.getString(3), JDBCSchemaConfig.class);
          return new CustomDataSource(r.getString(2), r.getString(1), read);
        }).list();
    HashMap<String, RemoteTable> files = new HashMap<>();
    handle.createQuery("SELECT table_name, options FROM custom_file_source WHERE project = :project")
        .bind("project", project)
        .map((index, r, ctx) -> {
          files.put(r.getString(1), JsonHelper.read(r.getString(2), RemoteTable.class));
          return null;
        }).list();
    return new CustomDataSourceList(customDataSources, files);
  }
}
origin: rakam-io/rakam

CustomDataSource dataSource = new CustomDataSource("POSTGRESQL", "users", source);
dataSourceType = new DataSourceType(dataSource.type, dataSource.options);
origin: stackoverflow.com

 CustomDataSource dataSource = new CustomDataSource(<your arguments here>);
HlsChunkSource chunkSource = new HlsChunkSource(dataSource, url, manifest, bandwidthMeter, null,
  HlsChunkSource.ADAPTIVE_MODE_SPLICE);
HlsSampleSource sampleSource = new HlsSampleSource(chunkSource, true, 3);
org.rakam.analysis.datasourceCustomDataSource

Most used methods

  • <init>

Popular in Java

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • setContentView (Activity)
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now