Skip to content

Commit

Permalink
#29 support sql file reading
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Oct 22, 2019
1 parent ffcdb03 commit 6309f35
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions R/geoflow_entity.R
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,19 @@ geoflow_entity <- R6Class("geoflow_entity",
warnMsg <- sprintf("No readable source '%s'. Dynamic metadata computation aborted!", datasource_file)
config$logger.warn(warnMsg)
}
},
#other format handlers to come
{
config$logger.warn(sprintf("Metadata dynamic handling based on 'data' not implemented for type '%s'", self$data$uploadType))
}
},
"dbquery" = {
sqlfile <- file.path(TEMP_DATA_DIR, paste0(datasource_name,".sql"))
config$logger.info(sprintf("Reading SQL query from file '%s'", sqlfile))
sql <- paste(readLines(sqlfile), collapse="")
self$data$setSql(sql)
unlink(sqlfile)
config$logger.warn(sprintf("Metadata dynamic handling based on 'data' not implemented for type '%s'", self$data$uploadType))
},
#other format handlers to come
{
config$logger.warn(sprintf("Metadata dynamic handling based on 'data' not implemented for type '%s'", self$data$uploadType))
}
)
},

Expand Down

0 comments on commit 6309f35

Please sign in to comment.