                                          :format]
                       (select [:echo-granule-id
                                :granule-ur
-                               `(concat ~collection-id "") ; don't know how else to select constant
+                               collection-id
                                :compressed-xml
                                :xml-mime-type]
                               (from granule-echo-table)

  "Generate SQL to copy the dataset/collection data from the catalog rest database to the
  metadata db for the given provider for all the provider's collections or a single collection."
  ([provider-id] (copy-collection-data-sql provider-id nil))
  ([provider-id  collection-id] (let [dataset-table (keyword (str (catalog-rest-tablespace)
                                                                  "."
                                                                  provider-id
                                                                  "-dataset-records"))
                                      collection-table (keyword (str (metadata-db-tablespace)
                                                                     "."
                                                                     provider-id
                                                                     "-collections"))
                                      collection-id (first collection-id)]
                                  (su/build (insert collection-table [:concept-id
                                                                      :native-id
                                                                      :metadata

  (copy-provider (oc/create-db (oc/db-spec)) "FIX_PROV1")
  (copy-single-collection (oc/create-db (oc/db-spec)) "FIX_PROV1" "C1000000073-FIX_PROV1")
  (get-provider-collection-list-sql  "FIX_PROV1")
  (copy-granule-data-for-provider (oc/create-db (oc/db-spec)) "FIX_PROV1")
  (delete-collection-granules-sql "FIX_PROV1" "C1000000073-FIX_PROV1")
  (metadata-db-concept-table "FIX_PROV1" :collection)
  )
