首页 > 代码库 > drill 数据源配置补充

drill 数据源配置补充

1. mongodb
  1. {
  2. "type":"mongo",
  3. "connection":"mongodb://user:password@host:port",
  4. "enabled":true
  5. }
对于没有密码的
  1. {
  2. "type":"mongo",
  3. "connection":"mongodb://localhost:27017/",
  4. "enabled":false
  5. }
2. jdbc
  1. {
  2. "type":"jdbc",
  3. "driver":"com.mysql.jdbc.Driver",
  4. "url":"jdbc:mysql://localhost:3306",
  5. "username":"root",
  6. "password":"mypassword",
  7. "enabled":true
  8. }
  1. {
  2. "type":"jdbc",
  3. "driver":"com.microsoft.sqlserver.jdbc.SQLServerDriver",
  4. "url":"jdbc:sqlserver://XXXXXX:1433;databaseName=XXXX",
  5. "username":"XXXX",
  6. "password":"XXXXX",
  7. "enabled":true
  8. }
  1. {
  2. "type":"jdbc",
  3. "driver":"oracle.jdbc.OracleDriver",
  4. "url":"jdbc:oracle:thin:username/userpassword@host:port:orcl",
  5. "username":null,
  6. "password":null,
  7. "enabled":true
  8. }
3. 文件系统
  1. {
  2. "type":"file",
  3. "enabled":true,
  4. "connection":"file:///",
  5. "workspaces":{
  6. "root":{
  7. "location":"/user/max/donuts",
  8. "writable":false,
  9. "defaultInputFormat":null
  10. }
  11. },
  12. "formats":{
  13. "json":{
  14. "type":"json"
  15. }
  16. }
  17. }
  1. {
  2. "type":"file",
  3. "enabled":true,
  4. "connection":"hdfs://XXXXX:8020",
  5. "config":null,
  6. "workspaces":{
  7. "root":{
  8. "location":"/",
  9. "writable":false,
  10. "defaultInputFormat":null
  11. },
  12. "userapps":{
  13. "location":"/userapps",
  14. "writable":true,
  15. "defaultInputFormat":null
  16. },
  17. "tmp":{
  18. "location":"/tmp",
  19. "writable":true,
  20. "defaultInputFormat":null
  21. }
  22. },
  23. "formats":{
  24. "psv":{
  25. "type":"text",
  26. "extensions":[
  27. "tbl"
  28. ],
  29. "delimiter":"|"
  30. },
  31. "csv":{
  32. "type":"text",
  33. "extensions":[
  34. "csv"
  35. ],
  36. "delimiter":","
  37. },
  38. "tsv":{
  39. "type":"text",
  40. "extensions":[
  41. "tsv"
  42. ],
  43. "delimiter":"\t"
  44. },
  45. "httpd":{
  46. "type":"httpd",
  47. "logFormat":"%h %t \"%r\" %>s %b \"%{Referer}i\"",
  48. "timestampFormat":null
  49. },
  50. "parquet":{
  51. "type":"parquet"
  52. },
  53. "json":{
  54. "type":"json",
  55. "extensions":[
  56. "json"
  57. ]
  58. },
  59. "avro":{
  60. "type":"avro"
  61. },
  62. "sequencefile":{
  63. "type":"sequencefile",
  64. "extensions":[
  65. "seq"
  66. ]
  67. },
  68. "csvh":{
  69. "type":"text",
  70. "extensions":[
  71. "csvh"
  72. ],
  73. "extractHeader":true,
  74. "delimiter":","
  75. }
  76. }
  77. }
 
4. hbase
  1. {
  2. "type":"hbase",
  3. "config":{
  4. "hbase.zookeeper.quorum":"10.10.100.62,10.10.10.52,10.10.10.53",
  5. "hbase.zookeeper.property.clientPort":"2181"
  6. },
  7. "size.calculator.enabled":false,
  8. "enabled":true
  9. }
5. hive
  1. {
  2. "type":"hive",
  3. "enabled":false,
  4. "configProps":{
  5. "hive.metastore.uris":"",
  6. "javax.jdo.option.ConnectionURL":"jdbc:derby:;databaseName=../sample-data/drill_hive_db;create=true",
  7. "hive.metastore.warehouse.dir":"/tmp/drill_hive_wh",
  8. "fs.default.name":"file:///",
  9. "hive.metastore.sasl.enabled":"false"
  10. }
  11. }
 

drill 数据源配置补充