Skip to content

Commit

Permalink
Adding RAT phase 2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
msmygit committed Dec 8, 2023
1 parent 73401b9 commit be5c888
Show file tree
Hide file tree
Showing 42 changed files with 617 additions and 1 deletion.
13 changes: 13 additions & 0 deletions SIT/features/01_constant_column/breakData.cql
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

DELETE FROM target.feature_constant_column WHERE key='key2' AND const1='abcd';
UPDATE target.feature_constant_column SET value='value999' WHERE key='key3' AND const1='abcd';
Expand Down
14 changes: 14 additions & 0 deletions SIT/features/01_constant_column/execute.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#!/bin/bash -e

workingDir="$1"
Expand Down
14 changes: 14 additions & 0 deletions SIT/features/01_constant_column/expected.cql
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

SELECT * FROM target.feature_constant_column;
14 changes: 14 additions & 0 deletions SIT/features/01_constant_column/fix.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

spark.cdm.connect.origin.host cdm-sit-cass
spark.cdm.connect.target.host cdm-sit-cass

Expand Down
14 changes: 14 additions & 0 deletions SIT/features/01_constant_column/migrate.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

spark.cdm.connect.origin.host cdm-sit-cass
spark.cdm.connect.target.host cdm-sit-cass

Expand Down
14 changes: 14 additions & 0 deletions SIT/features/01_constant_column/setup.cql
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

DROP TABLE IF EXISTS origin.feature_constant_column;
CREATE TABLE origin.feature_constant_column(key text, value text, PRIMARY KEY (key));
INSERT INTO origin.feature_constant_column(key,value) VALUES ('key1','valueA');
Expand Down
14 changes: 14 additions & 0 deletions SIT/features/05_guardrail/execute.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#!/bin/bash -e

workingDir="$1"
Expand Down
14 changes: 14 additions & 0 deletions SIT/features/05_guardrail/expected.cql
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

SELECT * FROM target.feature_guardrail;
14 changes: 14 additions & 0 deletions SIT/features/05_guardrail/fix.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

spark.cdm.connect.origin.host cdm-sit-cass
spark.cdm.connect.target.host cdm-sit-cass

Expand Down
14 changes: 14 additions & 0 deletions SIT/features/05_guardrail/migrate.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

spark.cdm.connect.origin.host cdm-sit-cass
spark.cdm.connect.target.host cdm-sit-cass

Expand Down
14 changes: 14 additions & 0 deletions SIT/features/05_guardrail/setup.cql
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

DROP TABLE IF EXISTS origin.feature_guardrail;
CREATE TABLE origin.feature_guardrail(key text, value text, fruits map<text,text>, PRIMARY KEY (key));
INSERT INTO origin.feature_guardrail(key,value,fruits) VALUES ('clean','valueA', {'apples': 'delicious', 'oranges': 'sweet', 'bananas': 'squishy', 'grapes': 'sour'});
Expand Down
13 changes: 13 additions & 0 deletions SIT/features/06_partition_range/breakData.cql
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

DELETE FROM target.feature_partition_range WHERE key='key1';
UPDATE target.feature_partition_range SET value='value999' WHERE key='key2';
Expand Down
14 changes: 14 additions & 0 deletions SIT/features/06_partition_range/execute.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#!/bin/bash -e

workingDir="$1"
Expand Down
14 changes: 14 additions & 0 deletions SIT/features/06_partition_range/expected.cql
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

SELECT * FROM target.feature_partition_range;
14 changes: 14 additions & 0 deletions SIT/features/06_partition_range/setup.cql
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

DROP TABLE IF EXISTS origin.feature_partition_range;
CREATE TABLE origin.feature_partition_range(key text, value text, PRIMARY KEY (key));
INSERT INTO origin.feature_partition_range(key,value) VALUES ('key1','valueA');
Expand Down
13 changes: 13 additions & 0 deletions SIT/regression/01_explode_map_with_constants/breakData.cql
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

DELETE FROM target.feature_explode_map_with_constants WHERE const1='abcd' AND const2=1234 AND key='key2';
UPDATE target.feature_explode_map_with_constants SET time=7398730800000 WHERE const1='abcd' AND const2=1234 AND key='key3' AND fruit='apples';
Expand Down
14 changes: 14 additions & 0 deletions SIT/regression/01_explode_map_with_constants/execute.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#!/bin/bash -e

workingDir="$1"
Expand Down
14 changes: 14 additions & 0 deletions SIT/regression/01_explode_map_with_constants/expected.cql
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

SELECT * FROM target.feature_explode_map_with_constants;
14 changes: 14 additions & 0 deletions SIT/regression/01_explode_map_with_constants/fix.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

spark.cdm.connect.origin.host cdm-sit-cass
spark.cdm.connect.target.host cdm-sit-cass

Expand Down
14 changes: 14 additions & 0 deletions SIT/regression/01_explode_map_with_constants/migrate.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

spark.cdm.connect.origin.host cdm-sit-cass
spark.cdm.connect.target.host cdm-sit-cass

Expand Down
14 changes: 14 additions & 0 deletions SIT/regression/01_explode_map_with_constants/setup.cql
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

DROP TABLE IF EXISTS origin.feature_explode_map_with_constants;
CREATE TABLE origin.feature_explode_map_with_constants(key text, time text, fruits map<text,int>, PRIMARY KEY (key));
INSERT INTO origin.feature_explode_map_with_constants(key,time,fruits) VALUES ('key1','1087383600000', {'apples': 3, 'oranges': 5, 'bananas': 2, 'grapes': 11});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

DELETE FROM target.column_rename_with_constants_and_explode WHERE customer='CUSTOMER' AND year=2023 AND key_name='key2';
UPDATE target.column_rename_with_constants_and_explode SET fruit_qty=999 WHERE customer='CUSTOMER' AND year=2023 AND key_name='key3' AND fruit='oranges';
DELETE FROM target.column_rename_with_constants_and_explode WHERE customer='CUSTOMER' AND year=2023 AND key_name='key3' AND fruit='kiwi';
Expand Down
Loading

0 comments on commit be5c888

Please sign in to comment.