pyflare.sdk.core package
Submodules
pyflare.sdk.core.dataos_input module
- class pyflare.sdk.core.dataos_input.DataOSInput(name, parsed_inputs, spark, apikey, is_stream=None, source_format=None, driver=None, query=None, options=None)
Bases:
object
- process_inputs() Tuple[Any, Any]
Read dataset from a source with the supplied parameters and create a temp view with the name passed in the dataos_source decorator.
pyflare.sdk.core.dataos_output module
pyflare.sdk.core.decorator module
pyflare.sdk.core.minerva_input module
- class pyflare.sdk.core.minerva_input.MinervaInput(name, parsed_inputs, spark, source_format='jdbc', driver='io.trino.jdbc.TrinoDriver', query=None, options=None)
Bases:
object
- process_inputs() DataFrame
Run query on minerva and the result is stored as a temp view with the name passed in the dataos_source decorator.
pyflare.sdk.core.session_builder module
- class pyflare.sdk.core.session_builder.SparkSessionBuilder(log_level: str)[source]
Bases:
object
- api_token: str = ''
- dataos_fqdn: str = ''
- load_default_spark_conf() SparkSessionBuilder [source]
- log_level: str = 'INFO'
- logger: Logger = None
- parsed_inputs: dict = {}
- parsed_outputs: dict = {}
- spark: SparkSession = None
- spark_conf = []
- with_depot(depot_name: str, acl: str = 'r') SparkSessionBuilder [source]
- with_readers(reader_address_list) SparkSessionBuilder [source]
- with_spark_conf(conf) SparkSessionBuilder [source]
- with_writers(writer_address_list) SparkSessionBuilder [source]
- pyflare.sdk.core.session_builder.g_dataos_token: str
- pyflare.sdk.core.session_builder.g_inputs: dict
- pyflare.sdk.core.session_builder.g_outputs: dict
- pyflare.sdk.core.session_builder.minerva_input(name, query, driver='io.trino.jdbc.TrinoDriver', options=None)[source]
- pyflare.sdk.core.session_builder.refresh_global_data(spark_session_builder: SparkSessionBuilder)[source]
- pyflare.sdk.core.session_builder.save(name: str, dataframe, format: Optional[str] = None, mode='append', driver=None, options=None)[source]
- pyflare.sdk.core.session_builder.spark: SparkSession