문서 메뉴
문서 홈
/
MongoDB 매뉴얼
/

데이터베이스에 Time Series 컬렉션 나열

이 페이지의 내용

  • 절차
  • 출력

데이터베이스에 컬렉션 목록을 출력하고 컬렉션 유형을 포함한 다양한 속성을 기준으로 결과를 필터링할 수 있습니다. 이 기능을 사용하여 데이터베이스의 모든 Time Series 컬렉션을 나열할 수 있습니다.

데이터베이스의 모든 time series 컬렉션을 나열하려면 { type: "timeseries" } 필터와 함께 listCollections 명령을 사용합니다.

db.runCommand( {
listCollections: 1,
filter: { type: "timeseries" }
} )

Time series 컬렉션의 경우 출력에는 다음이 포함됩니다.

  • type: 'timeseries'

  • options: { timeseries: { ... } }

예를 들면 다음과 같습니다.

{
cursor: {
id: Long("0"),
ns: 'test.$cmd.listCollections',
firstBatch: [
{
name: 'weather',
type: 'timeseries',
options: {
timeseries: {
timeField: 'timestamp',
metaField: 'metadata',
granularity: 'hours',
bucketMaxSpanSeconds: 2592000
}
},
info: { readOnly: false }
}
]
},
ok: 1
}

돌아가기

시계열 컬렉션 만들기 및 쿼리Create and Query a Time Series Collection

다음

Time Series 컬렉션(TTL)에 대한 자동 제거 설정

이 페이지의 내용