DDL-Scripts-Generation

If you want to create manually all the column families instead of letting Achilles do it for you, you can active the log level of ACHILLES_DDL_SCRIPT to DEBUG. The creation script will be displayed

Sample log4j.xml config file


    <logger name="ACHILLES_DDL_SCRIPT">
        <level value="DEBUG" />
    </logger>

Example of entity:


    @Table
    public class UserEntity
    {
    
        @PartitionKey
        private Long id;
    
        @Column
        private String name;
    
        @Column
        private String label;
    
        @Column(name = "age_in_years")
        private Long age;
    
        @Column
        private List<String> friends;
    
        @Column
        private Set<String> followers;
    
        @Column
        private Map<Integer, String> preferences;
    
        @Column
        private Counter version;
    }

Logs output:

CREATE TABLE UserEntity(
    age_in_years bigint,
    name text,
    label text,
    id bigint,
    friends list<text>,
    followers set<text>,
    preferences map<int,text>,
    PRIMARY KEY(id)
);