본문 바로가기

728x90

엉터리 개발 이야기/Superset

[Superset] iframe 으로 chart 호출 시 x-frame-options' to 'sameorigin' 에러 처리 config.py 파일에서284line => HTTP_HEADERS = {}로 변경 더보기
[Superset] X Axis Format 추가하기. Week 표시를 위해 추가 d3-time-format 참고https://github.com/d3/d3-time-format assets/javascripts/explore/stores/controls.jsx export const D3_TIME_FORMAT_OPTIONS = [ ['smart_date', 'Adaptative formating'], ['%d/%m/%Y', '%d/%m/%Y | 14/01/2019'], ['%m/%d/%Y', '%m/%d/%Y | 01/14/2019'], ['%Y-%m-%d', '%Y-%m-%d | 2019-01-14'], ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S | 2019-01-14 01:32:10'], ['%d-%m-%Y %H:%M:%S.. 더보기
[Superset] Color Scheme 추가하기 계속해서 UI 및 기능이 업데이트 되고 있네요... Style > Chart Options > Color Scheme 추가하기 assets/javascripts/modules/colors.js 파일에 export const ALL_COLOR_SCHEMES = { bnbColors, d3Category10, d3Category20, d3Category20b, d3Category20c, googleCategory10c, googleCategory20c, myColors };이 부분에 추가하면 된다.const myColors= [ '#3366cc', '#dc3912', '#ff9900', '#109618'] Color Schema Control 위치는assets/javascripts/explore/compon.. 더보기
[Superset] 'NoneType' object has no attribute 'to_dict' Table 추가 후 컬럼 정보가 안나올 때 조치방법 sqlite 를 사용하여 superset 기본 db 를 제어하면 발생하지 않는다.하지만, mysql 을 연결해서 사용하면 table 추가 시 columns 정보가 출력되지 않고, 딱히 에러 메세지도 출력되지 않아 확인이 힘들다. 확인해본 결과, table_columns 테이블에 column 정보가 입력되지 않아, chart를 그릴 때 위와 같은 에러 메세지가 출력된다. table_columns 테이블의 type 컬럼 사이즈를 늘려주면 해결된다. mariaDB에서 type 이름이 긴 경우 입력이 안되어 발생하는 문제이다. 더보기
[Superset] upgrade 하기(makedirs 에러 조치) > pip install superset --upgrade 1234567891011121314151617181920212223242526Installing collected packages: pandas, webencodings, html5lib, bleach, PyHive, superset, cffi, scandir, pure-sasl Found existing installation: pandas 0.20.3 Uninstalling pandas-0.20.3: Successfully uninstalled pandas-0.20.3 Rolling back uninstall of pandasException:Traceback (most recent call last): File "e:\workspace\py.. 더보기
[Superset] Install 시 에러 발생 처리 ( 0.23.3 버전 ) 12345678910111213 Running setup.py install for python-geohash ... Running command e:\workspace\superset-install\venv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\jh999.lim\\appdata\\local\\temp\\pip-build-wmleww\\python-geohash\\setup.py'; f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))".. 더보기
[Superset] 'module' object has no attribute 'SIGALRM' for windows SQL Lab 에서 'Run Query' 를 실행하거나, Table을 선택하면 Preview for 탭에서 아래와 같은 에러가 발생한다... 'module' object has no attribute 'SIGALRM' 찾아봤지만,,, windows는 지원 안한다고 한다..? signal 소스 코드를 보면 SIGALRM이 없다. Query 수행 시 timeout 시간보다 오래 걸리면 끝내도록 해주는 부분에서 에러가 발생한다. core.py 소스에서 def sel_json() 부분이다. 그래도 실행이 되게끔 해야하니, 주석 처리 하기로 했다.timeout 거는 걸 좀 더 봐야겠지만, 방법은 있을 듯 하다.. python을 잘 모르기 때문에 우선 실행이 되는것만 확인할 수 있게 주석 처리 하니 정상적으로 수행.. 더보기
[Superset] clone 하여 local 에서 개발하기 윈도우 환경 기준입니다. git clone fork 주소 or incubator-superset github 주소 contribution.md 파일과 내용 동일함... python 이 설치되어 있다는 가정하에.. ◆ 소스폴더가 있는 곳에서 virtualenv 설정 및 활성화> virtualenv venv> venv/Script/activate ◆ 패키지 설치, 소스 폴더로 이동> pip install -e . ◆ fabmanger 으로 admin 생성(venv/Script 내에 있음)> fabmanager create-admin --app superset : 계정과 password 설정 진행 시 아래와 같은 에러 발생...Was unable to import superset Error: [Errno 2].. 더보기

728x90