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

Support formats other than PARQUET #11

Open
EvanBoyle opened this issue Dec 28, 2019 · 0 comments
Open

Support formats other than PARQUET #11

EvanBoyle opened this issue Dec 28, 2019 · 0 comments

Comments

@EvanBoyle
Copy link
Owner

EvanBoyle commented Dec 28, 2019

Parquet is a nice default for withStreamingInputTable as kinesis handles transforming JSON into parquet. There are npm libraries to do this conversion manually yourself, but it can be inconvenient. We should support other file formats so that it is easy to create something like a static fact table:

const tableArgs: TableArgs = {
    columns,
    format: "JSON"
}

const dataWarehouse = new ServerlessDataWarehouse("analytics_dw")
    .withTable(impressionsTableName, genericTableArgs)

const s3Bucket = this.dataWarehouseBucket;

// ... configure an s3 client with a connection to the bucket ...
const dataFacts =  [
{
ad: 1, author: "evan", date: "12/26/2019"
},
{
ad: 2, author: "jordan", date: "12/27/2019
}
];
s3Client.put(s3Path, JSON.stringify(dataFacts));

Now we have a table with a static JSON dataset that is uploaded at deployment time. Will also be useful for batch tables.

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

No branches or pull requests

1 participant