Skip to content

Commit

Permalink
Merge pull request #231 from datastax/ms/rat-phase4
Browse files Browse the repository at this point in the history
Adding RAT headers for SIT feature files
  • Loading branch information
msmygit authored Dec 13, 2023
2 parents 65bd4fe + 6c6a543 commit 63f965a
Show file tree
Hide file tree
Showing 28 changed files with 342 additions and 3 deletions.
11 changes: 11 additions & 0 deletions SIT/features/02_explode_map/breakData.cql
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
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 WHERE key='key2';
UPDATE target.feature_explode_map SET value='value999' WHERE key='key3' AND fruit='apples';
Expand Down
14 changes: 14 additions & 0 deletions SIT/features/02_explode_map/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
12 changes: 12 additions & 0 deletions SIT/features/02_explode_map/expected.cql
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
/*
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;
14 changes: 14 additions & 0 deletions SIT/features/02_explode_map/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
10 changes: 10 additions & 0 deletions SIT/features/02_explode_map/migrate.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# 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
12 changes: 12 additions & 0 deletions SIT/features/02_explode_map/setup.cql
Original file line number Diff line number Diff line change
@@ -1,3 +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.
*/

DROP TABLE IF EXISTS origin.feature_explode_map;
CREATE TABLE origin.feature_explode_map(key text, value text, fruits map<text,int>, PRIMARY KEY (key));
INSERT INTO origin.feature_explode_map(key,value,fruits) VALUES ('key1','valueA', {'apples': 3, 'oranges': 5, 'bananas': 2, 'grapes': 11});
Expand Down
12 changes: 12 additions & 0 deletions SIT/features/03_codec/breakData.cql
Original file line number Diff line number Diff line change
@@ -1,3 +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.
*/


DELETE FROM target.codec WHERE key='key2';
UPDATE target.codec SET
Expand Down
14 changes: 14 additions & 0 deletions SIT/features/03_codec/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
12 changes: 12 additions & 0 deletions SIT/features/03_codec/expected.cql
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
/*
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.codec;
14 changes: 14 additions & 0 deletions SIT/features/03_codec/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/03_codec/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
12 changes: 12 additions & 0 deletions SIT/features/03_codec/setup.cql
Original file line number Diff line number Diff line change
@@ -1,3 +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.
*/

DROP TABLE IF EXISTS origin.codec;
CREATE TABLE origin.codec(key text, val_int text, val_bigint text, val_timestamp text, val_decimal text, val_double text, PRIMARY KEY (key));
INSERT INTO origin.codec(key,val_int,val_bigint,val_timestamp,val_decimal,val_double)
Expand Down
12 changes: 12 additions & 0 deletions SIT/features/04_udt_mapper/breakData.cql
Original file line number Diff line number Diff line change
@@ -1,3 +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.
*/

DELETE FROM target.udt_mapper WHERE key='key2';
UPDATE target.udt_mapper SET
val_udt = {text_value: 'value9990', long_value: 9990000000, double_value: 999.00}
Expand Down
10 changes: 10 additions & 0 deletions SIT/features/04_udt_mapper/execute.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# 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
12 changes: 12 additions & 0 deletions SIT/features/04_udt_mapper/expected.cql
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
/*
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.udt_mapper;
10 changes: 10 additions & 0 deletions SIT/features/04_udt_mapper/fix.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# 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
13 changes: 10 additions & 3 deletions SIT/features/04_udt_mapper/migrate.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#
# 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

spark.cdm.schema.origin.keyspaceTable origin.udt_mapper
spark.cdm.schema.target.keyspaceTable target.udt_mapper
spark.cdm.perfops.numParts 1



12 changes: 12 additions & 0 deletions SIT/features/04_udt_mapper/setup.cql
Original file line number Diff line number Diff line change
@@ -1,3 +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.
*/

DROP TABLE IF EXISTS origin.udt_mapper;
DROP TYPE IF EXISTS origin.udt_mapper_origin;
CREATE TYPE origin.udt_mapper_origin (
Expand Down
10 changes: 10 additions & 0 deletions SIT/features/06_partition_range/migrate.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# 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
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# 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
10 changes: 10 additions & 0 deletions SIT/features/07_migrate_rows/execute.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# 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
12 changes: 12 additions & 0 deletions SIT/features/07_migrate_rows/expected.cql
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
/*
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_migrate_rows;
10 changes: 10 additions & 0 deletions SIT/features/07_migrate_rows/migrate.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# 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
10 changes: 10 additions & 0 deletions SIT/features/07_migrate_rows/migrate_with_pkrowsfile.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# 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
12 changes: 12 additions & 0 deletions SIT/features/07_migrate_rows/setup.cql
Original file line number Diff line number Diff line change
@@ -1,3 +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.
*/

DROP TABLE IF EXISTS origin.feature_migrate_rows;
CREATE TABLE origin.feature_migrate_rows(key text, key2 text, value text, PRIMARY KEY (key,key2));
INSERT INTO origin.feature_migrate_rows(key,key2,value) VALUES ('key1','A','valueA');
Expand Down
Loading

0 comments on commit 63f965a

Please sign in to comment.