pysparky.spark_configs
Attributes
| Name | Description |
|---|---|
aws_athena_spark_config | No description. |
aws_s3_spark_config | No description. |
aws_s3_tables_spark_config | No description. |
catalog_name | No description. |
iceberg_spark_config | No description. |
mongodb_spark_config | No description. |
Classes
| Name | Description |
|---|---|
AwsS3SparkConfig | Remember to set the following env variable |
AwsS3TablesSparkConfig | No description. |
SparkConfigBase | No description. |
aws_athena_spark_configattributemodule attribute#
aws_athena_spark_config = {
'fs.s3a.aws.credentials.provider': 'com.amazonaws.auth.EnvironmentVariableCredentialsProvider',
'hive.metastore.client.factory.class': 'com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory',
'spark.executor.heartbeatInterval': '600s',
'spark.hadoop.fs.s3.impl': 'org.apache.hadoop.fs.s3a.S3AFileSystem',
'spark.jars.packages': 'org.apache.iceberg:iceberg-spark-runtime-3.3_2.12:1.7.11,org.apache.iceberg:iceberg-aws-bundle:1.7.12,software.amazon.awssdk:url-connection-client:2.27.213,org.apache.hadoop:hadoop-aws:3.4.14',
'spark.network.timeout': '700s',
'spark.sql.broadcastTimeout': '3600s',
'spark.sql.catalog.iceberg_catalog.catalog-impl': 'org.apache.iceberg.aws.glue.GlueCatalog',
'spark.sql.catalog.iceberg_catalog.glue.id': '123456789012',
'spark.sql.catalog.iceberg_catalog.io-impl': 'org.apache.iceberg.aws.s3.S3FileIO',
'spark.sql.catalog.iceberg_catalog.warehouse': 's3://<bucket_name>',
'spark.sql.catalog.iceberg_catalog': 'org.apache.iceberg.spark.SparkCatalog',
'spark.sql.catalog.spark_catalog.type': 'hive',
'spark.sql.catalog.spark_catalog': 'org.apache.iceberg.spark.SparkSessionCatalog',
'spark.sql.defaultCatalog': 'iceberg_catalog',
'spark.sql.extensions': 'org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions',
'spark.sql.session.timeZone': 'UTC'
}aws_s3_spark_configattributemodule attribute#
aws_s3_spark_config = {'spark.jars.packages': 'org.apache.hadoop:hadoop-aws:3.3.1'}aws_s3_tables_spark_configattributemodule attribute#
aws_s3_tables_spark_config = {
'spark.jars.packages': 'org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.6.1,software.amazon.awssdk:s3tables:2.29.26,software.amazon.s3tables:s3-tables-catalog-for-iceberg:0.1.5',
'spark.sql.extensions': 'org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions',
'spark.sql.defaultCatalog': catalog_name,
spark.sql.catalog.{catalog_name}: 'org.apache.iceberg.spark.SparkCatalog',
spark.sql.catalog.{catalog_name}.catalog-impl: 'software.amazon.s3tables.iceberg.S3TablesCatalog',
spark.sql.catalog.{catalog_name}.warehouse: 'table_bucket_arn'
}catalog_nameattributemodule attribute#
catalog_name = 's3tablescatalog/tablebucket'iceberg_spark_configattributemodule attribute#
iceberg_spark_config = {
'spark.jars.packages': 'org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.7.1',
'spark.sql.extensions': 'org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions',
'spark.sql.catalog.spark_catalog': 'org.apache.iceberg.spark.SparkSessionCatalog',
'spark.sql.catalog.spark_catalog.type': 'hive',
'spark.sql.catalog.local': 'org.apache.iceberg.spark.SparkCatalog',
'spark.sql.catalog.local.warehouse': './warehouse',
'spark.sql.catalog.local.type': 'hadoop'
}mongodb_spark_configattributemodule attribute#
mongodb_spark_config = {
'spark.mongodb.read.connection.uri': '<connection_string>',
'spark.mongodb.write.connection.uri': '<connection_string>',
'spark.jars.packages': 'org.mongodb.spark:mongo-spark-connector_2.12:10.4.0'
}AwsS3SparkConfigclassdataclass#
class AwsS3SparkConfig(jars_packages: tuple[str, ...] = ('org.apache.hadoop:hadoop-aws:3.3.4'))Bases: SparkConfigBase
Remember to set the following env variable AWS_REGION= AWS_SECRET_ACCESS_KEY= AWS_ACCESS_KEY_ID=
jars_packagesattributeclass attributeinstance attribute#
jars_packages: tuple[str, ...] = ('org.apache.hadoop:hadoop-aws:3.3.4')Inherited from pysparky.spark_configs.SparkConfigBase
get_spark_confmethod#
Inherited from
pysparky.spark_configs.SparkConfigBaseView sourcedef get_spark_conf() -> SparkConfReturn a SparkConf object based on the config map.
AwsS3TablesSparkConfigclassdataclass#
class AwsS3TablesSparkConfig(catalog_name: str, table_bucket_arn: str, jars_packages: tuple[str, ...] = ('org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.6.1', 'software.amazon.awssdk:s3tables:2.29.26', 'software.amazon.s3tables:s3-tables-catalog-for-iceberg:0.1.5'), sql_extensions: str = 'org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions')Bases: SparkConfigBase
catalog_nameattributeinstance attribute#
catalog_name: strjars_packagesattributeclass attributeinstance attribute#
jars_packages: tuple[str, ...] = (
'org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.6.1',
'software.amazon.awssdk:s3tables:2.29.26',
'software.amazon.s3tables:s3-tables-catalog-for-iceberg:0.1.5'
)sql_extensionsattributeclass attributeinstance attribute#
sql_extensions: str = 'org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions'table_bucket_arnattributeinstance attribute#
table_bucket_arn: strInherited from pysparky.spark_configs.SparkConfigBase
get_spark_confmethod#
Inherited from
pysparky.spark_configs.SparkConfigBaseView sourcedef get_spark_conf() -> SparkConfReturn a SparkConf object based on the config map.
SparkConfigBaseclass#
class SparkConfigBase(ABC)Bases: ABC