Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def session():
yield Session()
def default_session():
yield Session()
def session():
yield Session()
@pytest.fixture(scope="module")
def session(database):
yield Session(athena_database=database)
def test_from_boto3_keys(default_session):
assert_account_id(
Session(
aws_access_key_id=default_session.aws_access_key_id,
aws_secret_access_key=default_session.aws_secret_access_key,
))
def session():
yield Session()
def session():
yield Session()
def session():
yield Session()
def session():
yield Session(spark_session=SparkSession.builder.appName("AWS Wrangler Test").getOrCreate())
def test_to_parquet_with_kms(
bucket,
database,
kms_key,
):
extra_args = {"ServerSideEncryption": "aws:kms", "SSEKMSKeyId": kms_key}
session_inner = Session(s3_additional_kwargs=extra_args)
dataframe = pd.read_csv("data_samples/nano.csv")
path = f"s3://{bucket}/test/"
session_inner.pandas.to_parquet(dataframe=dataframe,
database=database,
path=path,
preserve_index=False,
mode="overwrite",
procs_cpu_bound=1)
dataframe2 = None
for counter in range(10):
sleep(1)
dataframe2 = session_inner.pandas.read_sql_athena(ctas_approach=False,
sql="select * from test",
database=database)
if len(dataframe.index) == len(dataframe2.index):
break