MCPcopy Index your code
hub / github.com/uber/aresdb / createTablesForDataSet

Function createTablesForDataSet

examples/examples.go:94–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92}
93
94func createTablesForDataSet() {
95 dataSetName := viper.GetString(dataSetKeyName)
96 dataSetSchemaDir := fmt.Sprintf("%s/%s", dataSetName, schemaDir)
97 schemaDirInfo, err := ioutil.ReadDir(dataSetSchemaDir)
98 panicIfErr(err)
99 for _, schemaInfo := range schemaDirInfo {
100 baseName := schemaInfo.Name()
101 tableName := strings.TrimSuffix(baseName, filepath.Ext(baseName))
102 tableSchemaPath := fmt.Sprintf("%s/%s/%s", dataSetName, schemaDir, baseName)
103 createTable(tableName, tableSchemaPath)
104 }
105}
106
107func ingestDataForDataSet() {
108 dataSetName := viper.GetString(dataSetKeyName)

Callers 1

mainFunction · 0.85

Calls 4

panicIfErrFunction · 0.85
createTableFunction · 0.85
ReadDirMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected