Google 시각화 데이터 소스 라이브러리를 사용하면 시각화 데이터 소스를 쉽게 만들 수 있습니다. 라이브러리는 Google 시각화 API 전송 프로토콜과 쿼리 언어를 구현합니다. 라이브러리에 데이터를 사용할 수 있도록 하는 데 필요한 코드만 데이터 표 형식으로 작성합니다. 데이터 테이블은 모든 열이 단일 유형인 값의 2차원 테이블입니다. 추상 클래스와 도우미 함수를 프로비저닝하면 필요한 코드를 더 쉽게 작성할 수 있습니다.
라이브러리의 가장 간단한 구현은 단일 클래스에서 상속받고, 구성원 함수를 구현하고, 데이터 세트를 서블릿 컨테이너 내에서 서블릿으로 실행하는 것입니다. 가장 간단한 구현에서는 시각화가 데이터 소스를 쿼리할 때 다음과 같은 이벤트 시퀀스가 발생합니다.
데이터 소스에서 제공하는 데이터는 구현 코드에 지정할 수 있으며, 소량의 정적 데이터에 적합합니다. 큰 데이터 세트의 경우 외부 파일 또는 데이터베이스와 같은 외부 데이터 저장소를 사용해야 할 가능성이 높습니다. 데이터 소스가 외부 데이터 저장소를 사용하는 경우 시각화에서 데이터 소스를 쿼리할 때 다음과 같은 이벤트 시퀀스가 발생합니다.
서블릿 컨테이너는 쿼리를 처리하고 데이터 소스 자바 라이브러리에 전달합니다.
라이브러리가 쿼리를 파싱합니다.
구현 코드(작성하는 코드)는 데이터 저장소에 저장된 데이터를 읽고 데이터 테이블을 라이브러리에 반환합니다. 데이터 세트가 많고 데이터 저장소에 쿼리 기능이 있다면 선택적으로 이러한 기능을 사용하여 데이터 소스의 효율성을 높일 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-07-10(UTC)"],[[["The Google Visualization Data Source Library simplifies the creation of visualization data sources by implementing the Google Visualization API wire protocol and query language."],["Developers primarily need to write code to make their data available as a data table, leveraging the library's abstract classes and helper functions."],["Data sources can be implemented as servlets, handling queries from visualizations and returning data tables for rendering."],["For larger datasets, the library supports using external data stores like files or databases, enabling efficient querying capabilities."],["The library handles query parsing, data table execution, and rendering into the response format expected by the visualization."]]],[]]