Skip to content

Commit

Permalink
Update pattern for multiple mview suffixes (#1693)
Browse files Browse the repository at this point in the history
* Update pattern for multiple mview suffixes

Signed-off-by: Simeon Widdis <[email protected]>

* Update field filter to new format

Signed-off-by: Simeon Widdis <[email protected]>

* Update all mviews for new pattern

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Simeon Widdis <[email protected]>
  • Loading branch information
Swiddis authored Apr 15, 2024
1 parent 5b2d4a2 commit 72283be
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const DataConnection = (props: { dataSource: string }) => {

useEffect(() => {
const searchDataSourcePattern = new RegExp(
`flint_${_.escapeRegExp(datasourceDetails.name)}_default_.*_mview`
`flint_${_.escapeRegExp(datasourceDetails.name)}_default_.*`
);
const findIntegrations = async () => {
// TODO: we just get all results and filter, ideally we send a filtering query to the API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ const addIntegration = async ({
integration,
setCalloutLikeToast,
config.displayName,
`flint_${config.connectionDataSource}_default_${config.connectionTableName}_mview`,
`flint_${config.connectionDataSource}_default_${config.connectionTableName}__*`,
config.enabledWorkflows,
setIsInstalling ? true : false
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE MATERIALIZED VIEW {table_name}_mview AS
CREATE MATERIALIZED VIEW {table_name}__mview AS
SELECT
to_timestamp(trim(BOTH '[]' FROM concat(time_local_1, ' ', time_local_2)), 'dd/MMM/yyyy:HH:mm:ss Z') AS `@timestamp`,
split_part (request, ' ', 1) as `http.request.method`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE MATERIALIZED VIEW {table_name}_mview AS
CREATE MATERIALIZED VIEW {table_name}__mview AS
SELECT
type as `aws.elb.elb_type`,
time as `@timestamp`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE MATERIALIZED VIEW {table_name}_mview AS
CREATE MATERIALIZED VIEW {table_name}__mview AS
SELECT
owner_id AS `aws.s3.bucket_owner`,
bucket_name AS `aws.s3.bucket`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE MATERIALIZED VIEW {table_name}_mview AS
CREATE MATERIALIZED VIEW {table_name}__mview AS
SELECT
CAST(FROM_UNIXTIME(`timestamp`/ 1000) AS TIMESTAMP) AS `@timestamp`,
formatVersion AS `aws.waf.formatVersion`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE MATERIALIZED VIEW {table_name}_mview AS
CREATE MATERIALIZED VIEW {table_name}__mview AS
SELECT
regexp_extract(
record,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE MATERIALIZED VIEW {table_name}_mview AS
CREATE MATERIALIZED VIEW {table_name}__mview AS
SELECT
to_timestamp(trim(BOTH '[]' FROM concat(time_local_1, ' ', time_local_2)), 'dd/MMM/yyyy:HH:mm:ss Z') AS `@timestamp`,
split_part (request, ' ', 1) as `http.request.method`,
Expand Down

0 comments on commit 72283be

Please sign in to comment.