
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
llama-index-readers-athena
Advanced tools
pip install llama-index-readers-athena
pip install llama-index-llms-openai
Athena reader allow execute SQL with AWS Athena. We using SQLAlchemy and PyAthena under the hood.
WE HIGHLY RECOMMEND USING THIS LOADER WITH AWS EC2 IAM ROLE.
Here's an example usage of the AthenaReader.
import os
import dotenv
from llama_index.core import SQLDatabase,ServiceContext
from llama_index.core.query_engine import NLSQLTableQueryEngine
from llama_index.llms.openai import OpenAI
from llama_index.readers.athena import AthenaReader
dotenv.load_dotenv()
AWS_REGION = os.environ['AWS_REGION']
S3_STAGING_DIR = os.environ['S3_STAGING_DIR']
DATABASE = os.environ['DATABASE']
WORKGROUP = os.environ['WORKGROUP']
TABLE = os.environ['TABLE']
llm = OpenAI(model="gpt-4",temperature=0, max_tokens=1024)
engine = AthenaReader.create_athena_engine(
aws_region=AWS_REGION,
s3_staging_dir=S3_STAGING_DIR,
database=DATABASE,
workgroup=WORKGROUP
)
service_context = ServiceContext.from_defaults(
llm=llm
)
sql_database = SQLDatabase(engine, include_tables=[TABLE])
query_engine = NLSQLTableQueryEngine(
sql_database=sql_database,
tables=[TABLE],
service_context=service_context
)
query_str = (
"Which blocknumber has the most transactions?"
)
response = query_engine.query(query_str)
FAQs
llama-index readers athena integration
We found that llama-index-readers-athena demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.