pyflare.sdk.writers package
Submodules
pyflare.sdk.writers.bigquery_writer module
pyflare.sdk.writers.delta_writer module
- class pyflare.sdk.writers.delta_writer.DeltaOutputWriter(write_config: WriteConfig)[source]
Bases:
FileOutputWriter
- DELTA_CONF = '[\n ("spark.sql.catalog.spark_catalog","org.apache.spark.sql.delta.catalog.DeltaCatalog"),\n ("spark.sql.extensions", "io.delta.sql.DeltaSparkSessionExtension")\n ]'
pyflare.sdk.writers.elasticsearch_writer module
pyflare.sdk.writers.fastbase_writer module
- class pyflare.sdk.writers.fastbase_writer.FastBaseOutputWriter(write_config: WriteConfig)[source]
Bases:
FileOutputWriter
- PULSAR_Options = '[\n ("service.url", "{serviceUrl}"),\n ("admin.url", "{adminUrl}"),\n ("pulsar.admin.authPluginClassName", "org.apache.pulsar.client.impl.auth.AuthenticationToken"),\n ("pulsar.admin.authParams","token:{Apikey}"),\n ("pulsar.client.authPluginClassName","org.apache.pulsar.client.impl.auth.AuthenticationToken"),\n ("pulsar.client.authParams","token:{Apikey}"),\n ("topic","persistent://public/default/{dataset}")\n ]'
pyflare.sdk.writers.file_writer module
pyflare.sdk.writers.iceberg_writer module
- class pyflare.sdk.writers.iceberg_writer.IcebergOutputWriter(write_config: WriteConfig)[source]
Bases:
FileOutputWriter
A class for writing data to the iceberg format using PySpark.
- cleanup_temp_spark_conf()[source]
Cleans up the temporary Spark configuration for iceberg.
- Returns:
None
- get_conf()[source]
Returns spark configuration required for iceberg as per underlying filesystem.
- Returns:
Spark configuration required for iceberg as per underlying filesystem.
- Return type:
list of tuples
- temp_spark_conf()[source]
Generates a temporary Spark configuration for iceberg.
- Returns:
The temporary Spark configuration.
- Return type:
list of tuples
- write(df: DataFrame)[source]
Writes the given DataFrame to the iceberg format. If the “merge” option is specified in the write_config’s extra_options, the DataFrame is merged into an existing table using a temporary view. Otherwise, the DataFrame is written to the iceberg format with the given options.
- Parameters:
df (DataFrame) – The DataFrame to write.
- Returns:
None
pyflare.sdk.writers.jdbc_writer module
pyflare.sdk.writers.snowflake_writer module
- class pyflare.sdk.writers.snowflake_writer.SnowflakeOutputWriter(write_config: WriteConfig)[source]
Bases:
Writer
- SNOWFLAKE_WRITE_OPTIONS = '{{\n "sfURL": "{connection_url}",\n "sfUser": "{connection_user}",\n "sfPassword": "{connection_password}",\n "sfDatabase": "{connection_database}",\n "sfSchema": "{collection}",\n "sfWarehouse": "{connection_warehouse}",\n "dbtable": "{dataset}"\n }}'