Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to load CloudWatch Logs query into Pandas #17

Closed
CaseyBurnsSv opened this issue Sep 3, 2019 · 4 comments
Closed

Ability to load CloudWatch Logs query into Pandas #17

CaseyBurnsSv opened this issue Sep 3, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@CaseyBurnsSv
Copy link

It would be great to have the ability to load a pandas data frame from a CloudWatch Insights Query.

@igorborgest
Copy link
Contributor

Hi @CaseyBurnsSv!

Sounds like a awesome plan, I will do that!

Thank you!

@igorborgest
Copy link
Contributor

Hey @CaseyBurnsSv!

I'm happy to say that we already have the support for CloudWatch Insights Query in the new 0.0.1 version.

Now you can get a Pandas Dataframe with the result:

session = awswrangler.Session()

dataframe = session.pandas.read_log_query(
    log_group_names=[LOG_GROUP_NAME],
    query="fields @timestamp, @message | sort @timestamp desc | limit 5",
)

Or you also can get the raw result if you prefer:

session = awswrangler.Session()

results = session.cloudwatchlogs.query(
    log_group_names=[LOG_GROUP_NAME],
    query="fields @timestamp, @message | sort @timestamp desc | limit 5",
)

I hope you enjoy it!

@igorborgest
Copy link
Contributor

Hi @CaseyBurnsSv,

I will close this issue by inactivity. Please, open a new one if you have more issues.

@CaseyBurnsSv
Copy link
Author

Thanks @igorborgest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants