{"id":15710468,"url":"https://github.com/aws/amazon-keyspaces-cql-to-cfn-converter","last_synced_at":"2025-10-20T03:32:56.811Z","repository":{"id":54891200,"uuid":"331704944","full_name":"aws/amazon-keyspaces-cql-to-cfn-converter","owner":"aws","description":"Command-line tool for converting Apache Cassandra Query Language (CQL) scripts to AWS CloudFormation (CFN) templates, so Amazon Keyspaces (for Apache Cassandra) schema can be easily managed in AWS CloudFormation stacks.","archived":false,"fork":false,"pushed_at":"2023-04-10T09:18:12.000Z","size":84,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-01-28T19:48:22.969Z","etag":null,"topics":["amazon-keyspaces","aws","cassandra","cql","keyspaces"],"latest_commit_sha":null,"homepage":"https://docs.aws.amazon.com/keyspaces/latest/devguide/what-is-keyspaces.html","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-21T17:37:49.000Z","updated_at":"2024-08-02T02:22:40.000Z","dependencies_parsed_at":"2022-08-14T05:50:53.526Z","dependency_job_id":"f5ffe0f8-b22e-4759-9f63-e2f24c9939d6","html_url":"https://github.com/aws/amazon-keyspaces-cql-to-cfn-converter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-keyspaces-cql-to-cfn-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-keyspaces-cql-to-cfn-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-keyspaces-cql-to-cfn-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-keyspaces-cql-to-cfn-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/amazon-keyspaces-cql-to-cfn-converter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237261489,"owners_count":19281241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-keyspaces","aws","cassandra","cql","keyspaces"],"created_at":"2024-10-03T21:08:13.318Z","updated_at":"2025-10-20T03:32:51.769Z","avatar_url":"https://github.com/aws.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IMPORTANT: Latest Version\n\nThe current version is 1.0.0. Please see the [changelog](./CHANGELOG.md) for details on version history.\n\n# Overview\n\nThis package implements a command-line tool for converting Apache Cassandra Query Language (CQL) scripts to AWS CloudFormation (CFN) templates, which allows Amazon Keyspaces (for Apache Cassandra) schema to be easily managed in AWS CloudFormation stacks.\n\nThe tool currently supports the following statements:\n\n* `CREATE KEYSPACE`\n* `CREATE TABLE`\n* `USE`\n\n# Example Usage\n\nGiven a CQL script named `my_cql_script.cql`\n\n```sql\nCREATE KEYSPACE my_keyspace WITH replication = {'class': 'SingleRegionStrategy'};\nUSE my_keyspace;\nCREATE TABLE my_table (pk int PRIMARY KEY);\n```\n\nrun the tool by executing\n\n```sh\n$ cql2cfn my_cql_script.cql my_cfn_template.json\n```\n\nthis will produce a CFN template named `my_cfn_template.json`\n\n\n```json\n{\n  \"Resources\": {\n    \"Keyspace1\": {\n      \"Type\": \"AWS::Cassandra::Keyspace\",\n      \"Properties\": {\n        \"KeyspaceName\": \"my_keyspace\"\n      }\n    },\n    \"Table1\": {\n      \"Type\": \"AWS::Cassandra::Table\",\n      \"Properties\": {\n        \"KeyspaceName\": {\n          \"Ref\": \"Keyspace1\"\n        },\n        \"PartitionKeyColumns\": [\n          {\n            \"ColumnName\": \"pk\",\n            \"ColumnType\": \"int\"\n          }\n        ],\n        \"ClusteringKeyColumns\": [],\n        \"RegularColumns\": [],\n        \"TableName\": \"my_table\"\n      }\n    }\n  }\n}\n```\n\nThe tool requires one argument, the path to the CQL script to be converted. An optional second argument can be supplied to specify the path to the generated CFN template; otherwise, the generated CFN template is printed out to the standard output.\n\nBy default, the tool operates in relaxed mode, in which case it only gives warnings about the following issues:\n\n* A property specified for a keyspace/table is not applicable to or supported by Keyspaces\n* A keyspace/table is created a second time without `IF NOT EXISTS`\n* A keyspace is referenced without being created before\n\nThese warnings can be turned into errors by supplying the `--strict` option to the tool.\n\nA help message can be printed out by using the `--help` option.\n\n# How to build the tool\n\nThe tool needs to be built from source by running the following on Linux/MacOS...\n\n```sh\n./gradlew installDist\n```\n\non Microsoft Windows, run... \n\n```bat\ngradlew.bat installDist\n```\n\nJDK 11 or later is required for building the tool.\n\nAfter it is built successfully, the executable can be found in `./build/install/cql2cfn/bin/cql2cfn`.\n\n\n## Testing\nTo execute tests on Linux/MacOS use...\n\n```sh\n./gradlew test\n```\n\nOn Microsoft Windows use... \n\n```bat\ngradlew.bat test\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Famazon-keyspaces-cql-to-cfn-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Famazon-keyspaces-cql-to-cfn-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Famazon-keyspaces-cql-to-cfn-converter/lists"}