Repository: oom-ai/oomstore
Pull request #1111 (2022-01-27 09:57:04)

refactor: remove feature method OnlineRevisionID


Patch:
diff --git a/internal/database/metadata/mock_metadata/store.go b/internal/database/metadata/mock_metadata/store.go
index ef0778ee..4f9f81ff 100644
--- a/internal/database/metadata/mock_metadata/store.go
+++ b/internal/database/metadata/mock_metadata/store.go
@@ -97,12 +97,13 @@ func (mr *MockStoreMockRecorder) CreateGroup(ctx, opt interface{}) *gomock.Call
 }
 
 // CreateRevision mocks base method.
-func (m *MockStore) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, error) {
+func (m *MockStore) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, string, error) {
 	m.ctrl.T.Helper()
 	ret := m.ctrl.Call(m, "CreateRevision", ctx, opt)
 	ret0, _ := ret[0].(int)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
+	ret1, _ := ret[1].(string)
+	ret2, _ := ret[2].(error)
+	return ret0, ret1, ret2
 }
 
 // CreateRevision indicates an expected call of CreateRevision.
@@ -487,12 +488,13 @@ func (mr *MockDBStoreMockRecorder) CreateGroup(ctx, opt interface{}) *gomock.Cal
 }
 
 // CreateRevision mocks base method.
-func (m *MockDBStore) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, error) {
+func (m *MockDBStore) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, string, error) {
 	m.ctrl.T.Helper()
 	ret := m.ctrl.Call(m, "CreateRevision", ctx, opt)
 	ret0, _ := ret[0].(int)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
+	ret1, _ := ret[1].(string)
+	ret2, _ := ret[2].(error)
+	return ret0, ret1, ret2
 }
 
 // CreateRevision indicates an expected call of CreateRevision.
diff --git a/internal/database/metadata/mysql/db.go b/internal/database/metadata/mysql/db.go
index 596d3489..7bffa8d6 100644
--- a/internal/database/metadata/mysql/db.go
+++ b/internal/database/metadata/mysql/db.go
@@ -104,16 +104,17 @@ func (db *DB) ListGroup(ctx context.Context, entityID *int, groupIDs *[]int) (ty
 	return sqlutil.ListGroup(ctx, db, entityID, groupIDs)
 }
 
-func (db *DB) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, error) {
+func (db *DB) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, string, error) {
 	var (
-		revisionID int
-		err        error
+		revisionID    int
+		snapshotTable string
+		err           error
 	)
 	err = db.WithTransaction(ctx, func(c context.Context, tx metadata.DBStore) error {
-		revisionID, err = tx.CreateRevision(c, opt)
+		revisionID, snapshotTable, err = tx.CreateRevision(c, opt)
 		return err
 	})
-	return revisionID, err
+	return revisionID, snapshotTable, err
 }
 
 func (db *DB) UpdateRevision(ctx context.Context, opt metadata.UpdateRevisionOpt) error {
diff --git a/internal/database/metadata/mysql/revision.go b/internal/database/metadata/mysql/revision.go
index 79482b97..898b024e 100644
--- a/internal/database/metadata/mysql/revision.go
+++ b/internal/database/metadata/mysql/revision.go
@@ -9,7 +9,7 @@ import (
 	"github.com/oom-ai/oomstore/internal/database/metadata"
 )
 
-func createRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metadata.CreateRevisionOpt) (int, error) {
+func createRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metadata.CreateRevisionOpt) (int, string, error) {
 	var snapshotTable, cdcTable string
 	if opt.SnapshotTable != nil {
 		snapshotTable = *opt.SnapshotTable
@@ -23,15 +23,15 @@ func createRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metad
 	if err != nil {
 		if er, ok := err.(*mysql.MySQLError); ok {
 			if er.Number == ER_DUP_ENTRY {
-				return 0, errdefs.Errorf("revision already exists: groupID=%d, revision=%d", opt.GroupID, opt.Revision)
+				return 0, "", errdefs.Errorf("revision already exists: groupID=%d, revision=%d", opt.GroupID, opt.Revision)
 			}
 		}
-		return 0, errdefs.WithStack(err)
+		return 0, "", errdefs.WithStack(err)
 	}
 	revisionID, err := res.LastInsertId()
 	if err != nil {
-		return 0, errdefs.WithStack(err)
+		return 0, "", errdefs.WithStack(err)
 	}
 
-	return int(revisionID), nil
+	return int(revisionID), snapshotTable, nil
 }
diff --git a/internal/database/metadata/mysql/tx.go b/internal/database/metadata/mysql/tx.go
index dcd0a012..81b0a0bb 100644
--- a/internal/database/metadata/mysql/tx.go
+++ b/internal/database/metadata/mysql/tx.go
@@ -72,7 +72,7 @@ func (tx *Tx) GetFeatureByName(ctx context.Context, groupName string, featureNam
 	return sqlutil.GetFeatureByName(ctx, tx, groupName, featureName)
 }
 
-func (tx *Tx) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, error) {
+func (tx *Tx) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, string, error) {
 	return createRevision(ctx, tx, opt)
 }
 
