일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- mcponaws
- VPC
- Spark
- AI
- json
- ubuntu
- amazon q
- AWS
- tgw
- AWSKRUG
- Python
- debug toolbar
- django-debug-toolbar
- django
- debug_toolbar
- SCALA APP
- ai assistant
- Eclipse
- 툴바안뜸
- git
- devops
- Amazon
- Transit Gateway
- MongoDB
- coding with ai
- pyspark
- nosql
- list
- Today
- Total
목록MongoDB (2)
STACKBASE
1. 'root' 권한 유저 생성 # admin 데이터베이스 선택 use admin db.createUser({user:'root', pwd:'password', roles:['root'] 2. mongodb 로그인 mongo -u 'username' -p 'password123' --authenticationDatase 'admin' 3. DB/Collection 생성 use createdatabse # 데이터베이스 확인 show dbs # collection 생성 db.createCollection("collectionName") # collection 확인 show collection db.collection_name.stats() # collection capped 설정하여 collection 생..
1. 실습환경 : ubuntu20.04[Virtual Box] 2. 파일경로 : /usr/spark/pyspark-mongodb-connector.py 3. 작성코드 ##Spark 연결 테스트 코드### from pyspark.sql import SparkSession # 관리자명:비밀번호@아이피주소:포트/데이터베이스.collection?authSource=admin input_uri = "mongodb://hyeongju:dbgudwn1!@127.0.0.1:27017/mydatabase.testcol?authSource=admin" output_uri = "mongodb://hyeongju:dbgudwn1!@127.0.0.1:27017/mydatabase.testcol?authSource=admin" ..