
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
athena-struct-parser
Advanced tools
A small utility to parse out structs returned by AWS Athena. Tools such as athena-express do a great job at querying Athena, however there's no easy way to get freeform JSON out of it. This tool allows one to parse the Athena's structs & Arrays into JS objects.
Let's take the following code as an example:
const results = await athenaExpress.query('SELECT struct, foo, bar FROM my_table');
// `results` is:
// {
// "Items": [
// {
// "struct": "{foo=bar, baz=[{foe=moe}]}",
// "foo": "baz",
// "bar": zab
// }
// ]
// }
It's not easy to get the data out of that struct column, even if that's pretty common way to store data (as JSON blobs). One could try to use a rudimentary parser, but it might trip up on un-escaped characters.
Install the library via:
npm i athena-struct-parser
import parseStruct from 'athena-struct-parser';
const results = await athenaExpress.query('SELECT struct, foo, bar FROM my_table');
results.Items.map(result => {
result.struct = parseStruct(result.struct);
return result;
});
// `results.struct` now contains JS object with data from the struct:
// {
// "Items": [
// {
// "struct": {
// "foo": "bar",
// "baz": [
// {
// "foe": "moe"
// }
// ]
// }",
// "foo": "baz",
// "bar": zab
// }
// ]
// }
FAQs
Parser for AWS Athena's structs
The npm package athena-struct-parser receives a total of 392 weekly downloads. As such, athena-struct-parser popularity was classified as not popular.
We found that athena-struct-parser demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.