diff --git a/internal/database/metadata/postgres/db.go b/internal/database/metadata/postgres/db.go
index e350e047..9c5179b0 100644
--- a/internal/database/metadata/postgres/db.go
+++ b/internal/database/metadata/postgres/db.go
@@ -93,16 +93,17 @@ func (db *DB) GetFeatureByName(ctx context.Context, groupName string, featureNam
 	return sqlutil.GetFeatureByName(ctx, db, groupName, featureName)
 }
 
-func (db *DB) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, error) {
+func (db *DB) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, string, error) {
 	var (
-		revisionID int
-		err        error
+		revisionID    int
+		snapshotTable string
+		err           error
 	)
 	err = db.WithTransaction(ctx, func(c context.Context, tx metadata.DBStore) error {
-		revisionID, err = tx.CreateRevision(ctx, opt)
+		revisionID, snapshotTable, err = tx.CreateRevision(ctx, opt)
 		return err
 	})
-	return revisionID, err
+	return revisionID, snapshotTable, err
 }
 
 func (db *DB) UpdateRevision(ctx context.Context, opt metadata.UpdateRevisionOpt) error {
diff --git a/internal/database/metadata/postgres/revision.go b/internal/database/metadata/postgres/revision.go
index 3a91dd61..d750aa61 100644
--- a/internal/database/metadata/postgres/revision.go
+++ b/internal/database/metadata/postgres/revision.go
@@ -10,7 +10,7 @@ import (
 	"github.com/oom-ai/oomstore/internal/database/metadata"
 )
 
-func createRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metadata.CreateRevisionOpt) (int, error) {
+func createRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metadata.CreateRevisionOpt) (int, string, error) {
 	var snapshotTable, cdcTable string
 	if opt.SnapshotTable != nil {
 		snapshotTable = *opt.SnapshotTable
@@ -24,11 +24,11 @@ func createRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metad
 	if err := sqlxCtx.GetContext(ctx, &revisionID, insertQuery, opt.GroupID, opt.Revision, snapshotTable, cdcTable, opt.Anchored, opt.Description); err != nil {
 		if e2, ok := err.(*pq.Error); ok {
 			if e2.Code == pgerrcode.UniqueViolation {
-				return 0, errdefs.Errorf("revision already exists: groupID=%d, revision=%d", opt.GroupID, opt.Revision)
+				return 0, "", errdefs.Errorf("revision already exists: groupID=%d, revision=%d", opt.GroupID, opt.Revision)
 			}
 		}
-		return 0, errdefs.WithStack(err)
+		return 0, "", errdefs.WithStack(err)
 	}
 
-	return revisionID, nil
+	return revisionID, snapshotTable, nil
 }
diff --git a/internal/database/metadata/postgres/tx.go b/internal/database/metadata/postgres/tx.go
index 2ab96e4f..fb911e38 100644
--- a/internal/database/metadata/postgres/tx.go
+++ b/internal/database/metadata/postgres/tx.go
@@ -72,7 +72,7 @@ func (tx *Tx) GetFeatureByName(ctx context.Context, groupName string, featureNam
 	return sqlutil.GetFeatureByName(ctx, tx, groupName, featureName)
 }
 
-func (tx *Tx) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, error) {
+func (tx *Tx) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, string, error) {
 	return createRevision(ctx, tx, opt)
 }
 
