appservices schema generate
Generate a schema based on a sample set of documents in a collection or from a single JSON file
When run with a selected database and collection, generates a schema based on a sample of documents; when run with the “--path” flag, generates a schema based on the JSON file at the provided path.
구문
appservices schema generate [options]
옵션
이름 | 유형 | 필수 사항 | 설명 |
---|---|---|---|
-a, --app | 문자열 | 거짓 | Specify the name or ID of an App Service on which to generate a schema |
--project | 문자열 | 거짓 | MongoDB Atlas 프로젝트의 ID 지정 |
--local | 문자열 | 거짓 | Specify the local filepath of an app to generate a schema |
-s, --datasource | 문자열 | 거짓 | Specify the name or ID of the datasource to sample from |
-d, --database | 문자열 | 거짓 | Specify the name of the database to sample from |
-c, --collection | 문자열 | 거짓 | Specify the name or ID of the collection to sample from |
--path | 문자열 | 거짓 | Specify the path to the JSON file to generate a schema from |
--title | 문자열 | 거짓 | Specify a title to name the generated schema (Note: Title can only be used with the path flag) |
-l, --limit | int | 거짓 | Specify the maximum number of documents to sample from This value defaults to 500. |
--skip | int | 거짓 | Specify the numbers of documents to skip |
--filter | 문자열 | 거짓 | Specify a filter document to sample from a subset of the data (Allowed format: '{"field": "value"}') |
--projection | 문자열 | 거짓 | Specify which fields to return in the schema (Allowed format: '{"field": 1}') |
--sort | 문자열 | 거짓 | Specify the sort order of the returned documents (Allowed format: '{"field": -1}') |
--save | 거짓 | Automatically save the schema to the filesystem (Note: The --save flag will automatically save the schema to the corresponding data_sources/datasource/database/collection folder, and prompt for the datasource, database, and collection if not given) | |
-h, --help | 거짓 | help for generate |
상속된 옵션
이름 | 유형 | 필수 사항 | 설명 |
---|---|---|---|
--profile | 문자열 | 거짓 | 프로필 지정(기본값: 'default') [자세히 알아보기] |
--telemetry | 문자열 | 거짓 | 현재 프로필에 대한 CLI 사용 추적 활성화/비활성화(기본값: 'on', 허용되는 값: 'on', 'off') |
-o, --output-target | 문자열 | 거짓 | 지정된 파일 경로에 CLI 출력 쓰기 |
-f, --output-format | 문자열 | 거짓 | CLI 출력 형식을 설정합니다(기본값: <blank>; 허용되는 값: <blank>, "JSON") |
--disable-colors | 거짓 | 모든 CLI 출력 스타일링 비활성화(예 색상, 글꼴 스타일 등) | |
-y, --yes | 거짓 | 필요한 사용자 프롬프트에 동의하여 CLI 명령을 자동으로 진행합니다. |