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

update vpc flow with flint-s3 based DDL assets #1204

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Compatible with OpenSearch and OpenSearch Dashboards Version 2.9.0
- Remove deprecated layout editor ([#646](https://github.com/opensearch-project/dashboards-observability/pull/646))

### Documentation
- Integraions Plugin Design RFC ([#644](https://github.com/opensearch-project/dashboards-observability/issues/644))
- Integrations Plugin Design RFC ([#644](https://github.com/opensearch-project/dashboards-observability/issues/644))
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CREATE MATERIALIZED VIEW {table_name}_mview AS
SELECT
version as `aws.vpc.version`,
account_id as `aws.vpc.account-id`,
interface_id as `aws.vpc.interface-id`,
srcaddr as `aws.vpc.srcaddr`,
dstaddr as `aws.vpc.dstaddr`,
CAST(srcport AS LONG) as `aws.vpc.srcport`,
CAST(dstport AS LONG) as `aws.vpc.dstport`,
protocol as `aws.vpc.protocol`,
CAST(packets AS LONG) as `aws.vpc.packets`,
CAST(bytes AS LONG) as `aws.vpc.bytes`,
FROM_UNIXTIME(start) as `@timestamp`,
FROM_UNIXTIME(end) as `aws.vpc.end`,
action as `aws.vpc.action`,
log_status as `aws.vpc.log-status`
FROM
{table_name};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
CREATE EXTERNAL TABLE IF NOT EXISTS {table_name} (
version INT,
account_id STRING,
interface_id STRING,
srcaddr STRING,
dstaddr STRING,
srcport STRING,
dstport STRING,
protocol STRING,
packets STRING,
bytes STRING,
start BIGINT,
end BIGINT,
action STRING,
log_status STRING
)USING csv
LOCATION '{s3_bucket_location}'
OPTIONS (
sep=' '
);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REFRESH MATERIALIZED VIEW {table_name}_mview;
Loading