diff --git a/internal/database/metadata/sqlite/db.go b/internal/database/metadata/sqlite/db.go
index e5cd99b6..ebb6a680 100644
--- a/internal/database/metadata/sqlite/db.go
+++ b/internal/database/metadata/sqlite/db.go
@@ -94,16 +94,17 @@ func (db *DB) ListGroup(ctx context.Context, entityID *int, groupIDs *[]int) (ty
 	return sqlutil.ListGroup(ctx, db, entityID, groupIDs)
 }
 
-func (db *DB) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, error) {
+func (db *DB) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, string, error) {
 	var (
-		revisionID int
-		err        error
+		revisionID    int
+		snapshotTable string
+		err           error
 	)
 	err = db.WithTransaction(ctx, func(c context.Context, tx metadata.DBStore) error {
-		revisionID, err = tx.CreateRevision(c, opt)
+		revisionID, snapshotTable, err = tx.CreateRevision(c, opt)
 		return err
 	})
-	return revisionID, err
+	return revisionID, snapshotTable, err
 }
 
 func (db *DB) UpdateRevision(ctx context.Context, opt metadata.UpdateRevisionOpt) error {
diff --git a/internal/database/metadata/sqlite/revision.go b/internal/database/metadata/sqlite/revision.go
index 85732850..7f506ee4 100644
--- a/internal/database/metadata/sqlite/revision.go
+++ b/internal/database/metadata/sqlite/revision.go
@@ -10,7 +10,7 @@ import (
 	"github.com/oom-ai/oomstore/internal/database/metadata"
 )
 
-func createRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metadata.CreateRevisionOpt) (int, error) {
+func createRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metadata.CreateRevisionOpt) (int, string, error) {
 	var snapshotTable, cdcTable string
 	if opt.SnapshotTable != nil {
 		snapshotTable = *opt.SnapshotTable
@@ -24,15 +24,15 @@ func createRevision(ctx context.Context, sqlxCtx metadata.SqlxContext, opt metad
 	if err != nil {
 		if sqliteErr, ok := err.(*sqlite.Error); ok {
 			if sqliteErr.Code() == sqlite3.SQLITE_CONSTRAINT_UNIQUE {
-				return 0, errdefs.Errorf("revision already exists: groupID=%d, revision=%d", opt.GroupID, opt.Revision)
+				return 0, "", errdefs.Errorf("revision already exists: groupID=%d, revision=%d", opt.GroupID, opt.Revision)
 			}
 		}
-		return 0, errdefs.WithStack(err)
+		return 0, "", errdefs.WithStack(err)
 	}
 	revisionID, err := res.LastInsertId()
 	if err != nil {
-		return 0, errdefs.WithStack(err)
+		return 0, "", errdefs.WithStack(err)
 	}
 
-	return int(revisionID), nil
+	return int(revisionID), snapshotTable, nil
 }
diff --git a/internal/database/metadata/sqlite/tx.go b/internal/database/metadata/sqlite/tx.go
index bf30b934..5d21cb35 100644
--- a/internal/database/metadata/sqlite/tx.go
+++ b/internal/database/metadata/sqlite/tx.go
@@ -73,7 +73,7 @@ func (tx *Tx) GetFeatureByName(ctx context.Context, groupName string, featureNam
 
 }
 
-func (tx *Tx) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, error) {
+func (tx *Tx) CreateRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, string, error) {
 	return createRevision(ctx, tx, opt)
 }
 
diff --git a/internal/database/metadata/store.go b/internal/database/metadata/store.go
index 3b7dbd3a..d6c73c06 100644
--- a/internal/database/metadata/store.go
+++ b/internal/database/metadata/store.go
@@ -40,7 +40,7 @@ type DBStore interface {
 	ListGroup(ctx context.Context, entityID *int, groupIDs *[]int) (types.GroupList, error)
 
 	// revision
-	CreateRevision(ctx context.Context, opt CreateRevisionOpt) (int, error)
+	CreateRevision(ctx context.Context, opt CreateRevisionOpt) (int, string, error)
 	UpdateRevision(ctx context.Context, opt UpdateRevisionOpt) error
 	GetRevision(ctx context.Context, id int) (*types.Revision, error)
 	GetRevisionBy(ctx context.Context, groupID int, revision int64) (*types.Revision, error)
diff --git a/oomcli/cmd/types.go b/oomcli/cmd/types.go
index 11d64446..ebb30278 100644
--- a/oomcli/cmd/types.go
+++ b/oomcli/cmd/types.go
@@ -86,7 +86,7 @@ func parseTokenLists(i interface{}) (headerTokens TokenList, dataTokens []TokenL
 				Category:         e.Group.Category,
 				ValueType:        e.ValueType,
 				Description:      e.Description,
-				OnlineRevisionID: e.OnlineRevisionID(),
+				OnlineRevisionID: e.Group.OnlineRevisionID,
 				CreateTime:       e.CreateTime,
 				ModifyTime:       e.ModifyTime,
 			})
diff --git a/pkg/oomstore/import.go b/pkg/oomstore/import.go
index 5371df60..cc939dbd 100644
--- a/pkg/oomstore/import.go
+++ b/pkg/oomstore/import.go
@@ -57,7 +57,7 @@ func (s *OomStore) csvReaderImport(ctx context.Context, opt *importOpt, dataSour
 		return 0, err
 	}
 
-	newRevisionID, err := s.createRevision(ctx, metadata.CreateRevisionOpt{
+	newRevisionID, _, err := s.createRevision(ctx, metadata.CreateRevisionOpt{
 		Revision:      time.Now().UnixMilli(),
 		GroupID:       opt.group.ID,
 		SnapshotTable: nil,
@@ -113,7 +113,7 @@ func (s *OomStore) tableLinkImport(ctx context.Context, opt *importOpt, dataSour
 	} else {
 		revision = *opt.Revision
 	}
-	newRevisionID, err := s.createRevision(ctx, metadata.CreateRevisionOpt{
+	newRevisionID, _, err := s.createRevision(ctx, metadata.CreateRevisionOpt{
 		Revision:      revision,
 		GroupID:       opt.group.ID,
 		SnapshotTable: &dataSource.TableName,
diff --git a/pkg/oomstore/import_stream.go b/pkg/oomstore/import_stream.go
index 7e70d251..06231dd6 100644
--- a/pkg/oomstore/import_stream.go
+++ b/pkg/oomstore/import_stream.go
@@ -113,7 +113,7 @@ func (s *OomStore) tableLinkImportStream(ctx context.Context, opt types.ImportSt
 		return err
 	}
 
-	_, err = s.createRevision(ctx, metadata.CreateRevisionOpt{
+	_, _, err = s.createRevision(ctx, metadata.CreateRevisionOpt{
 		Revision:    *tableSchema.TimeRange.MinUnixMilli,
 		GroupID:     group.ID,
 		CdcTable:    &dataSource.TableName,
diff --git a/pkg/oomstore/online_query.go b/pkg/oomstore/online_query.go
index 94f03817..997aadc9 100644
--- a/pkg/oomstore/online_query.go
+++ b/pkg/oomstore/online_query.go
@@ -46,7 +46,7 @@ func (s *OomStore) OnlineGet(ctx context.Context, opt types.OnlineGetOpt) (*type
 			EntityKey:  opt.EntityKey,
 			Group:      *featureList[0].Group,
 			Features:   featureList,
-			RevisionID: featureList[0].OnlineRevisionID(),
+			RevisionID: featureList[0].Group.OnlineRevisionID,
 		})
 		if err != nil {
 			return nil, err
@@ -112,7 +112,7 @@ func (s *OomStore) getFeatureValueMap(ctx context.Context, entityKeys []string,
 			EntityKeys: entityKeys,
 			Group:      *features[0].Group,
 			Features:   features,
-			RevisionID: features[0].OnlineRevisionID(),
+			RevisionID: features[0].Group.OnlineRevisionID,
 		})
 		if err != nil {
 			return nil, err
diff --git a/pkg/oomstore/push_processor.go b/pkg/oomstore/push_processor.go
index b98a4de1..6e668ff3 100644
--- a/pkg/oomstore/push_processor.go
+++ b/pkg/oomstore/push_processor.go
@@ -163,7 +163,7 @@ func (s *OomStore) newRevisionForStream(ctx context.Context, groupID int, revisi
 
 	snapshotTable := ""
 	cdcTable := dbutil.OfflineStreamCdcTableName(groupID, revision)
-	if _, err := s.createRevision(ctx, metadata.CreateRevisionOpt{
+	if _, _, err := s.createRevision(ctx, metadata.CreateRevisionOpt{
 		GroupID:       groupID,
 		Revision:      revision,
 		SnapshotTable: &snapshotTable,
diff --git a/pkg/oomstore/revision.go b/pkg/oomstore/revision.go
index bfa5e6da..d4e3dee0 100644
--- a/pkg/oomstore/revision.go
+++ b/pkg/oomstore/revision.go
@@ -25,8 +25,9 @@ func (s *OomStore) GetRevisionBy(ctx context.Context, groupID int, revision int6
 	return s.metadata.GetRevisionBy(ctx, groupID, revision)
 }
 
-func (s *OomStore) createRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, error) {
+func (s *OomStore) createRevision(ctx context.Context, opt metadata.CreateRevisionOpt) (int, string, error) {
 	var revisionID int
+	var snapshotTable string
 	var dummyRevision *types.Revision
 
 	if err := s.metadata.WithTransaction(ctx, func(c context.Context, tx metadata.DBStore) error {
@@ -36,7 +37,7 @@ func (s *OomStore) createRevision(ctx context.Context, opt metadata.CreateRevisi
 				return err
 			}
 
-			if _, err = tx.CreateRevision(ctx, metadata.CreateRevisionOpt{
+			if _, _, err = tx.CreateRevision(ctx, metadata.CreateRevisionOpt{
 				Revision:    0,
 				GroupID:     opt.GroupID,
 				Description: "dummy revision will be used at Join and Export",
@@ -50,19 +51,19 @@ func (s *OomStore) createRevision(ctx context.Context, opt metadata.CreateRevisi
 			}
 		}
 
-		revisionID, err = tx.CreateRevision(ctx, opt)
+		revisionID, snapshotTable, err = tx.CreateRevision(ctx, opt)
 		return err
 	}); err != nil {
-		return 0, err
+		return 0, "", err
 	}
 
 	if dummyRevision != nil {
 		if err := s.createSnapshotAndCdcTable(ctx, dummyRevision); err != nil {
-			return 0, err
+			return 0, "", err
 		}
 	}
 
-	return revisionID, nil
+	return revisionID, snapshotTable, nil
 }
 
 func (s *OomStore) createSnapshotAndCdcTable(ctx context.Context, revision *types.Revision) error {
diff --git a/pkg/oomstore/types/feature.go b/pkg/oomstore/types/feature.go
index 0b43d846..65fcff3e 100644
--- a/pkg/oomstore/types/feature.go
+++ b/pkg/oomstore/types/feature.go
@@ -43,13 +43,6 @@ func (f *Feature) Entity() *Entity {
 	return f.Group.Entity
 }
 
-func (f *Feature) OnlineRevisionID() *int {
-	if f.Group.Category == CategoryStream {
-		return nil
-	}
-	return f.Group.OnlineRevisionID
-}
-
 func (f *Feature) DBFullName(backend BackendType) string {
 	if backend != BackendBigQuery {
 		return f.FullName()


Test patch:
diff --git a/internal/database/metadata/test_impl/revision.go b/internal/database/metadata/test_impl/revision.go
index b0f2b1e3..1bce4f80 100644
--- a/internal/database/metadata/test_impl/revision.go
+++ b/internal/database/metadata/test_impl/revision.go
@@ -79,7 +79,7 @@ func TestCreateRevision(t *testing.T, prepareStore PrepareStoreFn, destroyStore
 
 	for _, tc := range testCases {
 		t.Run(tc.description, func(t *testing.T) {
-			actual, err := store.CreateRevision(ctx, tc.opt)
+			actual, _, err := store.CreateRevision(ctx, tc.opt)
 			require.Equal(t, tc.expected, actual)
 			if tc.expectedError != nil {
 				require.EqualError(t, err, tc.expectedError.Error())
@@ -104,7 +104,7 @@ func TestUpdateRevision(t *testing.T, prepareStore PrepareStoreFn, destroyStore
 	_, groupID := prepareEntityAndGroup(t, ctx, store)
 	group, err := store.GetGroup(ctx, groupID)
 	require.NoError(t, err)
-	revisionID, err := store.CreateRevision(ctx, metadata.CreateRevisionOpt{
+	revisionID, _, err := store.CreateRevision(ctx, metadata.CreateRevisionOpt{
 		Revision:      1000,
 		GroupID:       groupID,
 		SnapshotTable: stringPtr("offline_stream_snapshot_device_info_1000"),
@@ -203,7 +203,7 @@ func TestGetRevision(t *testing.T, prepareStore PrepareStoreFn, destroyStore Des
 	defer store.Close()
 
 	_, groupID := prepareEntityAndGroup(t, ctx, store)
-	revisionID, err := store.CreateRevision(ctx, metadata.CreateRevisionOpt{
+	revisionID, _, err := store.CreateRevision(ctx, metadata.CreateRevisionOpt{
 		Revision:      1000,
 		GroupID:       groupID,
 		SnapshotTable: stringPtr("device_info_1000"),
@@ -266,7 +266,7 @@ func TestGetRevisionBy(t *testing.T, prepareStore PrepareStoreFn, destroyStore D
 	defer store.Close()
 
 	_, groupID := prepareEntityAndGroup(t, ctx, store)
-	revisionID, err := store.CreateRevision(ctx, metadata.CreateRevisionOpt{
+	revisionID, _, err := store.CreateRevision(ctx, metadata.CreateRevisionOpt{
 		Revision:      1000,
 		GroupID:       groupID,
 		SnapshotTable: stringPtr("device_info_1000"),
@@ -390,7 +390,7 @@ func prepareRevisions(t *testing.T, ctx context.Context, store metadata.Store) (
 	})
 	require.NoError(t, err)
 	require.NoError(t, store.Refresh())
-	revisionID1, err := store.CreateRevision(ctx, metadata.CreateRevisionOpt{
+	revisionID1, _, err := store.CreateRevision(ctx, metadata.CreateRevisionOpt{
 		Revision:      1000,
 		GroupID:       groupID,
 		SnapshotTable: stringPtr("device_info_1000"),
@@ -398,7 +398,7 @@ func prepareRevisions(t *testing.T, ctx context.Context, store metadata.Store) (
 	})
 	require.NoError(t, err)
 
-	revisionID2, err := store.CreateRevision(ctx, metadata.CreateRevisionOpt{
+	revisionID2, _, err := store.CreateRevision(ctx, metadata.CreateRevisionOpt{
 		Revision:      2000,
 		GroupID:       groupID,
 		SnapshotTable: stringPtr("device_info_2000"),