체크 record 선정


SELECT * FROM "sejong_bike"
WHERE bike_id LIKE 'SJ-0001' 
     AND user_id='junecy'
ORDER BY __time
LIMIT 1

 

 

#1 .csv 파일을 직접 vi로 수정하여 druid에 반영이 되었는지 확인 


 

$ vi data_fn.csv

# 1번 record station_rental_id = 0101로 변경

 

반영 안되는 것 확인

 

 

 

#2. druid에 record ingestion 후 druid에 반영이 되었는지 확인


Updating existing data

 

 

This spec creates a datasource called updates-tutorial from the quickstart/tutorial/updates-data.json input file.

{
  "type" : "index_parallel",
  "spec" : {
    "dataSchema" : {
      "dataSource" : "updates-tutorial",
      "timestampSpec": {
        "column": "timestamp",
        "format": "iso"
      },
      "dimensionsSpec" : {
        "dimensions" : [
          "animal"
        ]
      },
      "metricsSpec" : [
        { "type" : "count", "name" : "count" },
        { "type" : "longSum", "name" : "number", "fieldName" : "number" }
      ],
      "granularitySpec" : {
        "type" : "uniform",
        "segmentGranularity" : "week",
        "queryGranularity" : "minute",
        "intervals" : ["2018-01-01/2018-01-03"],
        "rollup" : true
      }
    },
    "ioConfig" : {
      "type" : "index_parallel",
      "inputSource" : {
        "type" : "local",
        "baseDir" : "quickstart/tutorial",
        "filter" : "updates-data2.json"
      },
      "inputFormat" : {
        "type" : "json"
      },
      "appendToExisting" : false
    },
    "tuningConfig" : {
      "type" : "index_parallel",
      "maxRowsPerSegment" : 5000000,
      "maxRowsInMemory" : 25000
    }
  }
}

 

bin/post-index-task --file quickstart/tutorial/updates-init-index.json --url http://localhost:8081

 

druid console에서 확인

 

'Database > Druid' 카테고리의 다른 글

Druid Quickstart  (0) 2020.08.21
How to install Druid 0.19.0 on Cent OS 8  (0) 2020.08.21
CentOS 8 에서 Druid Console 외부접속하기  (0) 2020.08.05
How to install Druid 0.13.0 on CentOS 8  (0) 2020.07.31
[MacOS] Druid 설치  (0) 2020.07.23

error


에러 발생 스크린샷

Superset의 대시보드에 접근할 수 없는 이슈

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file

Superset 데이터베이스에 열(Column)을 생성하다가 에러 발생

 

 

 

해결방법


1. superset 재설치

$ pip uninstall superset

 

재설치 시도 중 root 용량 부족으로 error 발생

 

 

2. CentOS 8의 가상 하드디스크 용량 증가시키기

# 먼저, 디스크가 LVM 형태로 구성되어 있는지 확인
$ df -h

# 파일 시스템 경로 복사 & 마운트 포인트와 포맷 형식 확인
$ mount | grep /dev/mapper/cl-root

 

 

# 마운트한 디스크 형태 확인
$ fdisk -l

 

 

# fdisk에서 디스크의 파티션을 설정한 뒤 디스크 타입을 Linux LVM으로 변경 후 저장
$ fdisk /dev/sda

# n -> p -> 1 -> enter -> enter -> t -> 8e -> w 순으로 입력

# 위에서 파티셔닝된 디스크 물리 볼륨으로 선언
$ pvcreate /dev/sdb

# 정상적으로 선언되었는지 확인
$ pvscan

 

 

# 볼륨 그룹 구성 확인 (이미 추가가 된 상태라 용량이 크게 나옴)
$ vgdisplay

 

 

# root 디스크가 위치한 볼륨 그룹에 root 디스크를 증설하기 위해 디스크 추가
$ vgextend centos /dev/sdb

# 잘 추가되었는지 확인
$ vgdisplay

