      (with {:replication {:class "SimpleStrategy" :replication_factor 1}})))
   (info (format "connecting to keyspace %s" keyspace))
   (use-keyspace cluster keyspace)
-  (when-not (describe-table cluster keyspace :t_attr)
-    (warn "creating table t_attr")
-    (create-table
-     cluster :t_attr
-     (if-not-exists)
-     (column-definitions {:key :uuid :name :varchar :bucket :bigint :slot :int :data :blob :primary-key [[:key :name :bucket] :slot]})
-     (with {:compaction {:class "LeveledCompactionStrategy" :sstable_size_in_mb "256"}})))
+  (dotimes [m 12]
+    (let [colfam (t-attr-colfam (+ 1 m))]
+      (when-not (describe-table cluster keyspace colfam)
+        (warn (format "creating table %s" colfam)
+              (create-table
+               cluster colfam
+               (if-not-exists)
+               (column-definitions {:key :uuid :name :varchar :bucket :bigint :slot :int :data :blob :primary-key [[:key :name :bucket] :slot]})
+               (with {:compaction {:class "LeveledCompactionStrategy" :sstable_size_in_mb "256"}}))))))
   (when-not (describe-table cluster keyspace :k_attr)
     (warn "creating table k_attr")
     (create-table

     ~@body))

(defn truncate-all [cluster]
  (doseq [t [:graph :g_index :k_index :t_index :t_attr :k_attr :n_naming :g_naming]]
    (truncate cluster t)))

(defn fmt-put-index-opts [table data opts]


(defn fmt-put-tattr [[data opts0]]
  (let [opts (flatten (seq (dissoc opts0 :index)))
        [month bucket slot] (decode-time (:time data))
        idx (if (:index opts0)
              [(fmt-put-index-opts :t_index
                                   {:key (:key data)
                                    :name (:name data)} opts)]
              [])]
    (if (empty? opts)
      (cons (insert-query (t-attr-colfam month)
                          {:data (:value data)
                           :key (:key data)
                           :name (:name data)
                           :bucket bucket
                           :slot slot}) idx)
      (cons (insert-query (t-attr-colfam month)
                          {:data (:value data)
                           :key (:key data)
                           :name (:name data)