# 논리 볼륨에 해당 디스크의 남은 공간 추가 (여기서 추가해도 실제 용량에 정상 작용 X)
$ lvextend /dev/cl/root -l +25599

# xfs_growfs를 통해 resize 실행
$ xfs_growfs /dev/cl/root

# resize 확인
$ df -h

 

 

 

3. 결과

 

 

 

참고


https://blog.naver.com/PostView.nhn?blogId=ncloud24&logNo=221872224147&parentCategoryNo=&categoryNo=79&viewDate=&isShowPopularPosts=false&from=postView

 

[CentOS] LVM으로 구성된 ROOT 디스크 확장

테스트 환경CentOS 7.6 64bit​사용 방안- 만약 ROOT 디스크 용량이 부족한 경우 다른 디스크를 추...

blog.naver.com

 

1. local disk와 연결

Base directory : quickstart/tutorial/
file filter : wikiticker-2015-09-12-sampled.json.gz

 

입력 후 데이터 확인하고 [Next: Parse data] 클릭

 

 

 

2. parse data 확인

 

input format은 json

[Next: Parse time] 클릭

 

 

 

3. parse time 확인

 

확인 후 configure schema까지 skip

 

 

 

4. configure schema에서 rollup 세팅

 

 

 

5. segment granularity 'day' 로 설정

 

[Next: Tune] -> [Next: Publish] 클릭

 

 

 

6. spec 확인 

 

 

[Submit] 클릭

 

 

data ingestion이 Running -> Success로 변하면 상단 메뉴바의 [datasources] -> 오른쪽 랜치모양 아이콘 클릭

 

 

 

7. [query with SQL] -> 쿼리문 작성 -> [run]

 

 

아래에서 쿼리에 대한 결과를 확인할 수 있다

 

 

 

 

# 파일 다운로드
$ wget [http://mirror.navercorp.com/apache/druid/0.19.0/apache-druid-0.19.0-bin.tar.gz](http://mirror.navercorp.com/apache/druid/0.19.0/apache-druid-0.19.0-bin.tar.gz)

# 압축 해제
$ tar -xzf apache-druid-0.19.0-bin.tar.gz
$ cd apache-druid-0.19.0

# druid 실행 (druid 폴더에서 명령어 실행)
$ ./bin/start-micro-quickstart

 

 

참고


https://druid.apache.org/docs/latest/operations/single-server.html#nano-quickstart-1-cpu-4gb-ram

 

Single server deployment · Apache Druid

 

'Database > Druid' 카테고리의 다른 글

Druid quickstart - Updating existing data  (0) 2020.08.28
Druid Quickstart  (0) 2020.08.21
CentOS 8 에서 Druid Console 외부접속하기  (0) 2020.08.05
How to install Druid 0.13.0 on CentOS 8  (0) 2020.07.31
[MacOS] Druid 설치  (0) 2020.07.23

encoding 추가해서 해결

data=pd.read_csv('./bikedata_test.csv', encoding="unicode_escape")
data

 

'python' 카테고리의 다른 글

[MacOS] pip3 -V이 python2.7대로 뜨는 에러  (0) 2020.08.10
virtualenv에 module 설치  (0) 2020.07.29
virtualenv로 python3.7 가상환경 생성  (0) 2020.07.29

pip이 자꾸 python2.7 버전을 경로로 잡는 문제

 

 

$ python3 -m pip install -U --force-reinstall pip

터미널에 명령어 입력

 

 

pip python 경로 변경 성공

filezilla download


https://filezilla.softonic.kr/mac

 

FileZilla

안전하고 빠른 FTP 전송

filezilla.softonic.kr

 

 

 

파일 옮기기


  • 호스트 : <ip address>
  • 사용자명 : <user>
  • 비밀번호 : <pwd>
  • 포트 : <port>

 

입력한 후에 빠른 연결 클릭 -> 로컬사이트에서 리모트사이트로 원하는 파일을 업로드

 

 

전송성공

 

+ Recent posts