JP6416194B2 - Scalable analytic platform for semi-structured data - Google Patents
Scalable analytic platform for semi-structured data Download PDFInfo
- Publication number
- JP6416194B2 JP6416194B2 JP2016503110A JP2016503110A JP6416194B2 JP 6416194 B2 JP6416194 B2 JP 6416194B2 JP 2016503110 A JP2016503110 A JP 2016503110A JP 2016503110 A JP2016503110 A JP 2016503110A JP 6416194 B2 JP6416194 B2 JP 6416194B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- schema
- index
- user
- objects
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/211—Schema design and management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/235—Update request formulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/254—Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/80—Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
- G06F16/84—Mapping; Conversion
- G06F16/86—Mapping to a database
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本開示は、2014年3月14日出願のUS特許出願番号14/213,941に基づいて優先権を主張し、2013年3月15日出願のUS仮特許出願番号61/800,432に基づいて利益を主張する。上記出願の全ての内容を、援用により本明細書に組み込むものとする。 This disclosure claims priority based on US Patent Application No. 14 / 213,941, filed March 14, 2014, and based on US Provisional Patent Application No. 61 / 800,432, filed March 15, 2013. Claim profits. The contents of all of the above applications are incorporated herein by reference.
本開示は、スケーラブルな対話型データベースプラットフォームに関し、より詳細には、記憶や計算を組み込んだ半構造データのためのスケーラブルな対話型データベースプラットフォームに関する。 The present disclosure relates to scalable interactive database platforms, and more particularly to scalable interactive database platforms for semi-structured data incorporating storage and computation.
本明細書における背景技術の記載は、開示の文脈を一般的に示すためである。ここに現在名を挙げた発明者らの研究については、この背景技術の欄に記載の範囲まで、及び、出願時に先行技術として見なされない可能性のある背景技術の記載の態様は、本開示に対する先行技術として明示的にも暗示的にも認められない。 The background description provided herein is for the purpose of generally presenting the context of the disclosure. With respect to the researches of the inventors currently named, the embodiments described in the background art to the extent described in this background art and the background art that may not be regarded as prior art at the time of filing are disclosed No prior art is explicitly or implicitly admitted as prior art.
従来のデータベースシステムは、基礎的ストレージバックエンドと緊密に一体化されたクエリ実行エンジンを特徴とする。基礎的ストレージバックエンドは、典型的には、ブロックアドレス指定可能な、計算能力を持たない永続記憶装置からなる。これらの装置(ハードディスクドライブ及び/または半導体ドライブ)の特徴は、(a)データに連続的にアクセスするか、ランダムにアクセスするかによって、大きく異なるアクセスタイム(b)ブロックの粒度で設定された、一定の最小サイズを有するアクセスユニット(c)メインメモリより(桁が違うほど)大幅に遅いアクセスタイム、である。これらの特徴は、ストレージバックエンドが、非自明な(non-trivial)計算の能力を持たないという前提と併せて、ストレージ管理からクエリ実行、クエリ最適化まで、データベースシステムの設計に重要な影響を与えてきた。 Conventional database systems feature a query execution engine that is tightly integrated with the underlying storage backend. The underlying storage backend typically consists of block-addressable, non-computational, persistent storage. The characteristics of these devices (hard disk drive and / or semiconductor drive) are set at granularity of largely different access time (b) blocks depending on whether (a) data is accessed continuously or randomly. Access unit (c) access time with a certain minimum size (separate digits) is much slower than the main memory. These features, together with the premise that the storage backend does not have non-trivial computing capabilities, have a significant impact on database system design, from storage management to query execution to query optimization. Have given.
データベースは、本来、日々の企業活動を管理する操作可能なストアの役割を果たすものであった。データベース技術が、性能及びコストの両面で改善されるにつれて、企業においては、その後の分析のために、ますます大量の操作履歴と業務状態を保管することが必要になった。このような分析は、企業が、自社のプロセスを洞察し、最適化するのを支援して、競争力を与え、利益を増加させる。 The database originally played the role of an operable store that manages daily business activities. As database technology has improved in both performance and cost, companies have become required to store increasingly large amounts of operation history and business state for later analysis. Such analysis helps companies to insight and optimize their processes, give them a competitive edge and increase their profits.
データウェアハウジングは、これらの需要によって生じた。ビジネスデータは、構造化が進んでいることが多く、関係テーブルに容易に適合する。データウェアハウスは、本来、スケーラブルな関係データベースシステムで、このビジネスデータのオフライン分析に構造化クエリ言語(SQL:structured query language)を提供する、また、ほとんどが読み取り用の作業負荷のために最適化されている。例えば、データウェアハウスは、Teradata等の従来のシステムや、Vertica、Greenplum、Aster Data等の新しいベンダを含む。それらはSQLインタフェース、インデックス、及び、高速のカラムアクセスを提供する。 Data warehousing arose from these demands. Business data is often structured and fits easily into relational tables. Data Warehousing is essentially a scalable relational database system that provides structured query language (SQL) for off-line analysis of this business data, and most are optimized for read workloads It is done. For example, data warehousing includes conventional systems such as Teradata, and new vendors such as Vertica, Greenplum, Aster Data, and the like. They provide SQL interfaces, indexes, and fast column access.
典型的に、データウェアハウスには、様々なソースや操作システムから採集したデータが、例えば、毎晩または毎週など、定期的にロードされる。このデータから不要なデータを取り除き、キュレートし、1つのスキーマに統合し、ウェアハウスにロードするプロセスは、抽出、変換、ロード(ETL)として知られている。ソースとデータの種類が増えるにつれて、ETLプロセスの複雑さも増す。適切なスキーマを定義し、入力データを所定のスキーマに一致させることを含む、ETLを成功裏に実施することは、専門家にとって数週間も数か月もかかることであり、また、変更を行うことは難しいまたは不可能な場合がある。ETLプロセスを支援するための、Abinitio、Informatica、Pentaho等の多くのツールが市場に出ている。にもかかわらず、ETLプロセスは、一般に、面倒で、脆弱で、高価なままである。 Typically, data warehousing is periodically loaded with data collected from various sources and operating systems, such as every night or every week. The process of removing unnecessary data from this data, curating it, consolidating it into one schema, and loading it into the warehouse is known as Extract, Transform, Load (ETL). As the types of sources and data increase, the complexity of the ETL process also increases. Successful implementation of ETL, including defining the appropriate schema and matching the input data to the given schema, can take weeks or months for the expert, and make changes Things can be difficult or impossible. Many tools on the market, such as Abinitio, Informatica, Pentaho, etc., support the ETL process. Nevertheless, ETL processes generally remain cumbersome, fragile and expensive.
データ分析市場は、ビジネスユーザが、アドホックに、反復してウェアハウスのデータを分析するのを容易にする多くのビジネスインテリジェンス及び視覚化ツールで溢れている。ビジネスインテリジェンスツールは、ウェアハウスデータの多次元の集合体を構築し、ユーザが、そのデータをナビゲートして、そのデータの様々なスライス及び投影を見るのを可能にする。例えば、ビジネスユーザは、製品カテゴリ、地域、店舗ごとの月間総売上が知りたいかもしれない。また、特定のカテゴリの週間売上を掘り下げたい場合もあり、全て集めて全国の売上を知りたいかもしれない。多次元の集合体は、オンライン分析処理(OLAP)キューブとも称してよい。Business ObjectsやCognos等の多くのビジネスインテリジェンス(BI)ツールは、このような分析を可能にし、キューブにクエリを行うための多次元式(MDX)と呼ばれる言語をサポートする。また、ビジネスユーザがこれらのキューブやデータウェアハウスに直観的にナビゲートできるようにする、MicroStrategy、Tableau、Spotfire等の多くの視覚化ツールがある。 The data analytics market is flooded with many business intelligence and visualization tools that facilitate business users in an ad hoc, iteratively analyzing warehouse data. Business intelligence tools build multi-dimensional collections of warehouse data, enabling users to navigate the data and view various slices and projections of the data. For example, a business user may want to know the product category, region, monthly total sales per store. You may also want to drill down into weekly sales in a particular category, and you may want to collect them all to see sales across the country. A multi-dimensional collection may also be referred to as an online analytical processing (OLAP) cube. Many Business Intelligence (BI) tools, such as Business Objects and Cognos, allow such analysis and support a language called Multidimensional Expressions (MDX) for querying cubes. There are also many visualization tools, such as MicroStrategy, Tableau, Spotfire, etc., that allow business users to intuitively navigate to these cubes and data warehouses.
最近になって、企業が分析したいデータの種類が変わってきた。従来の実店舗だけによる企業が、オンライン化して、新しいオンラインビジネス形態になると、それらの企業は、GoogleやYahoo等のトップ企業に殺到している種類のデータを分析する必要がある。そのデータには、ウェブページ、ページビューのログ、クリックストリーム、リッチサイトサマリー(RSS)フィード、アプリケーションログ、アプリケーションサーバログ、システムログ、トランザクションログ、センサデータ、ソーシャルネットワークフィード、ニュースフィード、ブログポスト等のデータが含まれる。 Recently, the types of data that companies want to analyze have changed. When companies with only traditional stores become online and become a new online business form, those companies need to analyze the types of data that are rushing to top companies such as Google and Yahoo. Its data includes web pages, pageview logs, clickstreams, rich site summary (RSS) feeds, application logs, application server logs, system logs, transaction logs, sensor data, social network feeds, news feeds, blog posts, etc. Contains the data of
これらの半構造データは、従来のウェアハウスにあまり適合しない。これらの半構造データは、ある特有の構造を有し、その構造には一貫性がない場合がある。その構造は、経時的に素早く変化し得るし、ソースに応じて異なり得る。構造は、当然ながら、表形式ではないので、ユーザがこれらのデータに対して実行したい、クラスタリング、分類、予測などの分析は、SQLで表すのは容易ではない。これらのデータを有効に利用するための既存のツールは、面倒で、不十分である。 These semi-structured data do not fit well into traditional warehouses. These semi-structured data have certain unique structures, which may not be consistent. The structure can change rapidly over time and can differ depending on the source. Since the structure is, of course, not tabular, analysis that the user wants to execute on these data, such as clustering, classification, prediction, etc. is not easy to express in SQL. Existing tools to make effective use of these data are cumbersome and inadequate.
結果として、新しい高度にスケーラブルなストレージ及び分析プラットフォーム、Hadoopが現れた。Hadoopは、ウェブクロールや検索を管理するためにGoogleで実施されている技術から着想を得たものである。要するに、Hadoopは、データを確実に記憶するためのクラスタファイルシステムであるHadoop分散ファイルシステム(HDFS:Hadoop Distributed File System)と、より複雑な分析をサポートする基本的な平行分析エンジンMapReduceと、を提供する。これらの要素から始まって、Hadoopエコシステムは、インデックス付のオペレーショナルストアであるHBaseや、MapReduceに依存する新しいクエリインタフェースであるPigやHiveを備えるようになった。 As a result, Hadoop, a new, highly scalable storage and analysis platform, has emerged. Hadoop is inspired by technology implemented at Google to manage web crawling and search. In short, Hadoop provides Hadoop Distributed File System (HDFS), which is a cluster file system for securely storing data, and a basic parallel analysis engine MapReduce that supports more complex analysis. Do. Starting with these elements, the Hadoop ecosystem now includes HBase, an indexed operational store, and Pig and Hive, new query interfaces that rely on MapReduce.
Hiveは、クエリ最適化、キャッシュ、及び、インデックス付けのために従来のウェアハウスで見られた最適化なしに、Hadoopにクエリ層を追加するApacheプロジェクトである。その代わり、Hiveは、単に、(Hive−QLと呼ばれる)SQLのような言語のクエリをMapReduceジョブに変え、Hadoopクラスタに対して実行する。従来のビジネスユーザにとって、Hiveには3つの大きな問題がある。Hiveは、標準的SQLをサポートしておらず、動的スキーマも持たない。さらに、各Hiveクエリは、全てのソースデータを再度、構文解析するMapReduceジョブを必要とし、また、ソースデータを複数回パスすることが必要な場合が多いので、Hiveは、対話型クエリを可能にするほど高速ではない。 Hive is an Apache project that adds a query layer to Hadoop without the optimizations found in traditional warehouses for query optimization, caching and indexing. Instead, Hive simply turns queries in languages like SQL (called Hive-QL) into MapReduce jobs and executes them against Hadoop clusters. Hive has three major problems for traditional business users. Hive does not support standard SQL, nor does it have a dynamic schema. In addition, Hive enables interactive queries, as each Hive query requires a MapReduce job to parse all source data again, and often it is necessary to pass the source data multiple times. It's not as fast as it does.
Impalaは、Cloudera社のHadoopの実装における、Hive−QLクエリのためのリアルタイムエンジンである。Impalaは、Hiveのシーケンスファイルの分析を提供する、また、最終的には、ネストされたモデルをサポートし得る。しかしながら、Impalaは、動的スキーマを持たず、ユーザは、クエリするデータについて、前もってスキーマを提供する必要がある。 Impala is a real-time engine for Hive-QL queries in Cloudera's Hadoop implementation. Impala provides analysis of Hive's sequence files and may ultimately support nested models. However, Impala does not have a dynamic schema, and the user needs to provide the schema in advance for the data to be queried.
Pigは、別のApacheプロジェクトで、Hadoopのログファイルの処理のためのスキーマフリーのスクリプト言語を提供する。Pigは、Hive同様、全てをマップリデュースジョブに翻訳する。同様に、Pigは、インデックスを利用せず、対話性を求めるには速さが十分でない。 Pig is another Apache project that provides a schema-free scripting language for processing Hadoop log files. Pig, like Hive, translates everything into a map reduce job. Similarly, Pig does not use indexes and is not fast enough to seek interactivity.
Jaqlは、ジェイソン(JSON:JavaScript(登録商標) Object Notation)ログを分析するための(SQLのような宣言型言語とは違った)スキーマフリーの宣言型言語である。Pig同様、Jaqlは、Hadoopでマップリデュースプログラムにコンパイルされるので、対話に適したスピードでないことを含めて、同じ欠点を多く共有する。 Jaql is a schema-free declarative language (as opposed to a declarative language like SQL) for analyzing Jason (JSON: JavaScript Object Notation) logs. Like Pig, Jaql is compiled into a MapReduce program with Hadoop, so it shares many of the same drawbacks, including not being suitable speed for interaction.
Hadoop自体は、かなり速く普及しつつあり、クラウドで容易に手に入る。Amazonは、弾力的なマップリデュースを提供しており、クラウドで実行するHadoopのMapReduceの実装と同じくらい有効であると思われる。Amazonのクラウドベースのシンプルストレージサービス(S3:Simple Storage Service)に記憶されたデータを処理し、結果をS3に出力する。 Hadoop itself is getting pretty fast, and is easily available in the cloud. Amazon offers elastic map reduction, and appears to be as effective as Hadoop's MapReduce implementation running in the cloud. Process the data stored in Amazon's cloud-based simple storage service (S3: Simple Storage Service) and output the result to S3.
Hadoopエコシステムの長所は、3つある。一つ目は、システムは、非常に大きいサイズにスケールされるので、任意のデータ型を記憶できる。二つ目は、従来のウェアハウスに比較して非常にコストが安い(20分の一ほど)。三つ目は、オープンソースなので、単一のベンダに拘束されない。ユーザは、適切なジョブに適切なツールを選ぶ能力を欲しており、システム間のデータ移動を避けて、ジョブを完了したい。Hadoopはフレキシブルではあるが、Hadoopの使用には、深い知識を持った熟練したアドミニストレータ及びプログラマが必要であり、見つけるのが難しい。さらに、Hadoopは、対話には遅すぎる。最も簡単なクエリでさえ、実行に数分から数時間かかる。 The advantages of the Hadoop ecosystem are threefold. First, the system is scaled to a very large size, so it can store any data type. The second one is very cheap (about 20 times lower) than conventional warehouses. Third, because it is open source, it is not tied to a single vendor. Users want the ability to choose the right tool for the right job, and want to complete the job, avoiding data movement between systems. While Hadoop is flexible, using Hadoop requires skilled administrators and programmers with deep knowledge and is difficult to find. Furthermore, Hadoop is too late to talk. Even the simplest queries take minutes to hours to execute.
Dremmelは、Google内部で開発されたツールで、ネスト関係または半構造データに対するSQLベースの分析クエリを提供する。元のバージョンは、ProtoBufフォーマットのデータを扱っていた。Dremmelでは、ユーザは、全てのレコードについて、前もってスキーマを定義することが必要である。BigQueryは、Dremmelをクラウドベースに商業化したもので、CSVフォーマットやJSONフォーマットを取り扱えるように拡張されている。Drillは、Dremmelのオープンソースバージョンである。 Dremmel is a tool developed internally at Google that provides SQL-based analytic queries on nested relationships or semi-structured data. The original version was dealing with data in ProtoBuf format. In Dremmel, the user needs to define a schema in advance for every record. BigQuery is a commercialization of Dremmel as a cloud base, and has been extended to handle CSV and JSON formats. Drill is an open source version of Dremmel.
Asterixは、JSONの一般化である抽象データモデル(ADM)及び注釈クエリ言語(AQL:annotation query language)を使用する半構造データを管理、分析するためのシステムである。Asterixは、標準SQLをサポートせず、本開示によってもたらされる高速アクセスも有さない。 Asterix is a system for managing and analyzing semi-structured data using an abstract data model (ADM), which is a generalization of JSON, and an annotation query language (AQL). Asterix does not support standard SQL, nor does it have the fast access provided by the present disclosure.
データ変換システムは、スキーマ推論モジュールとエクスポートモジュールとを含む。スキーマ推論モジュールは、第1のデータソースから取り出したオブジェクトについて累積スキーマを動的に作成するように構成される。取り出した各オブジェクトは、(i)データと、(ii)そのデータを記述するメタデータとを含む。累積スキーマの動的な作成は、取り出したオブジェクトの各オブジェクトについて、(i)オブジェクトからスキーマを推論すること(ii)推論したスキーマに従ってオブジェクトを記述するように累積スキーマを選択的に更新すること、を含む。エクスポートモジュールは、取り出したオブジェクトのデータを、累積スキーマに従ってデータ宛先システムに出力するように構成される。 The data conversion system includes a schema inference module and an export module. The schema inference module is configured to dynamically create a cumulative schema for objects retrieved from the first data source. Each extracted object includes (i) data and (ii) metadata describing the data. Dynamic creation of the cumulative schema comprises, for each object of the retrieved object, (i) inferring the schema from the object (ii) selectively updating the cumulative schema to describe the object according to the inferred schema, including. The export module is configured to output the data of the retrieved object to the data destination system according to the cumulative schema.
他の特徴としては、データ宛先システムは、データウェアハウスを含む。他の特徴としては、データウェアハウスは、関係データを記憶する。他の特徴としては、エクスポートモジュールは、累積スキーマを関係スキーマに変換し、関係スキーマに従って、取り出したオブジェクトのデータをデータウェアハウスに出力するように構成される。他の特徴としては、エクスポートモジュールは、関係スキーマに行われた変更を反映するようにデータウェアハウスのスキーマを更新するようにというデータウェアハウスへのコマンドを生成するように構成される。 In other features, the data destination system includes a data warehouse. In other features, the data warehouse stores relational data. In other features, the export module is configured to convert the cumulative schema into a relational schema and output data of the retrieved object to the data warehouse according to the relational schema. In other features, the export module is configured to generate a command to the data warehouse to update the data warehouse schema to reflect the changes made to the relationship schema.
他の特徴としては、エクスポートモジュールは、関係スキーマに従って、取り出したオブジェクトのデータから、少なくとも1つの中間ファイルを作成するように構成される。他の特徴としては、少なくとも1つの中間ファイルは、所定のデータウェアハウスフォーマットを有する。他の特徴としては、エクスポートモジュールは、少なくとも1つの中間ファイルをデータウェアハウスにバルクロードするように構成される。他の特徴としては、インデックスストアは、取り出したオブジェクトからのデータをカラム形式で記憶するように構成される。他の特徴としては、エクスポートモジュールは、インデックスストアに記憶されたデータからローベースのデータを生成するように構成される。他の特徴としては、スキーマ推論モジュールは、インデックスストア内に、取り出したオブジェクトの識別子に時間値をマップする時間インデックスを作成するように構成される。 In other features, the export module is configured to create at least one intermediate file from the data of the retrieved object in accordance with the relationship schema. In another feature, the at least one intermediate file has a predetermined data warehouse format. In other features, the export module is configured to bulk load at least one intermediate file into the data warehouse. In other features, the index store is configured to store data from retrieved objects in a column format. In other features, the export module is configured to generate raw based data from data stored in the index store. In other features, the schema inference module is configured to create a time index in the index store that maps time values to identifiers of retrieved objects.
他の特徴としては、取り出したオブジェクトの各オブジェクトについて、時間値は(i)取り出したオブジェクトの作成に該当するトランザクション時間、または、(ii)取り出したオブジェクトに該当する有効時間の少なくとも1つを示す。他の特徴としては、書き込み最適化ストアは、(i)後にインデックスストアに記憶するために追加のオブジェクトをキャッシュし、(ii)キャッシュサイズが閾値に達したことに応答して、インデックスストアにバルクロードするために、追加のオブジェクトをパッケージ化するように、構成される。他の特徴としては、スキーマ推論モジュールは、取り出したオブジェクトのメタデータに関する統計を収集するように構成される。他の特徴としては、スキーマ推論モジュールは、取り出したオブジェクトのデータ型に関する統計を収集するように構成される。他の特徴としては、スキーマ推論モジュールは、データ型に関する統計に応答して、取り出したオブジェクトの一部のデータを型変換するように構成される。 In other features, for each object of the retrieved object, the time value indicates at least one of (i) transaction time corresponding to creation of the extracted object, or (ii) valid time corresponding to the extracted object . Among other features, the write optimization store (i) caches additional objects for later storage in the index store, and (ii) bulks the index store in response to the cache size reaching a threshold. Configured to package additional objects for loading. In other features, the schema inference module is configured to collect statistics on metadata of retrieved objects. In other features, the schema inference module is configured to collect statistics on data types of retrieved objects. In other features, the schema inference module is configured to cast data of a portion of the retrieved object in response to the statistics on the data types.
他の特徴としては、スキーマ推論モジュールは、データ型の統計に応答して、取り出したオブジェクトの一部のデータを不正確に型付けされている可能性があるとしてユーザに報告するように構成される。他の特徴としては、スキーマ推論モジュールは、取り出したオブジェクトのデータに関する統計を収集するように構成される。他の特徴としては、統計は、最小、最大、平均、及び、標準偏差の少なくとも1つを含む。他の特徴としては、データコレクタモジュールは、第1のデータソースから関係データを受信し、スキーマ推論モジュールが使用するオブジェクトを生成するように構成される。他の特徴としては、データコレクタモジュールは、(i)関係データの各項目を取り出すためのテーブルを示す第1のカラムと、(ii)関係データの各項目に関連付けられたタイムスタンプを示す第2のカラムとを作成することによって、関係データをイベント化するように構成される。 In other features, the schema inference module is configured to, in response to data type statistics, report to the user that data of a portion of the retrieved object may be incorrectly typed . In other features, the schema inference module is configured to collect statistics on data of retrieved objects. In other features, the statistics include at least one of minimum, maximum, average, and standard deviation. In other features, the data collector module is configured to receive relational data from the first data source and generate an object for use by the schema inference module. In other features, the data collector module includes (i) a first column indicating a table for retrieving each item of relationship data, and (ii) a second column indicating a timestamp associated with each item of relationship data. Are configured to make relational data into an event by creating a column of.
他の特徴としては、スケジューリングモジュールは、所定の依存情報に従って、ジョブの処理をスキーマ推論モジュールとエクスポートモジュールに割り当てるように構成される。他の特徴としては、エクスポートモジュールは、累積スキーマを複数のテーブルにパーティション化するように構成される。他の特徴としては、複数のテーブルの各テーブルは、取り出したオブジェクト内に一緒に現れるカラムを含む。他の特徴としては、エクスポートモジュールは、識別子要素について異なる値を有する、取り出したオブジェクトのグループに該当するカラムに従って、累積スキーマをパーティション化するように構成される。他の特徴としては、スキーマ推論モジュールは、取り出した各オブジェクトのソース識別子を記録する。他の特徴としては、取り出したオブジェクトの各オブジェクトについて、ソース識別子は、第1のデータソースの固有の識別子と、第1のデータソース内のオブジェクトの位置とを含む。 In other features, the scheduling module is configured to assign processing of the job to the schema inference module and the export module according to the predetermined dependency information. In other features, the export module is configured to partition the cumulative schema into a plurality of tables. In other features, each table of the plurality of tables includes columns that appear together in the retrieved object. In other features, the export module is configured to partition the cumulative schema according to columns corresponding to the group of retrieved objects having different values for the identifier element. In other features, the schema inference module records a source identifier for each object retrieved. In other features, for each object of the retrieved object, the source identifier includes the unique identifier of the first data source and the location of the object in the first data source.
データ変換システム操作方法は、第1のデータソースから取り出したオブジェクトについて動的に累積スキーマを作成することを含む。取り出した各オブジェクトは、(i)データと(ii)そのデータを記述するメタデータとを含む。累積スキーマの動的な作成は、取り出したオブジェクトの各オブジェクトについて、(i)オブジェクトからスキーマを推論することと(ii)推論したスキーマに従ってオブジェクトを記述するように累積スキーマを選択的に更新すること、を含む。方法は、累積スキーマに従って、取り出したオブジェクトのデータをデータ宛先システムに出力することをさらに含む。 The data transformation system operation method includes dynamically creating a cumulative schema for objects retrieved from the first data source. Each extracted object includes (i) data and (ii) metadata describing the data. Dynamic creation of the cumulative schema involves, for each object of the retrieved object, (i) inferring the schema from the object and (ii) selectively updating the cumulative schema to describe the object according to the inferred schema. ,including. The method further includes outputting the data of the retrieved object to a data destination system according to the cumulative schema.
他の特徴としては、データ宛先システムは、データウェアハウスを含む。他の特徴としては、データウェアハウスは、関係データを記憶する。方法は、累積スキーマを関係スキーマに変換することと、関係スキーマに従って、取り出したオブジェクトのデータをデータウェアハウスに出力することと、をさらに含む。方法は、関係スキーマに行われた変更を反映するようにデータウェアハウスのスキーマを更新するようにというデータウェアハウスへのコマンドを生成することをさらに含む。 In other features, the data destination system includes a data warehouse. In other features, the data warehouse stores relational data. The method further includes converting the cumulative schema to a relation schema, and outputting the retrieved object data to the data warehouse according to the relation schema. The method further includes generating a command to the data warehouse to update the data warehouse schema to reflect the changes made to the relationship schema.
方法は、関係スキーマに従って、取り出したオブジェクトのデータから少なくとも1つの中間ファイルを作成することをさらに含む。他の特徴としては、少なくとも1つの中間ファイルは、所定のデータウェアハウスフォーマットを有する。方法は、少なくとも1つの中間ファイルをデータウェアハウスにバルクロードすることをさらに含む。方法は、取り出したオブジェクトからのデータを、カラム形式でインデックスストアに記憶することをさらに含む。方法は、インデックスストアに記憶されたデータからローベースのデータを生成することをさらに含む。 The method further includes creating at least one intermediate file from the data of the retrieved object according to the relationship schema. In another feature, the at least one intermediate file has a predetermined data warehouse format. The method further includes bulk loading at least one intermediate file into the data warehouse. The method further includes storing data from the retrieved object in a column format in an index store. The method further includes generating raw based data from data stored in the index store.
方法は、インデックスストアに、取り出したオブジェクトの識別子に時間値をマップする時間インデックスを作成することをさらに含む。他の特徴としては、取り出したオブジェクトの各オブジェクトについて、時間値は、(i)取り出したオブジェクトの作成に該当するトランザクション時間、または、(ii)取り出したオブジェクトに該当する有効時間の少なくとも1つを示す。 The method further includes creating in the index store a time index that maps time values to identifiers of the retrieved objects. In other features, for each object of the retrieved object, the time value may be at least one of (i) transaction time corresponding to creation of the extracted object, or (ii) valid time corresponding to the extracted object Show.
方法は、後にインデックスストアに記憶するために追加のオブジェクトをキャッシュすることと、キャッシュサイズが閾値に達したことに応答して、インデックスストアへのバルクロードのために追加のオブジェクトをパッケージ化すること、とをさらに含む。方法は、取り出したオブジェクトのメタデータに関する統計を収集することをさらに含む。方法は、取り出したオブジェクトのデータ型に関する統計を収集することをさらに含む。 The method caches additional objects for later storage in the index store, and packages additional objects for bulk loading into the index store in response to the cache size reaching a threshold And further including. The method further includes collecting statistics on the metadata of the retrieved object. The method further includes collecting statistics regarding data types of the retrieved object.
方法は、データ型に関する統計に応答して、取り出したオブジェクトの一部のデータを型変換することをさらに含む。方法は、データ型に関する統計に応答して、取り出したオブジェクトの一部のデータを不正確に型付けされている可能性があるとしてユーザに報告することをさらに含む。方法は、取り出したオブジェクトのデータに関する統計を収集することをさらに含む。他の特徴としては、統計は、最小、最大、平均、及び、標準偏差の少なくとも1つを含む。 The method further includes retyping part of the data of the retrieved object in response to the statistics on the data type. The method further includes, in response to the data type statistics, reporting to the user the data of a portion of the retrieved object as potentially incorrect. The method further includes collecting statistics on data of the retrieved object. In other features, the statistics include at least one of minimum, maximum, average, and standard deviation.
方法は、第1のデータソースから関係データを受信することと、動的作成によって、使用するオブジェクトを生成することとを、さらに含む。方法は、(i)関係データの各項目を取り出すためのテーブルを示す第1のカラムと、(ii)関係データの各項目に関連付けられたタイムスタンプを示す第2のカラムとを作成することによって、関係データをイベント化することをさらに含む。方法は、所定の依存情報に従って、動的な作成及びエクスポートに該当するジョブの処理を割り当てることをさらに含む。 The method further includes receiving the relational data from the first data source and generating the object to use by dynamic creation. The method comprises (i) creating a first column indicating a table for retrieving each item of relationship data, and (ii) a second column indicating a time stamp associated with each item of relationship data. , Further including eventing relational data. The method further includes assigning the processing of the corresponding job to the dynamic creation and export according to the predetermined dependency information.
方法は、累積スキーマを複数のテーブルにパーティション化することをさらに含む。他の特徴としては、複数のテーブルの各テーブルは、取り出したオブジェクトに一緒に現れるカラムを含む。方法は、識別子要素について、それぞれ、異なる値を有する取り出したオブジェクトの対応するグループで見つけられるカラムに従って、累積スキーマをパーティション化することをさらに含む。方法は、取り出した各オブジェクトのソース識別子を記憶することをさらに含む。他の特徴としては、取り出したオブジェクトの各オブジェクトについて、ソース識別子は、第1のデータソースの固有の識別子と、第1のデータソース内のオブジェクトの位置とを含む。 The method further includes partitioning the cumulative schema into a plurality of tables. In other features, each table of the plurality of tables includes a column that appears together with the retrieved object. The method further includes partitioning the cumulative schema according to columns found in corresponding groups of retrieved objects having different values, respectively, for the identifier element. The method further includes storing a source identifier of each retrieved object. In other features, for each object of the retrieved object, the source identifier includes the unique identifier of the first data source and the location of the object in the first data source.
データ分析システム操作方法は、データソースからオブジェクトを取り出すことを含む。取り出した各オブジェクトは、(i)データと、(ii)そのデータを記述するメタデータとを含む。方法は、取り出したオブジェクトの各オブジェクトについて、(i)オブジェクトのメタデータとオブジェクトのデータの要素の推論されたデータ型とに基づいて、オブジェクトからスキーマを推論することと、(ii)(a)推論されたスキーマによって記述されたオブジェクトと、(b)累積スキーマによって記述された累積したオブジェクトのセットと、の両方を記述する統合スキーマを作成することと、(iii)統合スキーマを累積スキーマとして記憶することとによって、累積スキーマを動的に作成することをさらに含む。方法は、取り出した各オブジェクトのデータをデータウェアハウスにエクスポートすることをさらに含む。 A data analysis system operating method includes retrieving objects from a data source. Each extracted object includes (i) data and (ii) metadata describing the data. The method comprises, for each object of the retrieved object, (i) deducing the schema from the object based on the object's metadata and the inferred data type of the element of the object's data; (ii) (a) Creating an integrated schema that describes both the objects described by the inferred schema and (b) the accumulated set of objects described by the cumulative schema; (iii) storing the integrated schema as a cumulative schema Further comprising dynamically creating a cumulative schema by: The method further includes exporting the data of each retrieved object to a data warehouse.
他の特徴としては、方法は、累積スキーマを関係スキーマに変換することをさらに含み、エクスポートは、関係スキーマに従って行われる。他の特徴としては、動的な作成は、取り出したオブジェクトを通る第1のパス中に行われ、エクスポートは、取り出したオブジェクトを通る第2のパス中に行われる。他の特徴としては、方法は、取り出した各オブジェクトのデータをインデックスストレージサービスに記憶することをさらに含み、取り出した各オブジェクトのデータは、インデックスストレージサービスからデータウェアハウスにエクスポートされる。 In other features, the method further comprises converting the cumulative schema to a relational schema, and the exporting is performed according to the relational schema. In other features, dynamic creation occurs during a first pass through the retrieved object, and export occurs during a second pass through the retrieved object. In other features, the method further comprises storing data for each retrieved object in the index storage service, wherein data for each retrieved object is exported from the index storage service to the data warehouse.
他の特徴としては、エクスポートは、インデックスストレージサービスから、所定のデータウェアハウスフォーマットを有する中間ファイルを少なくとも1つ作成することと、少なくとも1つの中間ファイルをデータウェアハウスにバルクロードすることと、を含む。他の特徴としては、方法は、累積スキーマを関係スキーマに変換することをさらに含み、少なくとも1つの中間ファイルは、関係スキーマに従って作成される。他の特徴としては、方法は、グラフィカルユーザインタフェースを介してユーザからクエリを受信することと、(i)インデックスストレージサービスに記憶されたデータと、(ii)データウェアハウスから返信された結果、の少なくとも1つに基づいて、クエリに応答することと、をさらに含む。 In other features, the export creates from the index storage service at least one intermediate file having a predetermined data warehouse format, and bulk loading at least one intermediate file into the data warehouse. Including. In other features, the method further comprises converting the cumulative schema to a relational schema, wherein at least one intermediate file is created according to the relational schema. In other features, the method includes receiving a query from the user via the graphical user interface, (i) data stored in the index storage service, and (ii) results returned from the data warehouse. Responding to the query based on at least one further.
他の特徴としては、方法は、結果を取得するために、クエリをデータウェアハウスに渡すことをさらに含む。他の特徴としては、方法は、グラフィカルユーザインタフェースを介して最初の結果をユーザに表示することと、クエリの実行が続いている間、グラフィカルユーザインタフェースの結果を反復的に更新することと、をさらに含む。他の特徴としては、方法は、グラフィカルユーザインタフェースを介してユーザからクエリを受信することと、データウェアハウスから返信された結果に基づいてクエリに応答することと、をさらに含む。他の特徴としては、方法は、グラフィカルユーザインターフェースを介してユーザからクエリを受信することと、グラフィカルユーザインタフェースでユーザに最初の結果を表示することと、クエリの実行が続く間、グラフィカルユーザインタフェースで結果を反復的に更新することと、をさらに含む。他の特徴としては、グラフィカルユーザインタフェースで結果を更新することは、少なくとも1つのデータチャートの少なくとも1つの軸のスケーリングを更新することを含む。 In other features, the method further includes passing a query to a data warehouse to obtain a result. In other features, the method displays the initial results to the user through the graphical user interface, and iteratively updates the graphical user interface results while the execution of the query continues. Further include. In other features, the method further includes receiving a query from the user via the graphical user interface and responding to the query based on results returned from the data warehouse. In other features, the method includes receiving a query from the user via the graphical user interface, displaying the first result to the user in the graphical user interface, and executing the query in the graphical user interface. Updating the results iteratively. In other features, updating the results in the graphical user interface includes updating scaling of at least one axis of at least one data chart.
他の特徴としては、方法は、グラフィカルユーザインタフェースを介して累積スキーマをユーザに表示することと、追加データがデータソースから取り出されると、累積スキーマを更新することと、更新された累積スキーマを反映するようにグラフィカルユーザインタフェースを選択的に更新することと、をさらに含む。他の特徴としては、方法は、ユーザインタフェースにおいて、更新された累積スキーマの変更された項目を視覚的に区別することをさらに含む。他の特徴としては、方法は、新しいオブジェクトがデータソースから取得可能になるのに応答して、取り出し、動的な作成、及び、エクスポートを繰り返すことをさらに含む。他の特徴としては、方法は、エクスポートを繰り返す前に、前回のエクスポートの後、累積スキーマが変更されたか否かを決定することと、累積スキーマが変更されたと決定したことに応答して、累積スキーマの変更を反映するようにデータウェアハウスのスキーマを更新するようにという、少なくとも1つのコマンドをデータウェアハウスに送信することとを、さらに含む。 In other features, the method displays the cumulative schema to the user via the graphical user interface, updates the cumulative schema when additional data is retrieved from the data source, and reflects the updated cumulative schema Selectively updating the graphical user interface to do so. In other features, the method further comprises visually distinguishing changed items of the updated cumulative schema in the user interface. In other features, the method further includes repeating retrieval, dynamic creation, and export in response to the new object becoming available from the data source. In other features, the method accumulates in response to determining, after the previous export, whether or not the cumulative schema has changed, and determining that the cumulative schema has changed, before repeating the export. And sending at least one command to the data warehouse to update the data warehouse's schema to reflect the schema change.
本開示は、非一時的コンピュータ可読媒体に記憶された命令として具体化された、上記方法の各特徴をさらに包含する。 The present disclosure further includes the features of the above method embodied as instructions stored on a non-transitory computer readable medium.
詳細な説明及び添付の図面から、より完全に本開示を理解されよう。
本開示は、半構造データにクエリを行うための構造化クエリ言語(SQL)対応インタフェースを提供できる分析プラットフォームを記載する。説明目的のために、半構造データは、JSON(JavaScript Object Notation)フォーマットで表されるが、本開示の原理に従った他の自己記述的な半構造フォーマットも使用することができる。ソースデータは、自己記述的である必要はない。プロトコルバッファの場合のように、記述は、データから切り離すことができる。データにタグを付けるための、規則、ヒューリスティック、または、ラッパー関数がある限り、任意の入力データをJSONフォーマットに類似したオブジェクトに変換することができる。 The present disclosure describes an analysis platform that can provide a structured query language (SQL) compliant interface for querying semi-structured data. For illustrative purposes, semi-structured data is represented in JSON (JavaScript Object Notation) format, but other self-descriptive semi-structured formats in accordance with the principles of the present disclosure may also be used. Source data need not be self-describing. As in the case of the protocol buffer, the description can be separated from the data. As long as there are rules, heuristics, or wrapper functions for tagging data, any input data can be converted to an object similar to JSON format.
本開示に係る、分析プラットフォームの様々な実装において、以下の長所の一部またはすべてが実現される。 In various implementations of the analysis platform according to the present disclosure, some or all of the following advantages are realized.
スピード
分析プラットフォームは、アドホックで、探索的な、対話型分析をサポートするための高速クエリ応答時間を提供する。ユーザは、クエリを発行し、その日か翌日に結果を見るために戻る必要なく、このシステムを用いて、データに隠れた洞察を素早く発見することができる。分析プラットフォームは、採集したデータを全てインデックスで記憶するインデックスストアに依存しており、高速応答時間を可能にしている。
The speed analysis platform provides fast query response time to support ad hoc, exploratory, interactive analysis. The user can use this system to quickly find insights hidden in the data, without having to issue a query and go back to see the results that day or the next day. The analysis platform relies on an index store that stores all the collected data in an index, enabling fast response times.
BigIndex(BI)とArrayIndex(AI)という2つの主インデックスを使用している。これらのインデックスに関しては、以下に詳しく記載する。これらは、経路インデックスと、カラム指向ストアの中間物である。カラム指向ストアのように、これらのインデックスによって、クエリは関連するフィールドのデータのみを取り出すことができ、I/O(入力/出力)需要を減らして、性能を改善する。しかしながら、カラムストアとは違って、これらのインデックスは、複雑なネストされたオブジェクトや、多くのフィールドを持つコレクションに適している。他のアクセスパターンに関して、分析プラットフォームエンジンは、ValueIndex(VI)を含む補助インデックスを保持している。これについては、以下により詳細に記載する。従来のデータベースインデックスのように、ValueIndexは、特定のフィールドの値または値の範囲に、高速な対数的アクセスを提供する。これらのインデックスは、クエリを満足させるために取り出す必要のあるデータを大幅に低減して、応答時間を改善する。 We use two main indexes, BigIndex (BI) and ArrayIndex (AI). These indices are described in more detail below. These are intermediate to the path index and the column oriented store. Like column oriented stores, these indexes allow queries to retrieve only the data of the relevant field, reducing I / O (input / output) demand and improving performance. However, unlike column stores, these indexes are suitable for complex nested objects and collections with many fields. For other access patterns, the analysis platform engine maintains an auxiliary index that includes ValueIndex (VI). This is described in more detail below. Like conventional database indexes, ValueIndex provides fast logarithmic access to the value or range of values of a particular field. These indexes significantly reduce the data that needs to be retrieved to satisfy the query and improve response time.
動的スキーマ
分析プラットフォームは、データ自体からスキーマを推論するので、ユーザは、推測的に予測スキーマを知る必要はなく、データがロードされる前にスキーマを予め宣言する必要もない。半構造データは、経時的に、また、ソースが異なることによって構造が変わり得る。よって、エンジンは、データが到着すると、動的に、そのデータからスキーマ(または、構造)を計算し、更新する。この計算されたスキーマに基づいた関係スキーマがユーザに提示され、ユーザはそれを用いて、クエリを構成する。
Since the dynamic schema analysis platform infers the schema from the data itself, the user does not have to guess the prediction schema speculatively, nor does it have to predeclare the schema before the data is loaded. Semi-structural data can change in structure over time and due to different sources. Thus, the engine dynamically calculates and updates schemas (or structures) from the data as it arrives. A relation schema based on this calculated schema is presented to the user, and the user uses it to construct a query.
クエリを行う前にプログラマがデータコレクションスキーマを指定する必要があった以前の分析エンジンとは違って、本プラットフォームは、全ての採集したオブジェクト間で基礎的スキーマを計算(または、推論)する。動的スキーマ特性のために、非常にフレキシブルである。ソースデータを生成するアプリケーションは、アプリケーションが進化するにつれて、構造を変更することができる。分析者は、スキーマが期間ごとにどのように異なるかを指定する必要なく、様々な期間からデータを集計し、クエリを行うことができる。さらに、数か月かかる場合があり、スキーマに適合しないデータを除く必要があることも多い、グローバルスキーマの設計、施行を行う必要がない。 Unlike previous analysis engines, where the programmer had to specify a data collection schema prior to querying, the platform computes (or infers) a basic schema among all the collected objects. Very flexible due to dynamic schema characteristics. Applications that generate source data can change structure as the application evolves. Analysts can aggregate data and query from different time periods without having to specify how schemas differ from time period to time period. Furthermore, there is no need to design and enforce a global schema, which may take months and often need to exclude data that does not fit into the schema.
「スキーマフリー」とも記載されることがあるMapReduceやPigのような他の分析システムには、2つの大きな欠点がある。一つ目は、データにクエリを行うためには、推論されたスキーマをユーザに自動的に提示するのではなく、ユーザにスキーマを知らせる必要がある。二つ目は、あらゆるクエリに関して、オブジェクト及びオブジェクトの構造を構文解析し、解釈する。一方、分析プラットフォームは、ロード時に、オブジェクトを構文解析し、インデックスを付ける。これらのインデックスによって、上述のように、その後のクエリが、はるかに高速に実行できる。以前のエンジンは、基礎的なデータから正確で簡潔なスキーマを自動的に推論しない。 Other analysis systems such as MapReduce and Pig, which may also be described as "schema free", have two major drawbacks. First, in order to query data, it is necessary to inform the user of the schema rather than automatically presenting the inferred schema to the user. The second parses and interprets objects and object structures for every query. On the other hand, the analysis platform parses and indexes objects at load time. These indexes allow subsequent queries to execute much faster, as described above. Previous engines do not automatically infer accurate and concise schemas from underlying data.
SQL
分析プラットフォームは、標準SQLクエリインタフェース(例えば、ANSI SQL 2003に対応したインタフェース)を公開するので、ユーザは、既存のSQLツール(例えば、報告ツール、視覚化ツール、及び、BIツール)及び専門知識を活用することができる。結果として、SQLまたはSQLツールを熟知したビジネスユーザは、データウェアハウスをロードする必要なく、半構造データに直接アクセスやクエリを行うことができる。従来のSQLベースツールは、JSONや他の半構造データフォーマットを扱わないので、分析プラットフォームは、JSONオブジェクトの計算されたスキーマの関係ビューを提示する。分析プラットフォームは、正規化ビューを提示し、最適化を組み込んで、ビューのサイズを管理する。関係ビューは、スキーマで幾つかのテーブルを提示してよいが、これらのテーブルは必ずしも具体化される必要はない。
SQL
The analysis platform exposes a standard SQL query interface (for example, an interface compatible with ANSI SQL 2003), so users can find existing SQL tools (for example, reporting tools, visualization tools, and BI tools) and expertise. It can be used. As a result, business users familiar with SQL or SQL tools can directly access and query semi-structured data without having to load a data warehouse. Because traditional SQL-based tools do not handle JSON or other semi-structured data formats, the analysis platform presents a relational view of the computed schema of the JSON object. The analysis platform presents normalized views, incorporates optimizations, and manages the size of the views. Relationship views may present some tables in a schema, but these tables need not necessarily be instantiated.
半構造データをテーブル形式で表現することにより良く対応するために、分析プラットフォームは、「マップ」オブジェクトを自動で識別することができる。マップは、フィールド名及び値の両方を検索、クエリすることができるオブジェクト(または、ネストされたオブジェクト)である。例えば、あるオブジェクトは、フィールド名としての日付と、値に関してはページビューのような統計を含んでよい。関係ビューにおいては、マップは、別個のテーブルに抽出され、キーはキーカラムに、値は値カラムにとなるように、データは、ピボットされる。 In order to better correspond by representing semi-structured data in tabular form, the analysis platform can automatically identify "map" objects. A map is an object (or nested object) that can search and query both field names and values. For example, an object may include a date as a field name and statistics such as a page view for values. In the relational view, the map is extracted into separate tables, and the data is pivoted so that the key is in the key column and the value is in the value column.
スケール及び弾力性
分析プラットフォームは、大きいデータセットサイズを取り扱うためにスケーリングされる。分析プラットフォームは、内部データ構造と処理を、独立ノードに、自動的に、動的に分散させることができる。
Scale and Elasticity The analysis platform is scaled to handle large data set sizes. The analysis platform can dynamically distribute internal data structures and processes to independent nodes automatically.
分析プラットフォームは、仮想「クラウド」環境のために、設計、構築される。仮想「クラウド」環境は、Amazonウェブサービス等のパブリッククラウドや、ユーザの組織が管理、または、Rackspace等のサードパーティが提供する、仮想サーバ環境等のプライベートクラウドを含む。シンプルストレージサービス(S3:Simple Storage Service)、エラスティック計算クラウド(EC2:Elastic Compute Cloud)、及び、エラスティックブロックストレージ(EBS:Elastic Block Storage)を含む、Amazonウェブサービスの様々な構成要素を活用することができる。分析プラットフォームは、弾力的(エラスティック)である。つまり、分析プラットフォームは、需要に応じて、任意のサイズにスケールアップもスケールダウンもでき、内部のデータ構造を、Amazon S3等の長期のストアに記憶することによって、ハイバネートさせることができる。分析プラットフォームは、また、マルチテナンシー及びマルチユーザサポートを有する。 An analysis platform is designed and built for a virtual "cloud" environment. The virtual "cloud" environment includes public clouds such as Amazon web services, and private clouds such as virtual server environments managed by the user's organization or provided by third parties such as Rackspace. Leverages various components of Amazon Web Services, including Simple Storage Service (S3), Elastic Compute Cloud (EC2), and Elastic Block Storage (EBS) be able to. The analysis platform is elastic. That is, the analysis platform can be scaled up or down to any size, as needed, and can be hibernated by storing internal data structures in a long-term store such as Amazon S3. The analysis platform also has multi-tenancy and multi-user support.
分析プラットフォームは、プロキシ、メタデータサービス、クエリエグゼキュータ、及び、ストレージサービスの4つの構成要素を有するサービスベースのアーキテクチャを用いる。分析プラットフォームエンジンをスケーリングして、より大きいデータセットをサポートし、より高速な応答を提供し、かつ、より多くのユーザをサポートするために、実行エンジンを並列化し、ストレージサービスを、独立した、低コストのサーバノード全体でパーティション化する。これらのノードは、ホスト環境において、実サーバであってもよく、仮想サーバであってもよい。エグゼキュータとストレージサービスは、分離されているので、独立してスケーリングすることができる。この分離され、スケールアウトされたアーキテクチャによって、ユーザは、AWSのようなクラウド環境が提供するストレージと計算に関するオンデマンドの弾力性を活用することができる。 The analysis platform uses a service based architecture with four components: proxy, metadata service, query executor, and storage service. Parallelize the execution engine, separate storage services, low, to scale the analysis platform engine to support larger data sets, provide faster response, and support more users Partition across cost server nodes. These nodes may be real servers or virtual servers in the host environment. The executor and storage service are separated and can be scaled independently. This separated and scaled out architecture allows users to take advantage of the on-demand resiliency of storage and computing provided by cloud environments like AWS.
ストレージサービスは、様々なパーティション化戦略を備えて構成可能である。さらに、基礎的データ構造(インデックス及びメタデータ)は、使用中でないシステムをハイバネートさせるためにAmazon S3等の長期のストレージに移すことができ、コストを削減することができる。 Storage services are configurable with various partitioning strategies. Furthermore, underlying data structures (indexes and metadata) can be transferred to long-term storage such as Amazon S3 to hibernate systems that are not in use, which can reduce costs.
同期
分析プラットフォームは、その内容を、Hadoop分散ファイルシステム(HDFS)、Amazonシンプルストレージサービス(S3)、及び、MongoDB等のnoSQLストアのようなレポジトリからのソースデータと自動的に同期して、複製するように構成することができる。これらのソースについては、変更、追加、更新を絶えず監視することができるので、分析プラットフォームは、変更されたデータを採集することができる。これによって、クエリ結果を、比較的最新のものにすることができる。
Synchronization The analysis platform replicates its contents automatically, synchronized with source data from repositories such as Hadoop Distributed File System (HDFS), Amazon Simple Storage Service (S3), and noSQL stores such as MongoDB. It can be configured as follows. As these sources can be constantly monitored for changes, additions, and updates, the analysis platform can collect changed data. This allows the query results to be relatively current.
スキーマ推論
分析プラットフォームは、データがソースに出現することに応答して、以下のアクションを行う。(1)そのデータから統合された半構造(JSON等)スキーマを推論(2)そのスキーマについて関係ビューを作成(3)物理的インデックスにデータをポピュレート(4)そのインデックスを活用するクエリを実行。アクション1、2、3の一部または全ては、データソースからのデータを通るパスを一度だけにできるように、パイプライン化されてよい。
Schema Inference The analysis platform performs the following actions in response to data appearing at the source: (1) Infer a semi-structured (JSON etc.) schema integrated from the data (2) Create a relational view for the schema (3) Populate the data into a physical index (4) Execute a query that utilizes the index. Some or all of
第1のアクションであるスキーマ推論を最初に記載する。 The first action, schema inference, is described first.
半構造データの概要
JSONは、ますます、普及している自己記述的な半構造データフォーマットで、インターネットでのデータ交換に広く用いられている。本明細書では、説明のためにJSONを記載しており、以下の例も、JSONフォーマットを用いて記載しているが、本開示は、JSONに限定されない。
Overview of Semi-Structured Data JSON is an increasingly popular, self-descriptive, semi-structured data format that is widely used for data exchange on the Internet. In this specification, JSON is described for the sake of explanation, and the following example is also described using the JSON format, but the present disclosure is not limited to JSON.
簡単に言うと、JSONオブジェクトは、文字列フィールド(または、カラム)と、それに対応する、数、文字列、配列、オブジェクト等の潜在的に異なる型の値と、からなる。JSONオブジェクトは、ネストすることができ、フィールドは、配列、ネストされた配列など、多値であってよい。仕様は、http://JSON.org.に記載されている。追加の詳細は、http://tools.ietf.org/html/draft−zyp−json−schema−03で入手可能な2010年11月22日のインターネットエンジニアリングタスクフォース(IETF)draft−zyp−json−schema−03、「A JSON Media Type for Describing the Structure and Meaning of JSON Documents」に記載されており、その開示内容の全体を、援用により本明細書に組み込むものとする。バイナリJSON(BSON)等の他のJSON型を含むようにJSONは一般化されている。さらに、拡張マークアップ言語(XML:Extensible Markup Language)、Protobuf、Thrift等の、他の半構造フォーマットは、全て、JSONに変換することができる。XMLを用いる場合、クエリは、SQLではなく、XQueryに従ってよい。 Simply put, a JSON object consists of a string field (or column) and the corresponding values of potentially different types, such as numbers, strings, arrays, objects, etc. JSON objects can be nested, and fields can be multi-valued, such as arrays, nested arrays, etc. The specifications are http://JSON.org. It is described in. Additional details are available at http: // tools. ietf. November 22, 2010 Internet Engineering Task Force (IETF) draft-zyp-json-schema-03, available at org / html / draft-zyp-json-schema-03, "A JSON Media Type for Describing the Structure and Meaning of JSON Documents, the entire disclosure content of which is incorporated herein by reference. JSON is generalized to include other JSON types such as binary JSON (BSON). In addition, other semi-structured formats such as Extensible Markup Language (XML), Protobuf, Thrift, etc. can all be converted to JSON. When using XML, the query may conform to XQuery, not SQL.
下記はJSONオブジェクトの例である。
{"player": { "fname": "George", "lname": "Ruth", "nickname":
"Babe"}, "born": "February 6, 19 85",
"avg": 0.342, "HR": 714,
"teams": [ { "name": "Boston Red Sox", "years": "1914-1919"
},
{ "name": "New York Yankees", "years": "1920-1934" },
{ "name": "Boston Braves", "years": "1935" } ] }
Below is an example of a JSON object.
{"player": {"fname": "George", "lname": "Ruth", "nickname":
"Babe"}, "born": "February 6, 19 85",
"avg": 0.342, "HR": 714,
"teams": [{"name": "Boston Red Sox", "years": "1914-1919"
},
{"name": "New York Yankees", "years": "1920-1934"},
{"name": "Boston Braves", "years": "1935"}]}
半構造オブジェクトの構造は、オブジェクトごとに異なり得る。従って、同じ野球のデータにおいて、オブジェクトは、
{ "player": { "fname": "Sandy", "lname": "Koufax"}, "born":
"December 30, 19 35",
"ERA": 2.76, "strikeouts": 2396,
"teams": [ { "name": "Brooklyn / LA Dodgers", "years": "1955-
1966" } ] }
となる。
The structure of semi-structured objects may differ from object to object. Therefore, in the same baseball data, the object is
{"player": {"fname": "Sandy", "lname": "Koufax"}, "born":
"December 30, 19 35",
"ERA": 2.76, "strikeouts": 2396,
"teams": [{"name": "Brooklyn / LA Dodgers", "years": "1955-
1966 "}]}
It becomes.
スキーマは、データコレクション内に見つかり得る構造及びデータ型を記述する。スキーマは、フィールド名、それに対応する値の型、及び、ネスト関係を含む。従って、上記2つのオブジェクトのスキーマは、
{ "player": { "fname": string, "lname": string, "nickname":
string }, "born": string, "avg": number, "HR": number, "ERA":
number, "strikeouts": number,
"teams": [ { "name": string, "years": string } ] }
となる。
A schema describes the structures and data types that can be found in a data collection. The schema includes field names, their corresponding value types, and nested relationships. Thus, the schema of the above two objects is
{"player": {"fname": string, "lname": string, "nickname":
string}, "born": string, "avg": number, "HR": number, "ERA":
number, "strikeouts": number,
"teams": [{"name": string, "years": string}]}
It becomes.
上記は、スキーマを説明するためにドキュメントを通じて用いられる表記法であるが、より完全な仕様は、JSONスキーマであり、http://JSON−schema.org.で入手できる。例えば、JSONスキーマの型は、一般的に、文字列または「整数(int)」として引用符の中に含まれる。本開示では、簡潔さと読みやすさのために、引用符は省略する。 Although the above is a notation used throughout the document to describe the schema, a more complete specification is the JSON schema, http: // JSON-schema. org. Available at For example, JSON schema types are generally contained in quotation marks as strings or "integers". In the present disclosure, quotation marks are omitted for the sake of brevity and readability.
半構造オブジェクトは、あるいは、ノードとしてのフィールドと、アトミックな値としてのリーフを備えたツリーとして見ることができる。オブジェクトまたはスキーマにおける経路は、例えば、“player.fname”、“teams[].name”等のこのツリーにおける経路である。 Semi-structured objects can alternatively be viewed as a tree with fields as nodes and leaves as atomic values. The paths in the object or schema are, for example, paths in this tree such as "player.fname", "teams []. Name", etc.
反復スキーマ推論
ユーザは、データセットの質問をする前に、スキーマを知る必要がある、すなわち、クエリを行うのにどんなフィールドまたは次元が利用可能かを知る必要がある。多くの場合、分析者は、データの生成に関わっておらず、何が記録されていて、何が入手可能か、分からない。例えば、上記の野球の例では、分析者は、打者がコレクション内で観察された場合のみ、“ERA”フィールドが利用可能なことを知らない場合がある。従って、分析プラットフォームは、採集したデータから統合スキーマを計算(または、推論)し、スキーマの関係ビューを提示して、分析者がクエリを生成するのを支援する。
Iterative Schema Inference Before users can query the data set, they need to know the schema, i.e. what fields or dimensions are available to query. In many cases, analysts are not involved in the generation of data and do not know what is being recorded and what is available. For example, in the baseball example above, the analyst may not know that the "ERA" field is available only if the batter is observed in the collection. Thus, the analysis platform calculates (or infers) an integrated schema from the collected data and presents a relational view of the schema to assist the analyst in generating the query.
分析プラットフォームは、スキーマの正確さと簡潔さを最適化することを目指して、スキーマを生成することを目的としている。一般的に、正確というのは、スキーマが、観察または採集したデータ内の構造を全て表し、まだ見られない構造を許容しないこと、を意味する。簡潔というのは、スキーマが、人間が読み、解釈できるほど十分に小さいこと、を意味する。 The analysis platform aims to generate schemas, aiming to optimize the correctness and simplicity of the schemas. In general, correct means that the schema represents all structures in the observed or collected data and does not allow structures not yet found. By brevity is meant that the schema is small enough for humans to read and interpret.
スキーマを動的に作成するための一般的なアプローチは、過去のオブジェクトから推論した「現在の」スキーマを用いて開始し、新しいオブジェクトを採集しながら、スキーマを成長させる。我々は、下記のように、単純に、現在のスキーマ(S_curr)を、新しいオブジェクト(O_new)のスキーマ(type)とマージして、新しいスキーマ(S_new)
S_new = merge(S_curr, type(O_new))
とする。
A common approach to dynamically create schemas is to start with the "current" schema inferred from past objects, and grow the schema while collecting new objects. We simply merge the current schema (S_curr) with the new object (O_new) schema (type), as shown below, and the new schema (S_new)
S_new = merge (S_curr, type (O_new))
I assume.
大まかにいうと、マージプロセスは、2つのスキーマを結合し、共通のフィールド、サブオブジェクト、及び、配列を折り畳み、新しいものが現れると、新しいものを追加する。これについて、以下により詳しく記載する。 Broadly speaking, the merge process combines two schemas, folds common fields, sub-objects, and arrays, and adds new ones as they appear. This is described in more detail below.
オブジェクト
以下の例の一部は、firehoseと言うツイッター(Twitter)からのデータストリームの出力に似たデータを使用している。ツイッターfirehoseは、「ツイートされた」ツイートと、それらのツイートのメタデータ(例えば、ユーザ、場所、トピックなど)とを表すJSONオブジェクトのストリーム(終わりのないシーケンス)を供給する。これらのツイートは、現代のウェブフレームワーク(例えば、Ruby on Rails)、モバイルアプリケーション、センサ、及び、装置(電力計、サーモスタット)などで生成されるような、多くの他の型のイベントログデータと類似している。下記の例は、ツィッターデータと類似しているが、説明目的のために、実際のツイッターデータとは異なっている。
Objects Some of the following examples use data similar to the output of a data stream from Twitter called firehose. The Twitter firehose provides a stream (a sequence without end) of JSON objects representing "tweeted" tweets and their tweets metadata (e.g., user, place, topic, etc.). These tweets come with many other types of event log data, such as those generated by modern web frameworks (eg Ruby on Rails), mobile applications, sensors and devices (power meters, thermostats) etc. It is similar. The example below is similar to Twitter data, but differs from the actual Twitter data for illustrative purposes.
基本的なJSONオブジェクトは、取り扱いが容易である。すなわち、単純にオブジェクトに見られる型を推論する。例えば、下記のオブジェクトを考える。
{ "created_at": "Thu Nov 08", "id": 266353834,
"source": "Twitter for iPhone",
"text": "@ilstavrachi: would love dinner. Cook this:
http://bit.ly/955Ffo",
"user": { "id": 29471497, "screen_name": "Mashah08" },
"favorited": false}
Basic JSON objects are easy to handle. That is, simply infer the types found in the object. For example, consider the following object:
{"created_at": "Thu Nov 08", "id": 266353834,
"source": "Twitter for iPhone",
"text": "@ilstavrachi: would love dinner. Cook this:
http://bit.ly/955Ffo ",
"user": {"id": 29471497, "screen_name": "Mashah08"},
"favorited": false}
オブジェクトから推論されたスキーマは、
{ "created_at": string, "id": number, "source": string, "text":
string,
"user": { "id": number, "screen_name": string }, "favorited":
boolean }
となる。
The schema inferred from the object is
{"created_at": string, "id": number, "source": string, "text":
string,
"user": {"id": number, "screen_name": string}, "favorited":
boolean}
It becomes.
新しいオブジェクトが到着すると、フィールドのセットに関して統合を行うことによって、新しいフィールドを追加することができる。時には、フィールドは繰り返されるが、その型が異なり、型多様性と呼ばれる状態になる。スキーマは、同じキーを有する複数の属性を用いて、型多様性を表す。. When new objects arrive, new fields can be added by merging on the set of fields. Sometimes the field is repeated but its type is different and it becomes a condition called type diversity. A schema represents type diversity using multiple attributes with the same key. .
ログフォーマットは、よく変わるので、開発者は新しいフィールドを追加、または、フィールド型の変更を行ってよい。具体例として、ツイートを識別する“id”フィールドを考える。“id”フィールドは、元々は、数字であった。しかしながら、ツイートの数が増えるにつれて、一部のプログラミング言語は、大きな数字を処理できなくなり、“id”フィールドは、文字列に変更された。従って、その形式の新しいレコードは、
{ "created_at": "Thu Nov 10", "id": "266353840",
"source": "Twitter for iPhone",
"text": "@binkert: come with me to @ilstavrachi place",
"user": { "id": 29471497, "screen_name": "Mashah08" },
"retweet_count": 0 }
となる。
The log format changes often, so developers may add new fields or make field type changes. As a specific example, consider an "id" field that identifies a tweet. The "id" field was originally a number. However, as the number of tweets increased, some programming languages could not handle large numbers and the "id" field was changed to a string. Thus, a new record of that format is
{"created_at": "
"source": "Twitter for iPhone",
"text": "@binkert: come with me to @ilstavrachi place",
"user": {"id": 29471497, "screen_name": "Mashah08"},
"retweet_count": 0}
It becomes.
文字列“id”が見られ、新しいフィールド“retweet_count”が出現したので、スキーマは下記のように補強される。
{ "created_at": string, "id": number, "id": string, "source":
string, "text": string,
"user": { "id": number, "screen_name": string },
"retweet_count": number }
As the string "id" is seen and a new field "retweet_count" appears, the schema is augmented as follows.
{"created_at": string, "id": number, "id": string, "source":
string, "text": string,
"user": {"id": number, "screen_name": string},
"retweet_count": number}
“id”が一度は文字列として、一度は数字として、二度現れることに留意する。時には、ネストされたオブジェクトの構造が変わる。例えば、下記のように、ユーザに関するプロファイル情報をさらに追加したとしよう。
{ "created_at": "Thu Nov 10", "id": "266353875",
"source": "Twitter for iPhone",
"text": "@binkert: come with me to @ilstavrachi place",
"user": { "id": "29471755", "screen_name": "mashah08",
"location": "Saratoga, CA", "followers_count": 22 },
"retweet_count": 0 }
Note that "id" appears twice, once as a string and once as a number. Sometimes the structure of nested objects changes. For example, suppose you add more profile information about a user, as shown below.
{"created_at": "
"source": "Twitter for iPhone",
"text": "@binkert: come with me to @ilstavrachi place",
"user": {"id": "29471755", "screen_name": "mashah08",
"location": "Saratoga, CA", "followers_count": 22},
"retweet_count": 0}
この場合、プラットフォームは、“user”のネストされたスキーマを再帰的にマージして、下記のスキーマを得る。
{ "created_at": string, "id": number, "id": string, "source":
string, "text": string,
"user": { "id": number, "id": string, "screen_name": string,
"location": string, "followers_count": number },
"retweet_count": number }
In this case, the platform recursively merges the nested schema of "user" to obtain the following schema:
{"created_at": string, "id": number, "id": string, "source":
string, "text": string,
"user": {"id": number, "id": string, "screen_name": string,
"location": string, "followers_count": number},
"retweet_count": number}
ヌル(Null)フィールドと空のオブジェクト
JSONレコードには空のオブジェクトまたはヌルフィールドが、存在し得る。例えば、人の座標(緯度及び経度)のレコードが、
{ "coordinates": {} }
の場合、
スキーマは、下記のように、全く同じ型になる。
{ "coordinates": {} }
厳密に言うと、{}は、インスタンスと呼ばれ、型は、オブジェクトである。本開示の実施例及び説明は、説明を容易にするために厳密なJSONとは異なっている。
Null Fields and Empty Objects There may be empty objects or null fields in the JSON record. For example, a record of human coordinates (latitude and longitude)
{"coordinates": {}}
in the case of,
The schema is exactly the same type, as shown below.
{"coordinates": {}}
Strictly speaking, {} is called an instance, and the type is an object. The embodiments and description of the present disclosure differ from strict JSON to facilitate the description.
同様に、下記のオブジェクト
{ "geo": null }
は、全く同じ型
{ "geo": null }
を有する。
Similarly, the objects below
{"geo": null}
Is exactly the same type
{"geo": null}
Have.
後続のレコードが、オブジェクトについて値を有する場合、空のオブジェクトは、マージを適用することによって書き込まれる。例えば、レコード
{ "coordinates": {} }
{ "coordinates": {"type": "Point"} }
から、下記のスキーマが生成される。
{ "coordinates": {"type": string} }
If the following record has a value for an object, an empty object is written by applying a merge. For example, a record
{"coordinates": {}}
{"coordinates": {"type": "Point"}}
The following schema is generated from
{"coordinates": {"type": string}}
ヌル型は、同様に、観察された型によって置き換えられる。例えば、レコード
{ "geo": null }
{ "geo": true }
は、下記のスキーマを生成する。
{ "geo": boolean }
The null form is likewise replaced by the observed form. For example, a record
{"geo": null}
{"geo": true}
Generates the following schema:
{"geo": boolean}
配列
ツイートは、ハッシュタグ(強調されるトピックの単語)、url、他のツイッターユーザの記載等の項目を含むことが多い。ツイッターfirehoseは、例えば、ツイートのJSONオブジェクトに含めるために、自動的にこれらの項目を構文解析し、抽出してよい。下記の例では、ハッシュタグのメタデータを用いて、配列のスキーマをどのように推論するかを説明する。
Sequences Tweets often contain items such as hashtags (words for highlighted topics), urls, descriptions for other Twitter users, and so on. Twitter firehose may automatically parse and extract these items for inclusion in the JSON object of the tweet, for example. The following example uses hashtag metadata to illustrate how to deduce the schema of an array.
最初に、下記のツイート(または、文字列)のハッシュタグの開始オフセットのリストを抽出、記録することを考える。
"#donuts #muffins #biscuits"
これらのオフセットは、下記の配列で表してよい。
{ "offsets": [0, 8, 17] }
First, consider extracting and recording a list of hash tag start offsets of the following tweets (or strings):
"#donuts #muffins #biscuits"
These offsets may be represented by the following arrangement:
{"offsets": [0, 8, 17]}
ソースデータの配列は、ソース配列に見られる要素の型を含む配列として、順序は関係なく、スキーマで表される。従って、上記オブジェクトのスキーマは、
{ "offsets": [number] }
である。
An array of source data is represented by a schema, regardless of order, as an array containing the types of elements found in the source array. Thus, the schema of the above object is
{"offsets": [number]}
It is.
後の処理のために、オフセットと共にハッシュタグを含めたい場合、ツイートオブジェクトは、下記のように、ハッシュタグとオフセットの両方を配列の中に列挙してよい。
{ "tags": [0, "donuts", 8, "muffins", 17, "biscuits"] }
対応するスキーマは、下記のように、配列に両方の型を含む。
{ "tags": [ number, string ] }
If you want to include a hashtag with the offset for later processing, the Tweet object may list both the hashtag and the offset in the array, as described below.
{"tags": [0, "donuts", 8, "muffins", 17, "biscuits"]}
The corresponding schema contains both types in the array, as follows:
{"tags": [number, string]}
あるいは、タグ及びオフセットは、下記のように、置き換えられてもよい。
{ "tags": ["donuts", 0, "muffins", 8, "biscuits", 17] }
“tags”配列は、文字列、数字のどちらも含むことができるので、結果として生じるスキーマは、
{ "tags": [ string, number ] }
となる。
Alternatively, tags and offsets may be replaced as follows.
{"tags": ["donuts", 0, "muffins", 8, "biscuits", 17]}
The "tags" array can contain either strings or numbers, so the resulting schema is
{"tags": [string, number]}
It becomes.
実際に、タグテキスト及びタグオフセットは、下記のように、隣り合うオブジェクトに含めることができる。
{ "tags": ["donuts", "muffins", "biscuits"] },
{ "tags": [0, 8, 17] }
“tags”に関する2つのスキーマがある。
{ "tags": [string] } and { "tags": [number] }
この場合、配列は、同じ深さにあるので、マージして、上記と同じスキーマを生成することができる。
{ "tags": [ string, number ] }
In fact, tag text and tag offsets can be included in adjacent objects, as described below.
{"tags": ["donuts", "muffins", "biscuits"]},
{"tags": [0, 8, 17]}
There are two schemas for "tags".
{"tags": [string]} and {"tags": [number]}
In this case, the arrays are at the same depth, so they can be merged to generate the same schema as above.
{"tags": [string, number]}
また、下記のスキーマは、全く同じであることに留意する。
{ "tags": [string, number] }
{ "tags": [number, string] }
これは、型のリストがセットとして扱われたからである。配列要素の型は、可能な場合、マージされ、マージは、配列内の、オブジェクト及び配列に対してさらに行われる。様々な他の実装において、(配列及びオブジェクトの両方における)型の順序、及び、型間の依存性は、保存することができる。しかしながら、これによって、スキーマの簡潔さは低下する。
Also note that the following schema is exactly the same.
{"tags": [string, number]}
{"tags": [number, string]}
This is because the list of types was treated as a set. Array element types are merged, where possible, and merging is further performed on objects and arrays within the array. In various other implementations, the order of types (both in arrays and objects) and dependencies between types can be preserved. However, this reduces the simplicity of the schema.
ネストされたオブジェクト
ネストされたオブジェクトを説明するために、開始オフセットと終了オフセットの両方が下記のように記録されているとしよう。
{ "tags": [{ "text": "donuts", "begin": 0 }, { "text": "donuts",
"end": 6 }]}
結果として生じるスキーマは、
{ "tags": [{"text": string, "begin": number,
"end": number }〕 }
となる。
このように、オブジェクト型は、配列要素を別個に型付けせずに、マージされる。
Nested Objects To illustrate nested objects, let us assume that both the start and end offsets are recorded as follows:
{"tags": [{"text": "donuts", "begin": 0}, {"text": "donuts",
"end": 6}]}
The resulting schema is
{"tags": [{"text": string, "begin": number,
"end": number}]}
It becomes.
Thus, object types are merged without separately typing array elements.
同様に、タグ文字列及びオフセットが、ネストされた配列内にある場合、
{ "tags": [ [ "donuts", "muffins" ], [0,8] ] } ==>
{ "tags": [[string], [number]]},
スキーマは、さらに、縮小されて、
{ "tags": [[string, number]]}
となる。
これは、本開示の様々な実装において行われる、スキーマの正確さと、スキーマの簡潔さとの間のトレードオフである。
Similarly, if the tag string and the offset are in a nested array:
{"tags": [["donuts", "muffins"], [0,8]]} ==>
{"tags": [[string], [number]]},
The schema is further reduced,
{"tags": [[string, number]]}
It becomes.
This is a trade-off between schema correctness and schema simplicity, which is done in various implementations of the present disclosure.
空のオブジェクト及び空の配列は、下記のように扱われる。空のオブジェクトは、上記のように書き込まれるので、下記の例のスキーマの縮小が可能である。
{ "parsed": { "tag": {}, "tag": { "offset": number } } }
=> { "parsed": { "tag": { "offset": number }}
同様に、配列に関するマージ規則を用いて、下記のスキーマ縮小を行う。
{ "tags": [[], [ number ]] } => { "tags": [[ number ]] }
{ "tags": [[], [[]]] } => { "tags": [[[]]] }
{ "tags": [[], [[]], [number]] } => { "tags": [[[]], [number]] }
=> { "tags": [[[], number]]] }
Empty objects and empty arrays are treated as follows: Since empty objects are written as above, it is possible to reduce the schema of the example below.
{"parsed": {"tag": {}, "tag": {"offset": number}}}
=>{"parsed":{"tag":{"offset": number}}
Similarly, the following schema reduction is performed using merge rules for arrays.
{"tags": [[], [number]]} =>{"tags": [[number]]}
{"tags": [[], [[]]]} =>{"tags": [[[]]]}
{"tags": [[], [[]], [number]]} =>{"tags": [[[]], [number]]}
=>{"tags": [[[], number]]]}
マージ手順
以前のスキーマと新しいオブジェクトから新しいスキーマを作成するために、分析プラットフォームは、最初に、新しいオブジェクトを型付け(すなわち、新しいオブジェクトのスキーマを計算)する。この手順は、型付けのための標準的意味論(canonical semantics)を特定することを意図しており、特定の実装を記載することを意図したものではない。下記の記載において、変数v,w,v_j,w_jは、任意の有効なJSON値の範囲に亘ってよく、j,k,j_m,k_nは、有効な文字列に亘ってよい。型付けの基本的規則は、下記のようになる。
type(scalar v) = scalar_type of v
type({ k_l: v_l, ..., k_n: v_n }) =
collapse({ k_l: type(v_l), ..., k_n: type(v_n) })
type([ v_1, ..., v_n ]) =
collapse([ type(v_l), type(v_n) ])
Merge Procedure In order to create a new schema from the old schema and the new object, the analysis platform first types in the new object (ie calculates the schema of the new object). This procedure is intended to identify canonical semantics for typing, and is not intended to describe a particular implementation. In the following description, the variables v, w, v_j, w_j may span any valid JSON value range, and j, k, j_m, k_n may span valid strings. The basic rules of typing are as follows:
type (scalar v) = scalar_type of v
type ({k_l: v_l, ..., k_n: v_n}) =
collapse ({k_l: type (v_l), ..., k_n: type (v_n)})
type ([v_1, ..., v_n]) =
collapse ([type (v_l), type (v_n)])
第1の規則は、3や“a”等のスカラについて、対応する型は、値自体(3という数字、または、“a”という文字列)から直接推論されると、単純に述べている。第2、第3の規則は、折り畳み関数を用いて、オブジェクトと配列を再帰的に型付けする。
The first rule simply states that for scalars such as 3 or "a", the corresponding type is inferred directly from the value itself (
折り畳み関数は、オブジェクトの同じフィールドの型を繰り返しマージし、配列内のオブジェクト、配列、及び、共通の型をマージする。マージは、スカラ型に到達するまで、再帰的に続けられる。オブジェクトについて、折り畳み関数は、下記のようになる。
collapse({ k_l: v_l, ..., k_n: v_n }):
while k_i == k_j:
if v_i, v_j are scalar types and v_i == v_j OR
v_i, v_j are objects OR v_i, v_j are arrays:
replace {..., k_i: v_i, ..., k_j: v_j, ...}
with {..., k_i: merge(v_i, v_j), ...}
The folding function repeatedly merges the types of the same field of objects, and merges the objects in the array, the array, and the common types. Merging continues recursively until a scalar type is reached. For an object, the folding function is
collapse ({k_l: v_l, ..., k_n: v_n}):
while k_i == k_j:
if v_i, v_j are scalar types and v_i == v_j OR
v_i, v_j are objects OR v_i, v_j are arrays:
replace {..., k_i: v_i, ..., k_j: v_j, ...}
with {..., k_i: merge (v_i, v_j), ...}
配列については、折り畳み関数は、下記のようになる。
collapse ( [ v_l, ..., v_n ] ) :
while v_i, v_j are scalar types and v_i == v_j OR
v_i, v_j are objects OR v_i, v_j are arrays:
replace [..., v_i, ..., v_j, ...]
with [..., merge(v_i, v_j), ...]
For an array, the folding function is
collapse ([v_l, ..., v_n]):
while v_i, v_j are scalar types and v_i == v_j OR
v_i, v_j are objects OR v_i, v_j are arrays:
replace [..., v_i, ..., v_j, ...]
with [..., merge (v_i, v_j), ...]
マージ関数は、どのようにして二つ一組に値を組み合わせて、重複しているものを除き、配列/マップを組み合わせるかを記述する。オブジェクトについては、マージは、単純に、折り畳みを再帰的に呼び出し、共通のフィールドを折り畳む。
merge(v, v) = v
merge({}, { k_l: v_l, ..., k_n: v_n }) = { k_l: v_l, ..., k_n: v_n }
merge({ j_l: v_l, ..., j_n: v_n }, { k_l: w_l, ..., k_m: w_m } )
= collapse({ j_l: v_l,_ ..., j_n: v_n, k_l: w_l, ..., k_m: w_m
} )
The merge function describes how to combine values in pairs, remove duplicates, and combine arrays / maps. For objects, merges simply call folding recursively to fold common fields.
merge (v, v) = v
merge ({}, {k_l: v_l, ..., k_n: v_n}) = {k_l: v_l, ..., k_n: v_n}
merge ({j_l: v_l, ..., j_n: v_n}, {k_l: w_l, ..., k_m: w_m})
= collapse ({j_l: v_l, _ ..., j_n: v_n, k_l: w_l, ..., k_m: w_m
})
同様に、配列については、下記のようになる。
merge([], [v_l, ..., v_n]) = [v_l, ..., v_n]
merge([v_l, ..., v_n], [w_l, ..., w_m])
= collapse([v_l, ..., v_n w_l, ..., w_m])
Similarly, the sequence is as follows.
merge ([], [v_l, ..., v_n]) = [v_l, ..., v_n]
merge ([v_l, ..., v_n], [w_l, ..., w_m])
= collapse ([v_l, ..., v_n w_l, ..., w_m])
ヌルは、下記のように、保存される。
merge ( { "coordinates": { } }, { "coordinates": null },
{ "coordinates": [] } )
= { "coordinates": { }, "coordinates": [],"coordinates"null }
JSONのヌル(null)は、数字の9が値であるように、値である。関係では、NULLは、特定された値がなかったことを示す。SQLにおいては、ヌル値は、tags<null>:booleanで表される。ここで、Boolean値は、ヌル値が存在すれば、真(True)であり、さもなければ、NULLである。SQLユーザのためのスキーマを単純化するために、ユーザが、JSONのヌル値とSQLのヌル値とを区別する必要がない場合、coordinates<null>カラムは、省略することができる。
Nulls are stored as follows:
merge ({"coordinates": {}}, {"coordinates": null},
{"coordinates": []})
= {"coordinates": {}, "coordinates": [], "coordinates" null}
JSON null is a value, as the
累積例
上記の簡単な規則を用いると、深くネストされたJSONレコードを型付けすることが可能である。例えば、ウェブページのページビュー統計を表す複雑な仮想(hypothetical)レコードを考える。
{ "stat": [ 10, "total_pageviews", { "counts": [1, [3]],
"page_attr": 7.0 }, { "page_attr": ["internal"]} ]}
下記のスキーマが生成される。
{ "stat": [number,
string,
{ "counts": [number, [number]]
"page_attr": number,
"page_attr": [string]
}〕}
Cumulative Example With the simple rules above, it is possible to type deeply nested JSON records. For example, consider a complex hypothetical record that represents page view statistics of a web page.
{"stat": [10, "total_pageviews", {"counts": [1, [3]],
"page_attr": 7.0}, {"page_attr": ["internal"]}]}}
The following schema is generated:
{"stat": [number,
string,
{"counts": [number, [number]]
"page_attr": number,
"page_attr": [string]
}]}
様々な実施において、JSONスキーマフォーマットを用いて、推論されたスキーマを符号化することができる。このフォーマットは、標準化されており、追加のメタデータ(例えば、オブジェクトがマップであるか否か)を組み込むために容易に拡張することができる。しかしながら、かなり冗長で、スペース効率が良くないので、本開示の実施例には用いていない。例えば、JSONスキーマフォーマットにおいては、上記スキーマは、下記のように表される。
{
"type": "object",
"properties": {
"stat": {
"items": {
"type": [
"number",
"string",
{
"type": "object",
"properties": {
"counts": {
"items": {
"type": [
"number",
{
"items": {
"type": "number"
},
"type": "array"
}
〕
},
"type": "array"
},
"page_attr": {
"type": [
" “number",
{
"items": {
"type": "string"
},
"type": "array"
}
〕
}
}
}
〕
},
"type": "array
}
}
}
In various implementations, the JSON schema format can be used to encode inferred schemas. This format is standardized and can be easily extended to incorporate additional metadata (eg, whether the object is a map or not). However, it is not used in the embodiments of the present disclosure because it is rather redundant and space efficient. For example, in the JSON schema format, the above schema is expressed as follows.
{
"type": "object",
"properties": {
"stat": {
"items": {
"type": [
"number",
"string",
{
"type": "object",
"properties": {
"counts": {
"items": {
"type": [
"number",
{
"items": {
"type": "number"
},
"type": "array"
}
]
},
"type": "array"
},
"page_attr": {
"type": [
"" Number ",
{
"items": {
"type": "string"
},
"type": "array"
}
]
}
}
}
]
},
"type": "array
}
}
}
マップ装飾
開発者及び分析者は、多くの異なる目的のために、JSONオブジェクトと配列を使用することができる。特に、JSONオブジェクトは、オブジェクト及び「マップ」の両方として、頻繁に用いられる。例えば、開発者は、フィールドが日付で、値がページビューのような収集された統計である、オブジェクトを作成するかもしれない。別の実施例は、フィールドがユーザidで、値がプロファイルである。これらの場合、オブジェクトは、静的オブジェクトというよりもマップデータ構造に近い。フィールド名はとても多いので、ユーザは、可能なフィールド名を必ずしも知っているわけではなく、フィールド名は動的に作成される。結果として、ユーザは、値をクエリするのと同じように、フィールドをクエリしたい場合がある。
Map Decorations Developers and analysts can use JSON objects and arrays for many different purposes. In particular, JSON objects are frequently used as both objects and "maps". For example, a developer may create an object whose fields are dates and values are collected statistics such as page views. Another example is that the field is a user id and the value is a profile. In these cases, objects are closer to map data structures than static objects. Because field names are so numerous, users do not necessarily know the possible field names, and field names are created dynamically. As a result, the user may want to query the field as well as querying the value.
この使用をサポートするために、分析プラットフォームは、マップを識別することができる。分析プラットフォームは、ヒューリスティックスを組み込んで、マップを識別する、また、どのネストされたオブジェクトをマップとして扱うべきか、扱うべきでないかをユーザが指定するのを可能にする。オブジェクトをマップとしてタグ付けすることは、装飾と呼ばれる。 To support this use, the analysis platform can identify maps. The analysis platform incorporates heuristics to identify the map and also allows the user to specify which nested objects should or should not be treated as maps. Tagging an object as a map is called decoration.
一般に、装飾は、初期ロード後に行われる。すなわち、初期採集でマップを識別する必要はない。装飾は、後に、第2のパスで、あるいは、データがさらに採集された後に行うことができる。さらに、マップは、必要に応じて、単純にオブジェクトに戻すことができる。 In general, the decoration is done after the initial loading. That is, there is no need to identify the map at initial collection. The decoration can be done later in the second pass or after the data has been collected further. In addition, maps can simply be turned back into objects as needed.
デフォルト設定で、JSONオブジェクトは、オブジェクト(または、C言語では、構造体)として扱われる。これは、オブジェクトに“obj_type”:objectと注釈を付けることによって、JSONスキーマにおいて明示的に示すことができる。下記の例において使用される省略表記はO{}である。 By default, JSON objects are treated as objects (or structures in C). This can be explicitly indicated in the JSON schema by annotating the object as "obj_type": object. The shorthand notation used in the examples below is O {}.
マップにフラグを立てるために、ヒューリスティックスは、フィールドを含有するオブジェクト(コンテナ)と比べて、グループとして比較的まれに発生するフィールドを探す。マップに対しては、省略表記M{}が使用される。 To flag the map, the heuristics look for fields that occur relatively infrequently as a group compared to the object (container) that contains the fields. For maps, the shorthand notation M {} is used.
第1のパスでスキーマを計算する間、フィールドが発生する頻度を追跡する。データセットで頻度Fで発生するオブジェクト(またはネストされたオブジェクト)を考える。v_iをオブジェクトにおけるフィールドiの頻度とし、Nを(型とは無関係に)オブジェクトの固有フィールドの数とする。割合(sum(v_i)/N)/Fは、コンテナの頻度に対する平均フィールド頻度の割合である。この割合が、ユーザが設定可能な0.01等の閾値未満の場合、含有オブジェクトは、マップとして指定される。様々な実装において、JSONスキーマにおける空のオブジェクトは、マップとして扱われる。 While computing the schema in the first pass, track the frequency with which the field occurs. Consider an object (or nested object) that occurs at frequency F in the data set. Let v_i be the frequency of field i in the object, and let N be the number of unique fields in the object (regardless of type). Ratio (sum (v_i) / N) / F is the ratio of average field frequency to container frequency. If this percentage is less than a user configurable threshold, such as 0.01, the contained object is designated as a map. In various implementations, empty objects in the JSON schema are treated as maps.
関係スキーマの作成
ソースデータセットにおけるJSONオブジェクトのスキーマが推論された後、分析プラットフォームは、SQLユーザ及びSQLベースのツールに公開することができる関係スキーマを生成する。目標は、JSONスキーマにおける包含関係を表す簡潔なスキーマを作成する一方で、ユーザに標準SQLの能力を与えることである。この関係スキーマは、装飾されたJSONスキーマから生成され、基礎的半構造データセット上のビューである。変換を行うための一般化手順を記載する前に、どのようにJSONスキーマが関係ビューに変換されるかについての幾つかの実施例を記載する。
Relationship Schema Creation Once the schema of the JSON objects in the source data set has been inferred, the analysis platform generates a relationship schema that can be exposed to SQL users and SQL-based tools. The goal is to give the user the power of standard SQL while creating a concise schema that represents containment relationships in the JSON schema. This relationship schema is generated from the decorated JSON schema and is a view on the underlying semi-structured data set. Before describing the generalization procedure for performing the conversion, we will describe some examples of how the JSON schema is converted to a relationship view.
オブジェクト
最も単純な実施例は、下記のスキーマ等の、簡単なスカラ型を有するオブジェクトである。
{ "created_at": string, "id": number, "text": string,
"source": string, "favorited": boolean }
この場合、オブジェクトのフィールドは、関係のカラムに直接的に翻訳する。
Root(created_at: str, id: num, text: str, source: str, favorited:
bool)
Objects The simplest example is an object with a simple scalar type, such as the schema below.
{"created_at": string, "id": number, "text": string,
"source": string, "favorited": boolean}
In this case, the fields of the object translate directly into the columns of the relationship.
Root (created_at: str, id: num, text: str, source: str, favored:
bool)
トップレベルのオブジェクトの関係(またはテーブル)はここでは“Root”と呼ばれるが、例えば、ソースコレクションの名前が存在する場合には、ソースコレクションの名前で置き換えることができる。スペース及び読みやすさのために、型名の文字列、数字、及び、ブール(boolean)は、str、num、及び、boolに短縮されている。 The top-level object relationship (or table) is referred to herein as "Root", but can be replaced, for example, with the name of the source collection if one exists. For space and readability, typename strings, numbers and booleans have been shortened to str, num and bool.
型多様性をサポートするために、型を属性名に追加することができる。例えば、下記のスキーマを考える。
{ "created_at": string, "id": number, "id": string, "text":
string, "source": string, "favorited": boolean }
結果として生じる関係スキーマは、下記のように別個の"id"と、"id"カラムとを有することになる。
Root(created_at: str, id<num>: num, id<str>: str,
source: str, text: str, favorited: bool)
Types can be added to attribute names to support type diversity. For example, consider the following schema.
{"created_at": string, "id": number, "id": string, "text":
string, "source": string, "favorited": boolean}
The resulting relationship schema will have separate "id" and "id" columns as follows.
Root (created_at: str, id <num>: num, id <str>: str,
source: str, text: str, favored: bool)
ネストされたオブジェクト
ネストされたオブジェクトは、外部キー関係と新たな関係を作り出す。例えば、JSONスキーマを考える。
{ "created_at": string, "id": number, "source": string, "text":
string,
"user": { "id": number, "screen_name": string },
"favorited": boolean }
対応する関係スキーマは、
Root(created_at: str, id: num, source: str, text: str, favorited:
bool, user: join_key)
Root.user(id_jk: join_key, id: num, screen_name: str)
である。
Nested Objects Nested objects create foreign key relationships and new relationships. For example, consider a JSON schema.
{"created_at": string, "id": number, "source": string, "text":
string,
"user": {"id": number, "screen_name": string},
"favorited": boolean}
The corresponding relationship schema is
Root (created_at: str, id: num, source: str, text: str, favored:
bool, user: join_key)
Root.user (id_jk: join_key, id: num, screen_name: str)
It is.
ネストされたオブジェクトは、その経路、この場合は“Root.user”によって名付けられた別個の関係に「正規化」される。サブオブジェクトを表す新たなテーブル内のカラム“Root.user”.“id_jk”は、カラム“Root.user”(テーブル“Root”における“user”カラム)のための外部キーである。型は、それを他のカラムから区別するために“joinkey”として指定されるが、実際の実装では、join_key型は典型的には整数である。 The nested objects are "normalized" to their path, in this case a separate relationship named by "Root.user". Column "Root.user" in a new table representing a sub-object. "Id_jk" is a foreign key for the column "Root.user" (the "user" column in the table "Root"). The type is specified as "joinkey" to distinguish it from the other columns, but in practical implementations, the join_key type is typically an integer.
オブジェクトは、幾つかのレベルの深さにネストすることができる。例えば、リツイートオブジェクトは、リツイートしたユーザのプロファイルを含む、リツイートされた状態オブジェクトを含んでよく、結果として、下記のスキーマになる。
{ "created_at": string, "id": number, "source": string, "text":
string,
"user": { "id": number, "screen_name": string },
"retweeted_status": { "created_at": string, "id": number,
"user": { "id": number, "screen_name": string } },
"favorited": boolean }
対応する関係ビューは、下記のようになる。
Root(created_at: str, id: num, source: str,
text: str, favorited: bool,
user: join_key, retweeted_status: join_key)
Root.user(id_jk: join_key, id: num, screen_name: str)
Root.retweeted_status(id_jk: join_key, created_at: str, id: num,
user: join_key)
Root.retweeted_status.user(id_jk: join_key, id: num, screen_name:
str)
。“Root.user”、“Root.retweeted_status”、及び“Root.retweeted_status.user”は、全て異なるテーブルに分かれることに留意する。
Objects can be nested at several levels of depth. For example, the retweet object may include retweeted state objects, including the profile of the retweeted user, resulting in the following schema:
{"created_at": string, "id": number, "source": string, "text":
string,
"user": {"id": number, "screen_name": string},
"retweeted_status": {"created_at": string, "id": number,
"user": {"id": number, "screen_name": string}},
"favorited": boolean}
The corresponding relationship view is as follows:
Root (created_at: str, id: num, source: str,
text: str, favored: bool,
user: join_key, retweeted_status: join_key)
Root.user (id_jk: join_key, id: num, screen_name: str)
Root.retweeted_status (id_jk: join_key, created_at: str, id: num,
user: join_key)
Root.retweeted_status.user (id_jk: join_key, id: num, screen_name:
str)
. Note that “Root.user”, “Root.retweeted_status”, and “Root.retweeted_status.user” are all divided into different tables.
1対1関係の最適化
ネストされたオブジェクトの関係においては、メインのテーブルのローから、ネストされたオブジェクトのテーブルのローに、1対1関係があることが多い。結果として、これらは、カラム名についてドット付き表記を用いて、単一のテーブルに1対1に折り畳むことができる。
Optimization of One-to-One Relationships In nested object relationships, there is often a one-to-one relationship between the rows of the main table and the rows of the table of nested objects. As a result, they can be folded one-to-one into a single table, using dotted notation for column names.
例えば、上記マルチ関係例は、下記のように平坦化され、
Root(created_at: str, id: num, source: str,
text: str, favorited: bool,
user.id: num, user.screen_name: str)
3レベルのネストされたオブジェクト例に関しては、下記のようになる。
Root(created_at: str, id: num, source: str,
text: str, favorited: bool,
user.id: num, user.screen_name: str,
retweeted_status.created_at: str,
retweeted_status.id: num,
retweeted_status.user.id: num,
retweeted_status.user.screen_name: str)
For example, the multi relation example is flattened as follows:
Root (created_at: str, id: num, source: str,
text: str, favored: bool,
user.id: num, user.screen_name: str)
For a three-level nested object example:
Root (created_at: str, id: num, source: str,
text: str, favored: bool,
user.id: num, user.screen_name: str,
retweeted_status.created_at: str,
retweeted_status.id: num,
retweeted_status.user.id: num,
retweeted_status.user.screen_name: str)
関係スキーマは単純にJSONスキーマ上のビューであるので、平坦化された、部分的に平坦化された、または別個の(平坦化されていない)関係スキーマは、基礎的データを修正すること無く、分析プラットフォームの求めに応じて、ユーザに提示できることに留意する。唯一の制限は、ユーザに、矛盾するテーブル定義を提示しないことである。 Since the relational schema is simply a view on the JSON schema, a flattened, partially flattened or separate (non-flattened) relational schema does not modify the underlying data Note that it can be presented to the user as required by the analysis platform. The only limitation is that the user is not presented with conflicting table definitions.
マップ
フィールドのセットをマップとして指定すること無く、対応する関係スキーマは、膨大な数のカラムを含んでよい。さらに、ユーザは、フィールド名をクエリすることを望む場合がある。例えば、ユーザは、12月の平均ページビューを見付けたいかもしれない。
Without specifying a set of map fields as a map, the corresponding relationship schema may contain a large number of columns. Additionally, the user may wish to query field names. For example, the user may want to find an average page view for December.
これらの問題を解決するために、マップとして装飾される(ネストされた)オブジェクトのテーブルは、「ピボットする」ことができる。例えば、ウェブサイト上の各ページについての様々なメトリクス(日々のページビュー、クリック、費やされた時間等)を追跡するために、下記のスキーマを考える。
O{ "page_url": string, "page_id": number,
"stat_name": string,
"metric": M{ "2012-01-01": number, "2012-01-02": number, ...,
"2012-12-01": number, ... } }
To solve these problems, the table of (nested) objects to be decorated as maps can be "pivoted". For example, consider the following schema to track various metrics (daily page views, clicks, time spent, etc.) for each page on a website.
O {"page_url": string, "page_id": number,
"stat_name": string,
"metric": M {"2012-01-01": number, "2012-01-02": number, ...,
"2012-12-01": number, ...}}
各日について、別個のカラムでテーブルを作るのではなく、フィールド及び値は、関係におけるキーと値のペアとして記憶することができる。
Root(page_url: str, page_id: num, stat_name: str, metric<map>:
join_key)
Root,metric<map>(id_jk: join_key, key: string, val: num)
Instead of creating a table with separate columns for each day, fields and values can be stored as key-value pairs in the relationship.
Root (page_url: str, page_id: num, stat_name: str, metric <map>:
join_key)
Root, metric <map> (id_jk: join_key, key: string, val: num)
この場合、idカラムは、外部キーであり、どのレコード内に各マップエントリが元々存在したかを示す。1年分のページビューの場合、テーブル“Root.metric”において365個のカラムを有する代わりに、カラムは2個だけである。“key”カラムはフィールド名を記憶し、“val”カラムは値を記憶する。例えば、上記スキーマの場合、データベースは、
”www.noudata.com/jobs”(page_id284)について、これらのレコードを含んでよい。
Root("www.noudata.com/jobs", 284, "page_views", 3),
Root.metric<map>(3, "2012-12-01", 50),
Root.metric<map>(3, "2012-12-02", 30), ...
In this case, the id column is a foreign key, and indicates in which record each map entry originally existed. In the case of a page view for one year, instead of having 365 columns in the table "Root.metric", there are only 2 columns. The "key" column stores field names and the "val" column stores values. For example, in the above schema, the database is
These records may be included for “www.noudata.com/jobs” (page_id 284).
Root ("www.noudata.com/jobs", 284, "page_views", 3),
Root.metric <map> (3, "2012-12-01", 50),
Root.metric <map> (3, "2012-12-02", 30), ...
ピボットは、マップに型多様性がある場合にも機能する。例えば、メトリクスが、センチメントを表し、センチメントが、カテゴリと、カテゴリの強さを示すスコアと、の両方を含むとしよう。
{ "page_url": "www.noudata.com/blog", "page_id": 285,
"stat_name": "sentiment"
"metric": { "2012-12-01": "agreement", "2012-12-01": 5,
"2012-12-05": "anger", "2012-12-05": 2, ... } }
JSONスキーマは、
0{ "page_url": string, "page_id": number,
"stat_name": string,
"metric": M{ "2012-12-01": string, "2012-12-01": number, ...,
"2012-12-05": string, "2012-12-05": number, ... } }
となる。
Pivots also work when there is type diversity in the map. For example, assume that a metric represents a sentiment and the sentiment includes both a category and a score indicating the strength of the category.
{"page_url": "www.noudata.com/blog", "page_id": 285,
"stat_name": "sentiment"
"metric": {"2012-12-01": "agreement", "2012-12-01": 5,
"2012-12-05": "anger", "2012-12-05": 2, ...}}
JSON schema is
0 {"page_url": string, "page_id": number,
"stat_name": string,
"metric": M {"2012-12-01": string, "2012-12-01": number, ...,
"2012-12-05": string, "2012-12-05": number, ...}}
It becomes.
関係スキーマを作成すると、新しい“val”カラムを、新しい型を含むようにマップ関係に追加することができる。下記に示すように、別の“val”カラムを、カラム名を区別するために、その型と共に同様に追加することができる。
Root(page_url: str, page_id: num, stat_name: str, metric<map>:
join_key)
Root,metric<map>(id_jk: join_key, key: string,
val<str>: str, val<num>: num)
Once the relationship schema is created, a new "val" column can be added to the map relationship to include the new type. As shown below, another "val" column can be added along with its type as well to distinguish the column names.
Root (page_url: str, page_id: num, stat_name: str, metric <map>:
join_key)
Root, metric <map> (id_jk: join_key, key: string,
val <str>: str, val <num>: num)
上記JSONオブジェクトから生じるエントリは、下記のようになる。
Root.metric<map>(4, "2012-12-01", "agreement", NULL),
Root.metric<map>(4, "2012-12-01", NULL, 5),
Root.metric<map>(4, "2012-12-05", "anger", NULL),
Root.metric<map>(4, "2012-12-05", NULL, 2) ...
これらのマップがピボットされると、ユーザは、キーカラムに、それらが任意の他のカラムとなるように、述語及び関数を適用することができる。
The entry resulting from the above JSON object is as follows:
Root.metric <map> (4, "2012-12-01", "agreement", NULL),
Root.metric <map> (4, "2012-12-01", NULL, 5),
Root.metric <map> (4, "2012-12-05", "anger", NULL),
Root.metric <map> (4, "2012-12-05", NULL, 2) ...
When these maps are pivoted, the user can apply predicates and functions to the key columns such that they become any other columns.
ネストされたマップ
基本原理は、ネストされたマップに関しても同じである。日毎及び時間毎の統計のリストを考える。
M{"2012-12-01": M{ "12:00": number,
"01:00": number,
"02:00": number,
... },
"2012-12-02": M{ ... },
... }
結果として生じるスキーマは、
Root(id_jk: join_key, key: string, val<map>: join_key)
Root.val<map>(id_jk: join_key, key: string, val<num>: num)
となる。
Nested Maps The basic principle is the same for nested maps. Consider a list of daily and hourly statistics.
M {"2012-12-01": M {"12:00": number,
"01:00": number,
"02:00": number,
...},
"2012-12-02": M {...},
...}
The resulting schema is
Root (id_jk: join_key, key: string, val <map>: join_key)
Root.val <map> (id_jk: join_key, key: string, val <num>: num)
It becomes.
オブジェクトもマップ内にネストすることができる。
M{ "2012-12-01": O{ "sentiment": string,
"strength": number }
"2012-12-02": O{ ... }
... }
結果として生じる平坦化された関係スキーマは、
Root(id_jk: join_key, key: string, val<map>: join_key)
Root.val<map>(id_jk: join_key, sentiment: string,
strength: number)
となる。
Objects can also be nested within the map.
M {"2012-12-01": O {"sentiment": string,
"strength": number}
"2012-12-02": O {...}
...}
The resulting flattened relationship schema is
Root (id_jk: join_key, key: string, val <map>: join_key)
Root.val <map> (id_jk: join_key, sentiment: string,
strength: number)
It becomes.
空の要素
空のオブジェクトが、時々、データ内に現れる。スキーマを考える。
{ "created_at": string, "id": number, "source": string, "text":
string,
"user": { "id": number, "screen_name": string } }
JSONオブジェクトは、ここに示すように、ユーザ情報を伴わずに受信され得る。
{ "created_at": "Thu Nov 08",
"id": 266353834,
"source": "Twitter for iPhone",
"text": "@ilstavrachi: would love dinner. Cook this:
http://bit.ly/955Ffo",
"user": { } }
Empty elements Empty objects sometimes appear in the data. Think about the schema.
{"created_at": string, "id": number, "source": string, "text":
string,
"user": {"id": number, "screen_name": string}}
JSON objects may be received without user information, as shown here.
{"created_at": "Thu Nov 08",
"id": 266353834,
"source": "Twitter for iPhone",
"text": "@ilstavrachi: would love dinner. Cook this:
http://bit.ly/955Ffo ",
"user": {}}
空のユーザオブジェクトは、下記の関係タプルで表すことができる。
Root("Thu Nov 08", 266353834, "Twitter for iPhone",
"@ilstavrachi: would love dinner. Cook this:
http://bit.ly/955Ffo", join_key)
Root.user(join_key, NULL, NULL)
An empty user object can be represented by the following relation tuple:
Root ("Thu Nov 08", 266353834, "Twitt for iPhone",
"@ilstavrachi: would love dinner. Cook this:
http://bit.ly/955Ffo ", join_key)
Root.user (join_key, NULL, NULL)
採集されたユーザオブジェクトが全て、採集されたストリームに空のオブジェクトを有する場合、結果として生じるJSONスキーマは、空のオブジェクトを含むことになる。例えば、このスキーマにおける最後のフィールド(“user”)を見る。
{"id": number, "user": {}}
この場合、空のオブジェクト“user”は、マップとして処理することができ、関係スキーマは、
Root(id: num, user<map>: join_key)
Root.user<map>(id_jk: join_key, key: string)
となる。
If all collected user objects have empty objects in the collected stream, the resulting JSON schema will contain empty objects. For example, look at the last field ("user") in this schema.
{"id": number, "user": {}}
In this case, the empty object "user" can be treated as a map, and the relationship schema is
Root (id: num, user <map>: join_key)
Root.user <map> (id_jk: join_key, key: string)
It becomes.
Root.user<map>は、値カラムを有さず、最初は空であることに留意する。しかしながら、新しいオブジェクトが採集されて、スキーマが変わる場合、Rootにおける各レコードが、結合キーを既に割り当てられていることになるので、この設計によって、カラムを後に追加するのが容易になる。 Root. Note that user <map> has no value column and is initially empty. However, if new objects are collected and the schema changes, this design makes it easy to add columns later, as each record in the Root has already been assigned a join key.
配列
配列は、マップと同様に処理されるので、スキーマ翻訳はかなり類似している。主な違いは、マップの文字列“key”フィールドが、配列インデックスに対応する整数型(int)の“index”フィールドに置き換えられることである。簡単な実施例は、下記であり、
{ "tags": [ string ] }
は、下記の関係スキーマにつながる。
Root(tags<arr>: join_key)
Root.tags<arr>(id_jk: join_key, index: int, val<str>: str)
Sequencing Sequences are treated the same as maps, so schema translation is quite similar. The main difference is that the map's string "key" field is replaced by an integer "int" field corresponding to the array index. A simple example is
{"tags": [string]}
Leads to the following relationship schema.
Root (tags <arr>: join_key)
Root.tags <arr> (id_jk: join_key, index: int, val <str>: str)
型多様性及びネストされた配列は、マップについてと同じように機能する。下記のスキーマを考える。
{ "tags": [ number, string] }
は、下記の関係スキーマにつながる。
Root(tags<arr>: join_key)
Root.tags<arr>(id_jk: join_key, index: int,
val<num>: num, val<str>: str)
Type diversity and nested sequences work the same as for maps. Consider the following schema.
{"tags": [number, string]}
Leads to the following relationship schema.
Root (tags <arr>: join_key)
Root.tags <arr> (id_jk: join_key, index: int,
val <num>: num, val <str>: str)
オブジェクトは、下記に示すように、配列内にネストされてよい。
{ "tags": [{ "text": string, "offset": number }] }
結果として生じる関係スキーマは、下記のように作成することができる。
Root(tags<arr>: join_key)
Root.tags<arr>(id_jk: join_key, index: int, val: join_key)
Root.tags<arr>.val(id_jk: join_key, text: str, offset: num)
Objects may be nested within the array, as shown below.
{"tags": [{"text": string, "offset": number}]}
The resulting relationship schema can be created as follows.
Root (tags <arr>: join_key)
Root.tags <arr> (id_jk: join_key, index: int, val: join_key)
Root.tags <arr> .val (id_jk: join_key, text: str, offset: num)
1対1平坦化の最適化を使用すると、関係スキーマは、下記のようになる。
Root(tags<arr>: join_key)
Root.tags<arr>(id_jk: join_key, index: int,
val.text: str, val.offset: num)
Using the one-to-one planarization optimization, the relationship schema is as follows:
Root (tags <arr>: join_key)
Root.tags <arr> (id_jk: join_key, index: int,
val.text: str, val.offset: num)
ネストされた空の配列
関係スキーマは、ネストされた空の配列について、マップについてと同様の方法で作成することができる。下記のスキーマに関して、
{ "tags": [string, [number]], "urls": []}
関係スキーマは、下記のようになる。
Root(tags<arr>: join_key, urls<arr>: join_key)
Root.tags<arr>(id_jk: join_key, index: int,
val<str>: str, val<arr>: join_key)
Root.tags<arr>.val<arr>(id_jk: join_key, index: int,
val<num>: num)
Root.urls<arr>(id_jk: join_key, index: int)
Nested empty arrays Relationship schemas can be created for nested empty arrays in the same way as for maps. Regarding the schema below,
{"tags": [string, [number]], "urls": []}
The relationship schema is as follows.
Root (tags <arr>: join_key, urls <arr>: join_key)
Root.tags <arr> (id_jk: join_key, index: int,
val <str>: str, val <arr>: join_key)
Root.tags <arr> .val <arr> (id_jk: join_key, index: int,
val <num>: num)
Root.urls <arr> (id_jk: join_key, index: int)
ネストされた配列の場合、テーブルの名前に“val”が添えられた別個のテーブルが作成されることに留意する。空の配列の場合、別個のテーブルは、“val”カラム無しで、“index”カラムだけで作成され、“val”カラムは、配列の内容が観察されて型付けされると、後で追加することができる。 Note that in the case of nested arrays, a separate table is created with "val" appended to the name of the table. In the case of an empty array, separate tables are created with only the "index" column, without the "val" column, and the "val" column should be added later when the contents of the array are observed and typed. Can.
アトミックな値に関する型推論
上記型推論及び関係スキーマへの変換手順は、JSONにおいて利用可能である基本型に依存している。いかなる型システムを選択しても、同じ手順が、その型システムに等しく適用される。言い換えれば、分析プラットフォームは、アトミックなスカラ型が値から推論され得る限り、整数、浮動小数、及び、時間のようなより狭いスカラ型を推論することができる。BSON及びXMLは、そのような拡張された型システムを有する。さらに、様々なヒューリスティックス(正規表現など)を用いて、日付や時間などのより複雑な型を検出することができる。
Type Inference for Atomic Values The above type inference and conversion procedures to relational schemas rely on the basic types available in JSON. The same procedure applies equally to any type system, whatever type system is chosen. In other words, the analysis platform can infer narrower scalar types such as integers, floats, and time, as long as atomic scalar types can be inferred from values. BSON and XML have such an extended type system. In addition, various heuristics (such as regular expressions) can be used to detect more complex types such as date and time.
ANSI SQLは、JSONと同じ型をサポートしていないので、推論された型は、これまで関係ビューについて見られた最も具体的な型に変換される。例えば、整数だけがフィールド“freq”について見られる場合には、数字型は、“freq”に関する関係スキーマにおいて整数に変換されることになる。同様に、整数と浮動小数の両方が観察されている場合には、関係スキーマは、“freq”カラムを浮動小数として示すことになる。同様に、文字列フィールドは、関係スキーマにおいて文字可変型に変換する。言い換えれば、基本JSON型より具体的な型を追跡してよい。 Because ANSI SQL does not support the same types as JSON, inferred types are converted to the most specific type ever seen for relational views. For example, if only integers are found for the field "freq", the number type will be converted to integers in the relational schema for "freq". Similarly, if both integers and floats are observed, the relationship schema will show the "freq" column as a float. Similarly, string fields convert to character variant in the relational schema. In other words, you may track more specific types than basic JSON types.
あるいは、型多様性に依存して、より具体的な型システムを使用して、データ値の型を推論する。すなわち、JSONプリミティブ型を使用する代わりに、ANSI SQLのプリミティブ型を使用する。 Alternatively, depending on type diversity, more specific type systems are used to infer the type of data value. That is, instead of using JSON primitive types, we use ANSI SQL primitive types.
以下は、採集中に追跡される型のリスト(左側)と、それらがどのようにSQLスキーマに関して変換されるか(右側)である。ほとんどのSQLデータベースは、クライアントが求めれば、使用可能なテキストを含む追加型をサポートする。ObjectId型はBSONに特有であることに留意する。
int32, -> INTEGER
int64, -> INTEGER
double, -> DOUBLE PRECISION
string, -> VARCHAR
date, -> DATE
bool, -> BOOLEAN
object_id, (BSON) -> VARCHAR(24)
time -> TIME
timestamp -> TIMESTAMP
The following is a list of types that will be tracked during collection (left) and how they are translated with respect to SQL schema (right). Most SQL databases support additional types, including available text, as the client requires. Note that the ObjectId type is specific to BSON.
int32,-> INTEGER
int64,-> INTEGER
double,-> DOUBLE PRECISION
string,-> VARCHAR
date,-> DATE
bool,-> BOOLEAN
object_id, (BSON)-> VARCHAR (24)
time-> TIME
timestamp-> TIMESTAMP
手順
JSONスキーマから関係スキーマへの変換は、ネストされたJSONスキーマ構造の再帰的解凍を使用して達成することができる。実装例の疑似コード表現を、ここに示す。
Call for every attribute in topmost object:
attr_schema, "Root", attr_name
create_schema(json_schema, rel_name, attr_name):
/* Creates a table (relation) if it's adorned as an object */
if json_schema is object:
Add join key called attr_name to relation rel_name
new_rel = rel_name + "." + attr_name
Create relation new_rel
add (id_jk: join_key) to new_rel
/* recursively add attributes to the table (relation) */
for attr, attr_schema in json_schema:
create_schema(attr_schema, new_rel, attr)
/* Creates appropriate attrs and table for (nested) map */
else if json_schema is map:
Add join key called 'attr_name + <map>' to relation rel_name
new_rel = rel_name + "." + attr_name<map>
Create relation new_rel
Add (id_jk: join_key) and (key: string) to new_rel
/* recursively add attributes to the table (relation) */
for each distinct value type val_type in json_schema:
create_schema(val_type, new_rel, "val")
/* Creates appropriate attrs and table for array */
else if json_schema is array:
Add join key called 'attr_name + <arr>' to relation rel_name
new_rel = rel_name + "." + attr_name<arr>
Create relation new_rel
Add (id_jk: join_key) and (index: int) to new_rel
/* recursively add attributes to the table (relation) */
for each distinct item type item_type in json_schema:
create_schema(item_type, new_rel, "val")
/* Primitive type, add column to the table (relation) */
else:
If attr_name does not exist in relation rel_name:
Add column (attr_name, attr_name's type) to relation
rel_name
else
Rename attribute attr_name to attr_name + "<orignal
attr_name's type>" in relation rel_name
Add column (attr_name + "<" + attr_name's type + ">",
attr_name's type) to relation rel_name
Procedure The transformation from JSON schema to relationship schema can be achieved using recursive decompression of nested JSON schema structure. A pseudo code representation of the example implementation is shown here.
Call for every attribute in topmost object:
attr_schema, "Root", attr_name
create_schema (json_schema, rel_name, attr_name):
/ * Creates a table (relation) if it's adorned as an object * /
if json_schema is object:
Add join key called attr_name to relation rel_name
new_rel = rel_name + "." + attr_name
Create relation new_rel
add (id_jk: join_key) to new_rel
/ * recursively add attributes to the table (relation) * /
for attr, attr_schema in json_schema:
create_schema (attr_schema, new_rel, attr)
/ * Creates appropriate attrs and table for (nested) map * /
else if json_schema is map:
Add join key called 'attr_name + <map>' to relation rel_name
new_rel = rel_name + "." + attr_name <map>
Create relation new_rel
Add (id_jk: join_key) and (key: string) to new_rel
/ * recursively add attributes to the table (relation) * /
for each distinct value type val_type in json_schema:
create_schema (val_type, new_rel, "val")
/ * Creates appropriate attrs and table for array * /
else if json_schema is array:
Add join key called 'attr_name + <arr>' to relation rel_name
new_rel = rel_name + "." + attr_name <arr>
Create relation new_rel
Add (id_jk: join_key) and (index: int) to new_rel
/ * recursively add attributes to the table (relation) * /
for each distinct item type item_type in json_schema:
create_schema (item_type, new_rel, "val")
/ * Primitive type, add column to the table (relation) * /
else:
If attr_name does not exist in relation rel_name:
Add column (attr_name, attr_name's type) to relation
rel_name
else
Rename attribute attr_name to attr_name + "<orignal
attr_name's type>"in relation rel_name
Add column (attr_name + "<" + attr_name's type + ">",
attr_name's type) to relation rel_name
上記手順によって、1対1最適化を行わずに関係スキーマを作成する。第2のパスは、関係スキーマを通して行ってよく、1対1関係でオブジェクトテーブルを識別し、折り畳む。あるいは、1対1最適化はインラインで実行することができるが、これについては、明確にするために示していない。ネストされたオブジェクトを有するスキーマのサブツリーが、配列またはマップの「割り込み」を受けない場合、オブジェクトサブツリー全体は、サブツリーのルートへの経路によって名付けられた属性を有する単一のテーブルに折り畳むことができる。マップまたはオブジェクトである属性は別個のテーブル内にとどまるが、内に含まれたサブオブジェクトはいずれも、再帰的に折り畳むことができる。これらの原理は、ネストされたオブジェクトの任意の深さに当てはまる。 The above procedure creates a relation schema without performing one-to-one optimization. The second pass may be through the relationship schema, identifying and collapsing object tables in a one-to-one relationship. Alternatively, one-to-one optimization can be performed inline, but this is not shown for clarity. If a schema subtree with nested objects does not receive an array or map "interrupt", the entire object subtree can be folded into a single table with attributes named by the path to the root of the subtree . Attributes that are maps or objects remain in separate tables, but any sub-object contained within can be recursively folded. These principles apply to any depth of nested objects.
インデックスにデータをポピュレート
JSON及び関係スキーマが新しいオブジェクトに応答して更新されると、オブジェクト内に含まれるデータは、以下に記載するように、インデックスに記憶することができる。
Populating Data with Indexes Once the JSON and relationship schema have been updated in response to the new object, the data contained within the object can be stored in the index as described below.
分析プラットフォームにおけるインデックスは、キーと値のペアを記憶する、順序を保持するインデックスに依存する。インデックスは、操作、すなわち、ルックアップ(接頭辞)、挿入(キー、値)、削除(キー)、更新(キー、値)、及び、範囲検索のためのget_next()をサポートする。そのようなインターフェースをサポートする多数のデータ構造及び低レベルライブラリがある。例には、BerkeleyDB、TokyoCabinet、KyotoCabinet、LevelDBなどが含まれる。これらは、B木、LSM(log‐structured merge)ツリー、及び、Fractalツリーのような順序を保持する二次記憶データ構造を内部で使用する。オブジェクトIDについて等、順序を保持しないインデックス(ハッシュテーブル等)が使用される特殊な場合があってよい。順序を保持しないインデックスを用いると、get_next()及び範囲検索を行う能力が犠牲になる場合がある。 The index in the analysis platform relies on an index holding index, which stores key-value pairs. The index supports operations: lookup (prefix), insert (key, value), delete (key), update (key, value), and get_next () for range search. There are many data structures and low level libraries that support such interfaces. Examples include BerkeleyDB, TokyoCabinet, KyotoCabinet, LevelDB, and the like. These internally use secondary storage data structures that maintain order, such as B-trees, LSM (log-structured merge) trees, and Fractal trees. There may be special cases where an index (such as a hash table) that does not hold an order, such as for object IDs, is used. Using an index that does not hold order may sacrifice the ability to do get_next () and range searching.
様々な実装において、分析フレームワークは、LevelDBを使用する。LevelDBは、LSMツリーを実装し、圧縮を行い、高挿入速度でデータセットに良好な性能を提供する。LevelDBは、また、分析フレームワークの共用モデルと調和し得る性能のトレードオフを行う。例えば、ログデータ等のデータを分析するとき、データは頻繁に追加されることになるが、既存のデータは、希に変更されるか、あるいは、全く変更されない。LevelDBは、データ削除及びデータ修正を遅くして、高速データ挿入のために最適化されると、有利である。 In various implementations, the analysis framework uses LevelDB. LevelDB implements an LSM tree, performs compression, and provides good performance for data sets at high insertion rates. LevelDB also makes performance tradeoffs that can be coordinated with the analytics framework's shared model. For example, when analyzing data, such as log data, data will be added frequently, but existing data is rarely changed or not changed at all. LevelDB is advantageous when it is optimized for fast data insertion, slowing data removal and data modification.
順序を保持するインデックスは、キー順序でキーと値のペアを併置する特性を有する。従って、あるキーの近くのキーと値のペアについて検索するとき、あるいは、順番に項目を取り出すとき、応答は、順不同で項目を取り出すときよりもはるかに速く、返される。 An index holding order has the property of juxtaposing key-value pairs in key order. Thus, when searching for key-value pairs near a key, or when retrieving items in order, responses are returned much faster than when retrieving items in random order.
分析プラットフォームは、各ソースコレクションについて多数のキーと値のインデックスを、また、一部の実装では、各ソースコレクションについて2つ〜6つのインデックスを維持することができる。分析プラットフォームは、関係スキーマ(SQLスキーマは具体化される必要はない)に対してSQLクエリを評価するためにこれらのインデックスを使用する。各オブジェクトは、tidで示される固有idを割り当てられる。BigIndex(BI)及びArrayIndex(AI)は、そのインデックスから他のインデックス及びスキーマを再構築することができる2つのインデックスである。 The analysis platform can maintain multiple key and value indexes for each source collection, and in some implementations, 2 to 6 indexes for each source collection. The analysis platform uses these indexes to evaluate SQL queries against relational schemas (SQL schemas do not have to be instantiated). Each object is assigned a unique id indicated by tid. BigIndex (BI) and ArrayIndex (AI) are two indexes from which other indexes and schemas can be reconstructed.
ビッグインデックス(BI:BigIndex)
BigIndex(BI)は、配列内に埋め込まれていないデータの全フィールドを記憶するベースデータストアである。値(val)は、col_path及びtidに基づいたキーによってBIから取り出すことができる。
(col_path, tid) -> val
Big Index (BI: BigIndex)
BigIndex (BI) is a base data store that stores all fields of data not embedded in the array. The value (val) can be retrieved from BI by a key based on col_path and tid.
(col_path, tid)-> val
col_pathは、フィールドの型が添えられたルートオブジェクトからのフィールドへの経路である。例えば、下記のレコードの場合、
1: { "text": "Tweet this", "user": { "id": 29471497,
"screen_name": "Mashah08" } }
2: { "text": "Tweet that", "user": { "id": 27438992,
"screen_name": "binkert" } }
下記のキーと値のペアがBIに追加される。
(root.text<str>, 1) --> "Tweet this"
(root.text<str>, 2) --> "Tweet that"
(root.user.id<num>, 1) --> 29471497
(root.user.id<num>, 2) --> 27438992
(root.user.screen_name<str>, 1) -> "Mashah08"
(root.user.screen_name<str>, 2) -> "binkert"
col_path is the path from the root object to the field with the field type attached. For example, in the case of the following record,
1: {"text": "Tweet this", "user": {"id": 29471497,
"screen_name": "Mashah08"}}
2: {"text": "Tweet that", "user": {"id": 27438992,
"screen_name": "binkert"}}
The following key / value pairs are added to BI:
(root.text <str>, 1)->"Tweetthis"
(root.text <str>, 2)->"Tweetthat"
(root.user.id <num>, 1)-> 29471497
(root.user.id <num>, 2)-> 27438992
(root.user.screen_name <str>, 1)->"Mashah08"
(root.user.screen_name <str>, 2)->"binkert"
様々な実装において、基礎的インデックスストア(LevelDB等)は、キーのセグメントの意味を認識していない。言い換えれば、“root.text<str>,1”は、ルートテーブル内の文字列テキストフィールドの第1の要素を意味するが、インデックスストアは、区別されていない複数文字キーを単純に見ている。簡単な実施例として、キーは、col_path及びtidを(重要なことは、その順序で)単に連結することによって作成することができる。例えば、上記に示した第1のキーは、“root.text<str>1”としてインデックスストアに渡されてよい。インデックスストアは、経路の類似性を理解してではなく、単に最初の14文字が同じであるという理由で、第2のキー(“root.text<str>2”)を第1のキーと併置する。カラム名及びカラム型は、ソート順により、あらゆるキーの一部として記憶されるが、圧縮(接頭辞ベースに圧縮など)を用いて、ストレージ費用を削減することができる。 In various implementations, the underlying index store (such as LevelDB) does not recognize the meaning of the key segment. In other words, "root.text <str>, 1" means the first element of the string text field in the root table, but the index store simply looks at the undifferentiated multi-character key . As a simple example, keys can be created simply by concatenating col_path and tid (importantly, in that order). For example, the first key shown above may be passed to the index store as "root.text <str> 1". The index store does not understand the similarity of the paths, but simply co-locates the second key ("root.text <str> 2") with the first key simply because the first 14 characters are the same. Do. Column names and column types are stored as part of every key according to sort order, but compression (such as prefix-based compression) can be used to reduce storage costs.
BIにおいては、あらゆる新しいカラムについて別個のカラムファイルを作成する従来のカラムストアとは異なり、ソースデータの全てのカラムが単一構造に組み合わされる。BIアプローチは、単一インデックスインスタンスを可能にし、また、マップ検出の遅延を可能にする。新たなフィールドは、単純にBI内にエントリとして現れるので、マップのピボットを怠っても、後にマップに戻される各フィールドについて多数の物理ファイルを作成する物理的費用が発生しない。 In BI, unlike traditional column stores that create separate column files for every new column, all columns of source data are combined into a single structure. The BI approach enables single index instances and also allows map detection delays. Since the new fields simply appear as entries in the BI, neglecting to pivot the map does not incur the physical cost of creating multiple physical files for each field that is subsequently returned to the map.
BIにおいては、各属性または「カラム」についてのキーと値のペアが併置される。従って、カラムファイル同様、BIは、クエリエグゼキュータにクエリにおいて参照されないフィールドを含むデータ全体を通らせるのではなく、クエリエグゼキュータにクエリの関心フィールドに焦点を当てさせることができる。 In BI, key-value pairs for each attribute or "column" are collocated. Thus, like column files, BI can cause the query executor to focus on the interest fields of the query rather than having the query executor pass through the data including fields not referenced in the query.
配列インデックス(AI:ArrayIndex)
配列についての正規化テーブルからフィールドがBIに追加できるが、配列インデックスは、対応する値からとなる。代わりに、配列フィールドは、インデックス情報を保持する個別のArrayindex(AI)に追加することができ、同じ配列内のエントリが、インデックスストアによって併置されることを可能にし、それによって、多くのクエリに良好な性能を提供する。配列値は、下記の署名を用いてAIに記憶することができる。
(col_path, tid, join_key, index) -> val
Array index (AI: ArrayIndex)
Fields can be added to BI from the normalization table for arrays, but the array index is from the corresponding value. Instead, array fields can be added to a separate Arrayindex (AI) that holds index information, allowing entries in the same array to be collocated by the index store, thereby making it possible for many queries Provide good performance. Sequence values can be stored in the AI using the following signature:
(col_path, tid, join_key, index)-> val
col_pathは、配列フィールドの経路、例えば、タグ配列の要素についての“root.tags”、または、タグ配列内のオブジェクトの“text”フィールドについての“root.tags.text”である。join_key及びインデックスは、配列の外部キー及び値のインデックスである。各配列についてBIに別個のエントリを記憶する必要がないように、tidも記憶される。tidを用いて、同じオブジェクト内の対応するカラムについて値をルックアップすることができる。別々のツイートにおいて、ハッシュタグを表すオブジェクトを考える。
1: { "id": 3465345, "tags": [ "muffins" "cupcakes" ] }
2: { "id": 3465376, "tags": [ "curry" "sauces" ] }
これらに関して、タグテーブルは、下記のスキーマを有する。
Root.tags<arr>(id_jk: join_key, index: int, val: string)
このテーブルについて、AI内のエントリは下記のようになる。
(root.tags<arr>, 1, 1, 0) --> "muffins"
(root.tags<arr>, 1, 1, 1) --> "cupcakes"
(root.tags<arr>, 2, 2, 0) --> "curry"
(root.tags<arr>, 2, 2, 1) --> "sauces"
col_path is the path of the array field, eg, "root.tags" for elements of the tag array, or "root.tags.text" for the "text" field of the object in the tag array. join_key and index are indexes of the foreign key and value of the array. The tid is also stored, as it is not necessary to store a separate entry in BI for each sequence. You can use tid to look up values for corresponding columns in the same object. Consider an object that represents a hashtag in separate tweets.
1: {"id": 3465345, "tags": ["muffins""cupcakes"]}
2: {"id": 3465376, "tags": ["curry""sauces"]}
For these, the tag table has the following schema:
Root.tags <arr> (id_jk: join_key, index: int, val: string)
For this table, the entries in the AI are as follows:
(root.tags <arr>, 1, 1, 0)->"muffins"
(root.tags <arr>, 1, 1, 1)->"cupcakes"
(root.tags <arr>, 2, 2, 0)->"curry"
(root.tags <arr>, 2, 2, 1)->"sauces"
配列インデックスは、配列フィールドの値を迅速に反復処理することを可能にする。これは、例えば、これらのフィールド全体に統計(例えば、合計、平均、分散等)を実行する場合、特定の値を見付ける場合などに有用である。 Array index allows to quickly iterate over the values of array fields. This is useful, for example, when finding statistics (eg, sums, averages, variances, etc.) over these fields, finding specific values, etc.
ネストされた配列例
ルートオブジェクト内の配列(トップレベルの配列)については、tid及びjoin_keyフィールドは冗長であり(上記を参照)、最適化により除去できることに留意する。しかしながら、ネストされた配列については、別個のjoin_keyが必要であり、余分ではない。例えば、下記のJSONオブジェクトを考える。
1: {"id": 3598574, "tags": [[8,25,75], ["muffins", "donuts",
"pastries"〕〕}
対応する関係スキーマは、
Root.tags<arr>(id_jk: join_key, index: int, val<arr>: join_key)
Root.tags<arr>.val<arr>(id_jk: join_key, index: int, val<num>:
num, val<str>: str)
である。
AIは、下記のキーと値のペアを使用することを思い起こそう。
col_path, tid, join_key, index -> val
下記のAIエントリが生じる。
tags<arr>.val<arr>, 1, 1, 0 -> 1
tags<arr>.val<arr>, 1, 1, 1 -> 2
(numbers array)
tags<arr>.val<arr>.val<num>, 1, 1, 0 -> 8
tags<arr>.val<arr>.val<num>, 1, 1, 1 -> 25
tags<arr>.val<arr>.val<num>, 1, 1, 2 -> 75
(string array)
tags<arr>.val<arr>.val<str>, 1, 2, 0 -> "muffins"
tags<arr>.val<arr>.val<str>, 1, 2, 1 -> "donuts"
tags<arr>.val<arr>.val<str>, 1, 2, 2 -> "pastries"
Nested Array Examples Note that for arrays in the root object (top-level arrays), the tid and join_key fields are redundant (see above) and can be eliminated by optimization. However, for nested arrays, separate join_keys are required and not redundant. For example, consider the following JSON object:
1: {"id": 3598574, "tags": [[8, 25, 75], ["muffins", "donuts",
"pastries"]]}
The corresponding relationship schema is
Root.tags <arr> (id_jk: join_key, index: int, val <arr>: join_key)
Root.tags <arr> .val <arr> (id_jk: join_key, index: int, val <num>:
num, val <str>: str)
It is.
Recall that AI uses the following key-value pairs:
col_path, tid, join_key, index-> val
The following AI entry occurs.
tags <arr> .val <arr>, 1, 1, 0-> 1
tags <arr> .val <arr>, 1, 1, 1-> 2
(numbers array)
tags <arr> .val <arr> .val <num>, 1, 1, 0-> 8
tags <arr> .val <arr> .val <num>, 1, 1, 1-> 25
tags <arr> .val <arr> .val <num>, 1, 1, 2-> 75
(string array)
tags <arr> .val <arr> .val <str>, 1, 2, 0->"muffins"
tags <arr> .val <arr> .val <str>, 1, 2, 1->"donuts"
tags <arr> .val <arr> .val <str>, 1, 2, 2->"pastries"
結合キーが、ネストされた配列キーと値のペアから取り除かれた場合、マフィン(muffins)が第1のネストされた配列の一部であったか、第2のネストされた配列の一部であったかが分からなくなることに留意する。従って、結合キーは、トップレベルの配列には冗長であるが、ネストされた配列の場合には冗長ではない。 If the join key is removed from the nested array key-value pair, then whether the muffins were part of the first nested array or were part of the second nested array Keep in mind that you will not understand. Thus, the join key is redundant for top-level arrays but not for nested arrays.
配列インデックス(AI2:Array Index 2)
上記2つのインデックス(BI及びAI)は、採集されたデータ全てを再構築するには十分であるが、この2つのインデックスが効率的にサポートしないアクセスパターンがある。そのアクセスパターンのために、下記のインデックスを導入する。下記のインデックスは、追加スペースを犠牲にして性能改善のためにオプションで作成することができる。
Array index (AI2: Array Index 2)
Although the above two indexes (BI and AI) are sufficient to reconstruct all the collected data, there are access patterns that these two indexes do not support efficiently. The following index is introduced for the access pattern. The following indexes can optionally be created to improve performance at the expense of additional space.
これは、署名
(col_path, index, tid, join_key) -> val
を有し、この署名によって、配列の特定のインデックス要素を迅速に見付けることが可能になる。例えば、インデックス10(タグ[10])で全てのタグの戻すことは、AI2を用いると、簡単で高速である。
This is a signature
(col_path, index, tid, join_key)-> val
This signature makes it possible to quickly find a particular index element of the array. For example, returning all tags with index 10 (tags [10]) is simple and fast with AI2.
マップインデックス(MI:Map Index)
マップインデックスは、その機能及び署名、すなわち、
(col_path, tid, join_key, map_key) -> val
において配列インデックスに類似する。
Map index (MI: Map Index)
A map index has its function and signature, ie
(col_path, tid, join_key, map_key)-> val
Similar to array index in.
主な違いは、マップインデックスは、初期採集中に構築されず、非同期的に構築されることである。初期ロード中、マップは、オブジェクトとして扱われ、通常通り、BIに挿入される。一旦、両方がポピュレートされると、より効率的なクエリ処理のためにBIとMIの両方のエントリが利用可能になる。BIエントリは、ユーザまたはアドミニストレータがマップを装飾しないように要求する場合には、関連したままである。関係スキーマだけが、変更を必要とされ、マップされないデータに対応する元のBIエントリは、その後、クエリにおいて使用される。 The main difference is that map indexes are not built during initial collection but are built asynchronously. During initial loading, the map is treated as an object and inserted into BI as usual. Once both are populated, both BI and MI entries will be available for more efficient query processing. A BI entry remains relevant if the user or administrator requests not to decorate the map. Only the relationship schemas need to be changed, and the original BI entries corresponding to the unmapped data are then used in the query.
AI同様、MIは、統計関数の適用、特定のフィールド名への制限などのために、マップ要素を反復処理するときに有用である。ページビュー統計を維持するオブジェクトを再度考える。
1: { "url": "noudata.com/blog",
"page_views": { "2012-12-01": 10, "2012-12-02": 12, ...
"2012-12-15": 10 }
2: { "url": "noudata.com/jobs",
"page_views": { "2012-12-01": 2, "2012-12-02": 4, ... "2012-
12-15": 7 }
マップとしてフラグを立てられる場合、page_viewsテーブルについての関係スキーマは、
Root.page_views<map>(id_jk: join_key, key: string, val: num)
where key is the map's key and val is the associated value. For
the above objects, the entries in the MI would be:
(root.page_views<map>, 1, 1, "2012-12-01") --> 10
(root.page_views<map>, 1, 1, "2012-12-02") --> 12
…
(root.page_views<map>, 1, 1, "2012-12-15") --> 10
(root.page_views<map>, 2, 2, "2012-12-01") --> 2
(root.page_views<map>, 2, 2, "2012-12-02") --> 4
…
(root.page_views<map>, 2, 2, "2012-12-05") --> 7
である。
この順序付けは、page_viewsマップ内の値が各ページについて併置されることを可能にする一方、BIでは、値が日付によって併置されることになる。
Like AI, MI is useful when iterating map elements due to the application of statistical functions, restrictions on particular field names, etc. Think again of the objects that maintain page view statistics.
1: {"url": "noudata.com/blog",
"page_views": {"2012-12-01": 10, "2012-12-02": 12, ...
"2012-12-15": 10}
2: {"url": "noudata.com/jobs",
"page_views": {"2012-12-01": 2, "2012-12-02": 4, ... "2012-
12-15 ": 7}
If flagged as a map, the relationship schema for the page_views table is
Root.page_views <map> (id_jk: join_key, key: string, val: num)
where key is the map's key and val is the associated value. For
the above objects, the entries in the MI would be:
(root.page_views <map>, 1, 1, "2012-12-01")-> 10
(root.page_views <map>, 1, 1, "2012-12-02")-> 12
...
(root.page_views <map>, 1, 1, "2012-12-15")-> 10
(root.page_views <map>, 2, 2, "2012-12-01")-> 2
(root.page_views <map>, 2, 2, "2012-12-02")-> 4
...
(root.page_views <map>, 2, 2, "2012-12-05")-> 7
It is.
This ordering allows the values in the page_views map to be collocated for each page, while in BI the values will be collocated by date.
マップインデックス2(MI2:Map Index 2)
さらに、補助マップインデックスを実装してよい。補助マップインデックスは、その機能及び署名、すなわち、
(col_path, map_key, tid, join_key) -> val
において配列インデックスに類似する。
これによって、“all the different values coresponding to map key 2012‐12‐05”などの、特定のマップ要素についての効率的な検索が可能になる。AI2とMI2の両方の包括的表現は、以下のように書くことができる。
(col_path, key, tid, join_key) -> val
ここで、キーは、配列のインデックスまたはマップのmap_keyに対応する。
Map index 2 (MI2: Map Index 2)
In addition, auxiliary map indexes may be implemented. The auxiliary map index has its function and signature, ie
(col_path, map_key, tid, join_key)-> val
Similar to array index in.
This allows an efficient search for specific map elements, such as "all the different values cores corresponding to map key 2012-12-05". The generic representation of both AI2 and MI2 can be written as:
(col_path, key, tid, join_key)-> val
Here, the key corresponds to the array index or map_key of the map.
値インデックス(VI:Value Index)
上記インデックスは、特定のフィールドの値をルックアップし、それらの値を反復処理するのに有用であるが、クエリが特定の値または特定の値の範囲だけを探している場合、高速アクセスを可能にしない。例えば、クエリが、“mashah08”によって書かれたツイートのテキストを返すこと求めるとする。そのようなクエリを支援するために、スキーマ内のフィールドの一部または全てについてValueIndexを構築することができる。ValueIndexは、データが採集される際に構築されてもよく、後に非同期的に構築されてもよい。値インデックスのキーは、
(col_path, val)
であり、ここで、valは、ソースデータにおける属性の値である。VIにおいてそのキーに対応する値は、どこでその値についてのフィールドが発生するかに応じて決まる。上記各インデックスについて、その値は下記のように変わる。
BI: (col_path, val) -> tid
AI: (col_path, val) -> tid, join_key, index
MI: (col_path, val) -> tid, join_key, key
Value index (VI: Value Index)
The above index is useful for looking up specific field values and iterating over those values, but allows fast access if the query is only looking for a specific value or a range of specific values Do not For example, suppose a query asks to return the text of a tweet written by "mashah08". To support such queries, ValueIndex can be constructed for some or all of the fields in the schema. The ValueIndex may be constructed as data is collected, and may be constructed asynchronously later. The key of the value index is
(col_path, val)
Where val is the value of the attribute in the source data. The value corresponding to that key in VI depends on where the field for that value occurs. The value of each index changes as follows.
BI: (col_path, val)-> tid
AI: (col_path, val)-> tid, join_key, index
MI: (col_path, val)-> tid, join_key, key
例えば、ツイート
1: { "text": "Tweet this", "user": { "id": 29471497,
"screen_name": "mashah08" } }
2: { "text": "Tweet that", "user": { "id": 27438992,
"screen_name": "binkert" } }
は、
(root.text<string>, "Tweet this") --> 1
(root.text<string>, "Tweet that") --> 2
(root.user.id<num>, 29471497) --> 1
(root.user.id<num>, 27438992) --> 2
(root.user.screen_name<string>, "Mashah08") --> 1
(root.user.screen_name<string>, "binkert") --> 2
として記憶される。
VIを用いると、キー:(root.user.screen_name,“mashah08”)を探し、全ての関連tidを取り出すことにより、“mashah08”によって書かれた全てのツイートについて検索することができる。そして、各ツイートの対応するテキストを返すために、取り出したtidを使用してBIを検索することができる。インデックス、特に、値インデックスによって犠牲になるのは、追加のストレージスペースであり、新しいオブジェクトとしてインデックスの更新に必要な実行時間がシステムに追加される。スペースまたは更新オーバーヘッドが原因で、ユーザは、全ての可能な経路にインデックスを付けることを望まない場合がある。従って、ユーザは、VIにおいてどの経路にインデックスを付けるかを指定することができる。
For example, Tweet
1: {"text": "Tweet this", "user": {"id": 29471497,
"screen_name": "mashah08"}}
2: {"text": "Tweet that", "user": {"id": 27438992,
"screen_name": "binkert"}}
Is
(root.text <string>, "Tweet this")-> 1
(root.text <string>, "Tweet that")-> 2
(root.user.id <num>, 29471497)-> 1
(root.user.id <num>, 27438992)-> 2
(root.user.screen_name <string>, "Mashah08")-> 1
(root.user.screen_name <string>, "binkert")-> 2
Is stored as
Using VI, it is possible to search for all tweets written by "mashah08" by searching for the key: (root.user.screen_name, "mashah08") and retrieving all relevant tids. The retrieved tid can then be used to search the BI to return the corresponding text of each tweet. It is the extra storage space that is sacrificed by the index, especially the value index, which adds to the system the execution time needed to update the index as a new object. Due to space or update overhead, users may not want to index all possible paths. Thus, the user can specify which path to index in the VI.
ローインデックス(RI:RawIndex)
(従来のローベースのストアにおけるレコードの要求に類似して)採集したオブジェクト全体の再作成を容易にするために、RowIndex(RI)を実装することができる。RowIndexは、キーと値のペア、
tid --> JSON object
として記憶される。
Low index (RI: RawIndex)
A RowIndex (RI) can be implemented to facilitate the re-creation of the entire collected object (similar to the request for records in a conventional row based store). RowIndex is a key-value pair,
tid-> JSON object
Is stored as
JSONオブジェクトは、文字列表現として、BSONとして、または、JSONオブジェクトの内部表現のために使用されるツリー構造などの任意の他の直列化フォーマットとして、記憶されてよい。VIに関して上述した2つのツイートについては、対応するRIエントリは、
1 --> { "text": "Tweet this", "user": { "id": 29471497,
"screen_name": "mashah08" } }
2 --> { "text": "Tweet that", "user": { "id": 27438992,
"screen_name": "binkert" } }
である。
The JSON object may be stored as a string representation, as BSON, or as any other serialization format such as a tree structure used for internal representation of the JSON object. For the two tweets mentioned above with respect to VI, the corresponding RI entry is
1->{"text":"Tweetthis","user":{"id": 29471497,
"screen_name": "mashah08"}}
2->{"text":"Tweetthat","user":{"id": 27438992,
"screen_name": "binkert"}}
It is.
実施例
BI、AI、MI、VIに関する実施例。上記に類似したツイートを考える。ここで、ツイートが一日に何回リツイートされたかを追跡する“retweet_freq”属性が追加される。
1: { "text": "Love #muffins and #cupcakes: bit.ly/955Ffo",
"user": { "id": 29471497, "screen_name": "mashah08" },
"tags": [ "muffins", "cupcakes" ],
"retweet_freq": { "2012-12-01": 10, "2012-12-02": 13,
"2012-12-03": 1 } }
2: { "text": "Love #sushi and #umami: bit.ly/955Ffo",
"user": { "id": 28492838, "screen_name": "binkert" },
"tags": [ "sushi", "umami" ],
"retweet_freq": { "2012-12-04": 20, "2012-12-05": 1 } }
Examples Examples regarding BI, AI, MI, VI. Consider a tweet similar to the above. Here, a "retweet_freq" attribute is added to track how many times a tweet was retweeted per day.
1: {"text": "Love #muffins and #cupcakes: bit.ly/955Ffo",
"user": {"id": 29471497, "screen_name": "mashah08"},
"tags": ["muffins", "cupcakes"],
"retweet_freq": {"2012-12-01": 10, "2012-12-02": 13,
"2012-12-03": 1}}
2: {"text": "Love #sushi and #umami: bit.ly/955Ffo",
"user": {"id": 28492838, "screen_name": "binkert"},
"tags": ["sushi", "umami"],
"retweet_freq": {"2012-12-04": 20, "2012-12-05": 1}}
これらのレコードのスキーマは、
O{ "text": string, "user": 0{ "id": number,
"screen_name": string }, "tags": [ string ],
"retweet_freq": M{ "2012-12-01": number ... "2012-12-05":
number } }
である。
The schema of these records is
O {"text": string, "user": 0 {"id": number,
"screen_name": string}, "tags": [string],
"retweet_freq": M {"2012-12-01": number ... "2012-12-05":
number}}
It is.
これらのレコードのJSONスキーマは、
{
"type": "object",
"obj_type": "object",
"properties" : {
"text" : {
"type": "string"
},
"user": {
"type": "object",
"obj_type": "object",
"properties": {
"id": {
"type": "number",
}
"screen_name": {
"type": "string",
}
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"retweet_freq" : {
"type": "object",
"obj_type": "map",
"properties": {
"2012-12-01": {
"type": "number"
},
…
"2012-12-05": {
"type": "number"
}
}
}
}
}
となる。
The JSON schema of these records is
{
"type": "object",
"obj_type": "object",
"properties": {
"text": {
"type": "string"
},
"user": {
"type": "object",
"obj_type": "object",
"properties": {
"id": {
"type": "number",
}
"screen_name": {
"type": "string",
}
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"retweet_freq": {
"type": "object",
"obj_type": "map",
"properties": {
"2012-12-01": {
"type": "number"
},
...
"2012-12-05": {
"type": "number"
}
}
}
}
}
It becomes.
retweet_freqがマップとして扱われない場合、関係スキーマは、
Root (text: str,
user.id: num, user.screen_name: str,
tags<arr>: join_key,
retweet_freq.2012-12-01: num,
retweet_freq.2012-12-02: num,
retweet_freq.2012-12-03: num,
retweet_freq.2012-12-04: num,
retweet_freq.2012-12-05: num)
Root.tags<arr> (id_jk: join_key,
index: int,
val: str)
である。
If retweet_freq is not treated as a map, the relationship schema is
Root (text: str,
user.id: num, user.screen_name: str,
tags <arr>: join_key,
retweet_freq. 2012-12-01: num,
retweet_freq. 2012-12-02: num,
retweet_freq. 2012-12-03: num,
retweet_freq. 2012-12-04: num,
retweet_freq. 2012-12-05: num)
Root.tags <arr> (id_jk: join_key,
index: int,
val: str)
It is.
この場合、上記レコード例は、これらの関係を下記のようにポピュレートすることになる。
Root:
("Love #muffins ...", 29471497, mashah08, 1, 10, 13, 1, NULL,
NULL)
("Love #sushi ...", 28492838, binkert, 2, NULL, NULL, NULL,
20, 1)
Root.tags<arr>:
(1, 0, "muffins")
(1, 1, "cupcakes")
(2, 0, "sushi")
(2, 1, "umami")
In this case, the example record will populate these relationships as follows.
Root:
("Love #muffins ...", 29471497, mashah08, 1, 10, 13, 1, NULL,
NULL)
("Love #sushi ...", 28492838, binkert, 2, NULL, NULL, NULL,
20, 1)
Root.tags <arr>:
(1, 0, "muffins")
(1, 1, "cupcakes")
(2, 0, "sushi")
(2, 1, "umami")
これらは、“select*”クエリがこれらのテーブル上で実行される場合にクエリが戻すタプルであることに留意する。これらのタプルは、ストレージエンジンにおいて必ずしもそのように具体化されない。すなわち、これは、基礎的データ上での単なる仮想ビューであってよく、示したように物理的に記憶されなくてもよい。 Note that these are the tuples that the query returns if the "select * " query is executed on these tables. These tuples are not necessarily instantiated in the storage engine. That is, it may be just a virtual view on the underlying data and may not be physically stored as shown.
retweet_freqがマップとして識別される場合、関係スキーマは、以下のように、より簡潔(及び追加データに更に協調的(accommodating))になる。
Root (text: str,
user.id: num, user.screen_name: str,
tags<arr>: join_key,
retweet_freq<map>: join_key)
Root.tags<arr> (id_jk: join_key,
index: int,
val: str)
Root.retweet_freq<map> (id_jk: join_key,
key: str,
val: num)
If retweet_freq is identified as a map, the relationship schema becomes simpler (and more accommodating additional data) as follows.
Root (text: str,
user.id: num, user.screen_name: str,
tags <arr>: join_key,
retweet_freq <map>: join_key)
Root.tags <arr> (id_jk: join_key,
index: int,
val: str)
Root.retweet_freq <map> (id_jk: join_key,
key: str,
val: num)
対応するタプルは、
Root:
("Love #muffins ...", 29471497, mashah08, 1, 1)
("Love #sushi ...", 28492838, binkert, 2, 2)
Root.tags<arr>:
(1, 0, "muffins")
(1, 1, "cupcakes")
(2, 0, "sushi")
(2, 1, "umami")
Root.retweet_freq<map>:
(1, "2012-12-01", 10)
(1, "2012-12-02", 13)
(1, "2012-12-03", 1)
(2, "2012-12-04", 20)
(2, "2012-12-05", 1)
である。
The corresponding tuple is
Root:
("Love #muffins ...", 29471497, mashah08, 1, 1)
("Love #sushi ...", 28492838, binkert, 2, 2)
Root.tags <arr>:
(1, 0, "muffins")
(1, 1, "cupcakes")
(2, 0, "sushi")
(2, 1, "umami")
Root.retweet_freq <map>:
(1, "2012-12-01", 10)
(1, "2012-12-02", 13)
(1, "2012-12-03", 1)
(2, "2012-12-04", 20)
(2, "2012-12-05", 1)
It is.
BIに追加されるキーと値のペアは、
(root.retweet_freq.2012-12-01, 1) --> 10
(root.retweet_freq.2012-12-02, 1) --> 13
(root.retweet_freq.2012-12-03, 1) --> 1
(root.retweet_freq.2012-12-04, 2) --> 20
(root.retweet_freq.2012-12-05, 2) --> 1
(root.text, 1) --> "Love #muffins and #cupcakes"
(root.text, 2) --> "Love #sushi and #umami"
(root.uer.id, 1) --> 29471497
(root.user.id, 2) --> 28492838
(root.user.screenname, 1) --> mashah08
(root.user.screen_name, 2) --> binkert
である。
The key-value pairs added to BI are
(root.retweet_freq.2012-12-01, 1)-> 10
(root.retweet_freq. 2012-12-02, 1)-> 13
(root.retweet_freq. 2012-12-03, 1)-> 1
(root.retweet_freq. 2012-12-04, 2)-> 20
(root.retweet_freq. 2012-12-05, 2)-> 1
(root.text, 1)->"Love#muffins and #cupcakes"
(root.text, 2)->"Love#sushi and #umami"
(root.uer.id, 1)-> 29471497
(root.user.id, 2)-> 28492838
(root.user.screenname, 1)-> mashah08
(root.user.screen_name, 2)-> binkert
It is.
AIに追加されるキーと値のペアは下記のようになる。この場合、ネストされた配列が無いので、結合キーは(tidと同様に)冗長であることに留意する。
(root.tags<arr>, 1, 1, 0) --> "muffins"
(root.tags<arr>, 1, 1, 1) --> "cupcakes"
(root.tags<arr>, 2, 2, 0) --> "sushi"
(root.tags<arr>, 2, 2, 1) --> "umami"
The key-value pairs added to AI are as follows: Note that in this case the join key is redundant (like tid) since there are no nested sequences.
(root.tags <arr>, 1, 1, 0)->"muffins"
(root.tags <arr>, 1, 1, 1)->"cupcakes"
(root.tags <arr>, 2, 2, 0)->"sushi"
(root.tags <arr>, 2, 2, 1)->"umami"
RIは、次の2つのエントリを有することになる。
1--> { "text": "Love #muffins and #cupcakes: bit.ly/955Ffo",
"user": { "id": 29471497, "screen_name": "mashah08" },
"tags": [ "muffins", "cupcakes" ], "retweet_freq": { "2012-
12-01": 10, "2012-12-02": 13, "2012-12-03": 1 } }
2--> { "text": "Love #sushi and #umami: bit.ly/955Ffo", "user":
{ "id": 28492838, "screen_name": "binkert" }, "tags": [
"sushi", "umami" 〕, "retweet_freq": { "2012-12-04": 20,
"2012-12-05": 1 } }
The RI will have the following two entries.
1->{"text":"Love#muffins and #cupcakes: bit.ly/955Ffo",
"user": {"id": 29471497, "screen_name": "mashah08"},
"tags": ["muffins", "cupcakes"], "retweet_freq": {"2012-
12-01 ": 10," 2012-12-02 ": 13," 2012-12-03 ": 1}}
2->{"text":"Love#sushi and #umami: bit.ly/955Ffo", "user":
{"id": 28492838, "screen_name": "binkert"}, "tags": [
"sushi", "umami"], "retweet_freq": {"2012-12-04": 20,
"2012-12-05": 1}}
もしMIが構築される場合には、MIは、下記のエントリを有することになる。
(root.retweet_freq<map>, 1, 1, "2012-12-01") --> 10
(root.retweet_freq<map>, 1, 1, "2012-12-02") --> 13
(root.retweet_freq<map>, 1, 1, "2012-12-03") --> 1
(root.retweet_freq<map>, 2, 2, "2012-12-04") --> 20
(root.retweet_freq<map>, 2, 2, "2012-12-05") --> 1
If an MI is built, the MI will have the following entry:
(root.retweet_freq <map>, 1, 1, "2012-12-01")-> 10
(root.retweet_freq <map>, 1, 1, "2012-12-02")-> 13
(root.retweet_freq <map>, 1, 1, "2012-12-03")-> 1
(root.retweet_freq <map>, 2, 2, "2012-12-04")-> 20
(root.retweet_freq <map>, 2, 2, "2012-12-05")-> 1
同様に、VIは、(全経路がインデックス付けされ、マップがマップのように扱われる場合)下記のエントリを有することになる。
root. retweet_freq<map>, 1) - -> 2, 2, "2012-12-05
root. retweet_freq<map>, 1) - -> 1, 1, "2012-12-03
root. retweet_freq<map>, 10) - -> 1, 1, "2012-12-01
root. retweet_freq<map>, 13) - -> 1, 1, "2012-12-02
root. retweet_freq<map>, 20) - -> 2, 2, "2012-12-04
root. tags<arr>, "cupcakes") - -> 1, 1, 1
root. tags<arr>, "muffins ") - -> 1, 1, 0
root. tags<arr>, "sushi") - -> 2, 2, 0
root. tags<arr>, "umami") - -> 2, 2, 1
(root.text<str>, "Love #muffins and #cupcakes")- -> 1
(root.text<str>, "Love #sushi and #umami") - -> 2
(root.user.id, 29471497) - -> 1
(root.user.id, 28492838) - -> 2
(root.user.screen_name, "mashah08") - -> 1
(root.user.screen_name, "binkert") - -> 2
Similarly, a VI will have the following entry (if all paths are indexed and the map is treated like a map):
root. retweet_freq <map>, 1)--> 2, 2, "2012-12-05
root. retweet_freq <map>, 1)--> 1, 1, "2012-12-03
root. retweet_freq <map>, 10)--> 1, 1, "2012-12-01
root. retweet_freq <map>, 13)--> 1, 1, "2012-12-02
root. retweet_freq <map>, 20)--> 2, 2, "2012-12-04
root. tags <arr>, "cupcakes")--> 1, 1, 1
root. tags <arr>, "muffins")--> 1, 1, 0
root. tags <arr>, "sushi")--> 2, 2, 0
root. tags <arr>, "umami")--> 2, 2, 1
(root.text <str>, "Love #muffins and #cupcakes")--> 1
(root.text <str>, "Love #sushi and #umami")--> 2
(root.user.id, 29471497)--> 1
(root.user.id, 28492838)--> 2
(root.user.screen_name, "mashah08")--> 1
(root.user.screen_name, "binkert")--> 2
上記アクションは、段階的に記載するが、単一パスでの採集を可能にするためにパイプライン化することができ、BI、AI、RIをロードし、JSONスキーマを計算する。他のインデックスは、非同期的に構築することができ、また、求めに応じて有効または無効にすることができる。 The above actions are described step by step, but can be pipelined to allow single pass collection, load BI, AI, RI, and compute JSON schema. Other indexes can be built asynchronously and can be enabled or disabled as required.
システムアーキテクチャ
分析プラットフォームは、サービス指向であるように設計される。様々な実装において、5つの主なサービス、すなわち、プロキシ、メタデータサービス、クエリエクゼキュータ、ストレージサービス、及び、採集サービスがある。
System Architecture The analysis platform is designed to be service oriented. In various implementations, there are five main services: proxy, metadata service, query executor, storage service, and collection service.
この分離アプローチは、幾つかの長所を有し得る。これらのサービスは、外部API(遠隔手順呼び出し)だけを介して通信するので、サービスを多重化することができ、各サービスを独立して共有することができる。例えば、複数のプロキシが、エクゼキュータ毎に使用されてよく、また、複数のエクゼキュータが、ストレージサービス毎に使用されてよい。メタデータサービスも、エクゼキュータ及びストレージサービスの複数のインスタンス間で共有することができる。 This separation approach may have several advantages. Since these services communicate only through external APIs (remote procedure calls), services can be multiplexed and services can be shared independently. For example, multiple proxies may be used per executor, and multiple executors may be used per storage service. Metadata services can also be shared among multiple instances of executor and storage services.
エクゼキュータ、ストレージ及び採集サービスは、並列化され、プライベートまたはパブリックインフラストラクチャにおいて、仮想マシンインスタンスの個々の部分を実行することができる。これは、これらのサービスを独立的に中断、スケーリングすることを可能にする。これは、需要の変動に基づいてサービス容量を調整することによって費用を削減するのに有用である。例えば、パブリッククラウドの弾力性を用いて、高速の夜通しのロードのための採集サービスを高度に並列化することができる一方、日々のクエリ作業負荷については、実行及びストレージサービスのサイズを削減したままにする。 The executor, storage and collection services are parallelized and can execute individual parts of virtual machine instances in a private or public infrastructure. This allows these services to be suspended and scaled independently. This is useful to reduce costs by adjusting service capacity based on fluctuations in demand. For example, the elasticity of the public cloud can be used to highly parallelize the collection service for fast overnight loads, while reducing the size of the execution and storage service for daily query workloads Make it
プロキシは、クライアントへのゲートウェイであり、ODBC(Open Database Connectivity)、libpq、JDBC(Java(登録商標) Database Connectivity)、SSL(secure sockets layer)等の、1つまたは複数の標準プロトコルをサポートする。ゲートウェイは、ファイアウォール、認証サービス、及び、内部サービスのための制御の場所として機能する。例えば、実行のサポート及びストレージサービスを費用節約のために中断している間、クライアント接続(ネットワークソケット等)は、プロキシでオープンに保つことができる。クライアント接続が再びアクティブになると、必要なサービスは、比較的短い始動待ち時間でオンデマンドに呼び起こすことができる。 A proxy is a gateway to a client and supports one or more standard protocols such as ODBC (Open Database Connectivity), libpq, JDBC (Java Database Connectivity), SSL (secure sockets layer) and the like. The gateway acts as a place of control for firewalls, authentication services, and internal services. For example, client connections (such as network sockets) can be kept open at the proxy while interrupting execution support and storage services for cost savings. When the client connection is reactivated, the required services can be invoked on demand with relatively short start-up latency.
メタデータサービスは、他のサービスの多くのインスタンスによって典型的に共有される。メタデータサービスは、スキーマ、ソース情報、パーティション化情報、クライアントユーザ名、キー、統計(ヒストグラム、値分布等)、及び、各サービスの現在の状態に関する情報(インスタンスの数、IPアドレス等)を含むメタデータを記憶する。 Metadata services are typically shared by many instances of other services. Metadata services include schema, source information, partitioning information, client user name, keys, statistics (histogram, value distribution etc), and information on the current state of each service (number of instances, IP address etc etc) Store metadata
ストレージサービスは、インデックスを管理し、読み出し及び書き込み要求を満たす。さらに、クエリエクゼキュータは、多くの関数をストレージサービスにプッシュダウンすることができる。様々な実装において、ストレージサービスは、結果をフィルタにかけるために述語及びUDF(ユーザが定義した関数)を評価し、(例えば、オブジェクトを再構築するために)ローカル結合を評価し、プッシュダウンされた結合(例えば、ブロードキャスト結合)を評価し、ローカル集計を評価することができる。 Storage services manage indexes and satisfy read and write requests. In addition, the query executor can push down many functions to the storage service. In various implementations, the storage service evaluates predicates and UDFs (user-defined functions) to filter results, evaluates local bindings (eg, to reconstruct objects), and is pushed down. Bindings (eg, broadcast bindings) can be evaluated and local aggregations can be evaluated.
ストレージサービスは、パーティション並列処理と呼ばれる技術を用いて並列化することができる。このアプローチでは、ストレージサービスの非常に多くのインスタンスまたはパーティションが作成され、採集されたオブジェクトはパーティション間で分けられる。各パーティションは、インデックスの各型を、単一のインスタンス全体であるかのように記憶するが、各パーティションは、採集されたデータのサブセットにインデックスを付けるだけである。 Storage services can be parallelized using a technique called partition parallel processing. In this approach, numerous instances or partitions of the storage service are created, and the harvested objects are divided among the partitions. Each partition stores each type of index as if it were an entire single instance, but each partition only indexes a subset of the collected data.
分析エンジンは、1つまたは複数のパーティション化戦略をサポートする。簡単で有効な戦略は、tidによってオブジェクトをパーティション化し、ローカルインデックス内に各オブジェクトのエントリを記憶することである。このように、採集されたオブジェクトは、異なるインスタンス間で分割されない。異なるインスタンス間で分割されると、クエリがオブジェクトの複数の部分に依存する場合、かなりのネットワーク帯域幅を消費し得る。tidは、ハッシュ割り当て、ラウンドロビン、または、範囲ベースの割り当てを含む、多くの手法で割り当てることができる。これらの個々の割り当ては、全てのインスタンス間に直近のデータを分散することによって、負荷を分散させる。 The analysis engine supports one or more partitioning strategies. A simple and effective strategy is to partition objects by tid and store an entry for each object in the local index. In this way, the collected objects are not split between different instances. When split between different instances, considerable network bandwidth may be consumed if the query relies on multiple parts of the object. tid can be assigned in many ways, including hash assignment, round robin or range based assignment. These individual assignments distribute the load by distributing the most recent data among all the instances.
別の戦略は、ユーザidまたはセッションidなどの別のフィールド値(またはフィールド値の組み合わせ)によってパーティション化することである。代替のフィールド(カラム)のパーティション化によって、他のテーブルまたはコレクション、例えば、ユーザプロファイル、とローカル結合を行うのが便利になる。パーティション化戦略は、ハッシュパーティション化であってもよく、サンプリング及び範囲パーティション化を用いてもよい。前者は、効率的なポイントルックアップのために使用され、後者は、効率的な範囲検索をサポートするために使用される。 Another strategy is to partition by another field value (or combination of field values) such as user id or session id. Partitioning of alternate fields (columns) makes it convenient to do local joins with other tables or collections, eg user profiles. The partitioning strategy may be hash partitioning, and may use sampling and range partitioning. The former is used for efficient point lookup and the latter is used to support efficient range search.
パーティション化戦略に関わらず、オブジェクトまたはオブジェクトの任意のサブセットは、ローカルに再構築できるべきである。従って、ストレージサービスパーティションは、クエリ処理中、クロストークがなく、APIを介した実行サービスとの通信だけを必要とする。 Regardless of the partitioning strategy, an object or any subset of objects should be able to be reconstructed locally. Thus, the storage service partition is free of crosstalk during query processing and only needs to communicate with the execution service via the API.
ストレージサービスはキャッシュを有する。各パーティションにおけるキャッシュサイズを増やすことができ、あるいは、ストレージサービスの性能を改善するためにパーティションの数を増やすことができる。ストレージサービスは、メモリ内、または、ローカルディスク上にインデックスをキャッシュすることができ、インデックスは、Amazon S3のような外部ストレージ上で存続することができる。この特徴によって、ストレージサービスノードの停止や破壊が可能になり、また、必要な場合はいつでも、それらを再配置することができる。さらに、この特徴は、高度の弾力性、すなわち、低コストでS3にストレージサービスをハイバネートし、かつ、需要変動に合わせてストレージサービス容量を変える能力、を可能にする。 Storage services have a cache. The cache size in each partition can be increased, or the number of partitions can be increased to improve storage service performance. Storage services can cache indexes in memory or on local disks, and indexes can persist on external storage such as Amazon S3. This feature allows storage service nodes to be shut down or destroyed, and they can be relocated whenever necessary. Furthermore, this feature enables a high degree of elasticity, ie the ability to hibernate storage services to S3 at low cost, and to change the storage service capacity to meet demand fluctuations.
クエリ実行サービスは、クエリ計画段階によって生成されたクエリ計画を実行する。クエリ実行サービスは、クエリ演算子、例えば、結合(join)、統合(union)、ソート(sort)、集計(aggregation)などを実装する。これらの演算の多くは、ストレージサービスにプッシュダウンすることができ、可能であればプッシュダウンされる。これらは、述語、射影、射影された属性を再構築するためのカラム型結合、並びに、GROUP BYステートメントを用いる分散的及び代数的集計関数のための部分集計、を含む。 The query execution service executes the query plan generated by the query planning stage. The query execution service implements query operators such as join, union, sort, aggregation, and the like. Many of these operations can be pushed down to the storage service and possibly pushed down. These include predicates, projections, column-type joins to reconstruct projected attributes, and partial aggregations for distributed and algebraic aggregate functions using GROUP BY statements.
クエリ実行サービスは、ストレージサービスからデータを取り込み、非ローカル演算、すなわち、非ローカル結合、再パーティション化を必要とするGROUP BYステートメント、ソートなど、を計算する。エクゼキュータは、パーティション並列処理エクゼキュータに類似する。エグゼキュータは、交換演算子を使用して、クエリ実行ステップ間で再パーティション化を行い、中間結果を流出させるためのローカルストレージを採用する。多くのクエリについては、ストレージサービス内でクエリのほとんどを実行し、結果収集、及び、任意の小さな非ローカル演算のために単一のエクゼキュータノードだけを必要とすることが可能である。 The query execution service takes data from the storage service and calculates non-local operations, ie non-local joins, GROUP BY statements requiring repartitioning, sorting etc. The executor is similar to the partition parallel executor. The executor uses the exchange operator to repartition between query execution steps and employs local storage to flush out intermediate results. For many queries, it is possible to execute most of the queries in the storage service and only need a single executor node for result collection and any small non-local operations.
採集サービス
採集サービスは、半構造データをクエリできるストレージサービスに半構造データをロードすることを担当する。ユーザは、様々なプラットフォーム(例えば、MongoDB、Amazon S3、HDFS)から様々なフォーマット(例えば、JSON、BSON、CSV)でデータを供給する。オプションとしてデータは圧縮機構(例えば、GZIP、BZIP2、Snappy)を用いて圧縮される。基本手順は、使用されるフォーマットに関わらず、適用できる。
Collection Services Collection Services is responsible for loading semi-structured data into storage services that can query semi-structured data. Users supply data in various formats (eg, JSON, BSON, CSV) from various platforms (eg, MongoDB, Amazon S3, HDFS). Data is optionally compressed using a compression mechanism (eg, GZIP, BZIP2, Snappy). The basic procedure is applicable regardless of the format used.
採集タスクは、2つの部分、すなわち、大量の新しいユーザデータをロードする初期採集タスクと、新しいデータが得られたときに定期的に発生する増分採集と、に大まかに分けることができる。 The harvesting task can be broadly divided into two parts: an initial harvesting task that loads a large amount of new user data, and an incremental harvesting that occurs periodically as new data is obtained.
初期採集
初期採集プロセスは、幾つかのステップに分けることができる。最初に、入力データをチャンクにパーティション化する。ユーザは、ファイルのコレクションとして、あるいは、データソースに直接接続することによって初期データを供給する。これらのファイルの位置やフォーマットは、メタデータサービス内に記録される。ユーザは、例えばログファイルローテーションのせいで既にパーティション化されデータを供給してよいが、そうではない場合、ファイルは、並列ロードをサポートするためにチャンクにパーティション化することができる。これらのチャンクは、典型的には約数百メガバイトであり、独立して処理される。
Initial Collection The initial collection process can be divided into several steps. First, partition the input data into chunks. The user supplies the initial data as a collection of files or by connecting directly to the data source. The location and format of these files are recorded in the metadata service. The user may already partition and supply data, for example due to log file rotation, but otherwise the file may be partitioned into chunks to support parallel loading. These chunks are typically around hundreds of megabytes and are processed independently.
入力ファイルをパーティション化するための正確な機構は、データフォーマットに応じて決まる。レコードが復帰改行によって分離される非圧縮フォーマット(例えば、JSONまたはCSV)の場合、単一ファイルは、チャンクの目標数に等しい数のプロセスを用いて、並列に処理することができる。処理は、ファイル(file_size/total_num_chunks)*chunk_num内の適切なオフセットで開始し、復帰改行が見付けられるまで検索する。圧縮されたデータまたはBSONのようなバイナリフォーマットのデータの場合、各入力ファイルは、連続的スキャンが必要な場合がある。各チャンク(ファイル、オフセット、サイズ)の位置は、メタデータサービス内に記憶される。 The exact mechanism for partitioning the input file depends on the data format. For uncompressed formats (eg, JSON or CSV) where records are separated by newlines, single files can be processed in parallel using a number of processes equal to the target number of chunks. The process starts at the appropriate offset within the file (file_size / total_num_chunks) * chunk_num and searches until a newline is found. For compressed data or data in binary format such as BSON, each input file may require a continuous scan. The location of each chunk (file, offset, size) is stored in the metadata service.
データがチャンクに分けられると、実際のスキーマ推論及び採集が行われる。このプロセスの一部として、2つのサービス、すなわち、採集サービス及びストレージサービスが起動される。この2つのサービスは、作業をするために複数のサーバを採用することができる。2つのサービスはまた、任意の所与のマシン上に併置することができる。採集サービスは、一時的であり、採集プロセス中だけ使用される一方、ストレージサービスは、実際のデータを保持し、持続的でなければならない。採集に関わるサーバは、ストレージサービスサーバにデータを送信し、採集サーバの数は、ストレージサーバの数とは無関係であり、ここでは、その数は、各サービスのスループット間の不均衡を最小にするように選択される。チャンクは、採集サーバ間でパーティション化される。各採集サーバは、自身に割り当てられた各チャンクについて以下のステップ、すなわち、(i)構文解析と型推論、(ii)ストレージサービスとの通信、(iii)ローカルスキーマ及び統計の計算、を担当する。 Once the data is divided into chunks, the actual schema inference and collection takes place. As part of this process, two services are launched: a harvesting service and a storage service. The two services can employ multiple servers to work. The two services can also be co-located on any given machine. While the collection service is temporary and used only during the collection process, the storage service must hold the actual data and be persistent. The servers involved in the collection send data to the storage service server, the number of collection servers being independent of the number of storage servers, where the number minimizes the imbalance between the throughput of each service To be chosen. Chunks are partitioned between collection servers. Each collection server is responsible for the following steps for each chunk assigned to it: (i) parsing and type inference, (ii) communication with storage services, (iii) calculation of local schema and statistics .
最初に、データレコードが、内部ツリー表現に構文解析される。一貫した内部表現を全てのソースフォーマット(JSON、BSON等)について使用してよい。入力フォーマットに応じて、型推論も行われてよい。例えば、JSONは日付表現を持たないので、文字列として日付を記憶するのが一般的である。日付はよく見られるので、ユーザが日付を使用してクエリを発行できるように採集中に検出される型の一実施例である。CSV入力ファイルの場合、カラムは型付けされないので、整数などの基本型もまた、検出する必要がある。 First, data records are parsed into an internal tree representation. A consistent internal representation may be used for all source formats (JSON, BSON etc). Type inference may also be performed depending on the input format. For example, since JSON has no date representation, it is common to store the date as a string. Because dates are often viewed, this is one example of the type that is detected during collection so that users can issue queries using dates. For CSV input files, columns are not typed, so basic types such as integers also need to be detected.
レコードが構文解析され、型が推論されると、構文解析ツリーの圧縮された表現が、ストレージサービスに送信される。これは、ツリーの前順走査の形を取る。ストレージサービスは、各インデックス(BI、AI等)に記憶する値を決定することと、タプルid及び結合キーを生成することと、を担当する。キー生成はストレージサービスに任されて、キーが順次、生成され、それによって、基礎的インデックスストアに対する採集性能を改善する。 As the records are parsed and types are inferred, a compressed representation of the parse tree is sent to the storage service. This takes the form of a pre-order traversal of the tree. The storage service is responsible for determining the values to be stored in each index (BI, AI, etc.) and for generating tuple ids and join keys. Key generation is left to the storage service, where keys are generated sequentially, thereby improving the collection performance for the underlying index store.
レコードが採集される際、ローカルJSONスキーマは、上記規則を使用して更新される。スキーマは、単一採集マシンによって見られるレコードを反映し、異なるマシンは、異なるスキーマを有してよい。 When records are collected, the local JSON schema is updated using the above rules. The schema reflects the records seen by a single collection machine, and different machines may have different schemas.
スキーマの計算に加えて、統計が維持される。それは、クエリ処理及びマップ識別に有用である。統計は、各属性が現れる回数、及び、その属性の平均バイトサイズなどのメトリクスを含む。例えば、下記レコード
{ id: 3546732984 }
{ id: "3487234234" }
{ id: 73242342343 }
{ id: 458527434332 }
{ id: "2342342343" }
は、スキーマ{id:int,id:string}を生成し、id:intには、3のカウントを付記し、id:stringには、2のカウントを付記することができる。各採集マシンは、自身が計算したスキーマ及び統計をメタデータサービスに記憶する。
Statistics are maintained in addition to schema calculations. It is useful for query processing and map identification. The statistics include metrics such as the number of times each attribute appears and the average byte size of the attribute. For example, the following record
{id: 3546732984}
{id: "3478234234"}
{id: 73242342343}
{id: 45852743332}
{id: "2342234343"}
Creates a schema {id: int, id: string}, where id: int may have a count of 3, and id: string may have a count of 2. Each collection machine stores its own calculated schema and statistics in the metadata service.
チャンクの全てが採集されると、全体スキーマが計算される。全体スキーマは、クエリエンジンによって使用され、ユーザに提示される。これは、メタデータサービスから部分的スキーマを読み取り、その部分的スキーマを上記方法を使用してマージし、その結果をメタデータサービスに戻して記憶するという、単一プロセスを用いて達成することができる。スキーマの数は、採集マシンの数に限られるので、このプロセスは、パフォーマンスクリティカルではない。 Once all of the chunks have been collected, the entire schema is calculated. The entire schema is used by the query engine and presented to the user. This can be accomplished using a single process that reads partial schemas from the metadata service, merges the partial schemas using the method above, and stores the results back to the metadata service. it can. This process is not performance critical as the number of schemas is limited to the number of collection machines.
マップ決定はオプションである。前述のように、どの属性をMI内にマップとして記憶すべきかを決定するために、メタデータサービスに記憶された統計と共にヒューリスティックスを使用することができる。これはクエリ処理に必要ではないが、一部のクエリの表現をより自然にし、効率を改善することを、思い起されたい。マップが識別されると、各ストレージサーバは、どの属性がマップであるべきかを識別するメッセージを受信する。ストレージサーバは、これらのカラムをスキャンし、MIに挿入する。 Map determination is optional. As mentioned above, heuristics can be used with the statistics stored in the metadata service to determine which attributes to store as maps in the MI. While this is not necessary for query processing, remember that it makes some queries more natural and improves efficiency. Once the map is identified, each storage server receives a message identifying which attribute should be the map. The storage server scans these columns and inserts them into the MI.
増分更新
自身のデータの大半を前もってロードする一部のユーザもいるが、大抵のユーザは、時間をかけて新しいデータを周期的に、多くの場合、定期的(例えば、毎時または毎日)プロセスの一部として、ロードする。このデータの採集は、初期採集に概ね類似する。新しいデータは、チャンクに分割され、スキーマはチャンク毎に計算され、ローカルスキーマは、メタデータサービス内に維持されたグローバルスキーマとマージされる。
Incremental Update Although some users may preload the majority of their data, most users will periodically take time to periodically update new data, often on a regular (eg, hourly or daily) basis. Load as part. Collection of this data is generally similar to initial collection. New data is divided into chunks, schemas are calculated for each chunk, and local schemas are merged with the global schema maintained in the metadata service.
新しいデータが追加されると、システムは自動的にそのデータを検出する。方法はソースデータプラットフォームに応じて決まる。例えば、S3ファイルの場合、最も簡単なケースは、S3バケットの変化を検出することである。特殊なプロセスは、新しいキーと値のペア(すなわち、新しいファイル)を探してバケットを定期的にスキャンし、見付けたものをメタデータサービスに追加する。一定数の新しいファイルが見付けられた後、または、一定期間が経過した後、プロセスは、データをロードするための新しい採集プロセスを起動する。 When new data is added, the system automatically detects that data. The method depends on the source data platform. For example, in the case of the S3 file, the simplest case is to detect changes in the S3 bucket. A special process is to periodically scan the bucket for new key / value pairs (i.e., new files), and add those found to the metadata service. After a certain number of new files have been found, or after a certain period of time has elapsed, the process starts a new collection process for loading data.
MongoDBで行われる操作は、オペレーションログ(またはoplog)と呼ばれる特殊コレクションに記憶することができる。oplogは、そのレコードは複製のために内部でMongoDBによって使用される、書き込み操作の一貫したレコードを提供する。oplogを読み取り、使用して、新しいレコードを記憶するS3内にフラットファイルのセットを作成する。次に、上記方法を用いて、新しいデータを採集することができる。 Operations performed by MongoDB can be stored in special collections called operation logs (or oplogs). oplog provides a consistent record of write operations whose records are used internally by MongoDB for replication. Read and use oplog to create a set of flat files in S3 to store new records. The above method can then be used to collect new data.
増分採集プロセスは、新しいデータ(例えば、新しいJSONドキュメント)と、既存のドキュメントへの更新(例えば、既存のJSONドキュメントにおける新しい属性または既存の属性についての新しい値)の両方を取り扱うことができる。各データソースプラットフォームの能力は、ソースファイルにおける更新の公開という点で異なる。この情報の種類を“delta”と呼び、フラットファイルまたはログファイル(例えば、MongoDB)の形を取り得る。増分採集プロセスは、“delta”ファイルからの情報を処理し、それを既存のスキーマ情報と組み合わせて、新しいデータを生成し、そのデータは、ストレージサービスに送信される。 The incremental harvesting process can handle both new data (eg, new JSON documents) and updates to existing documents (eg, new attributes in existing JSON documents or new values for existing attributes). The capabilities of each data source platform differ in that they publish updates in source files. This type of information is called "delta" and may take the form of a flat file or a log file (eg MongoDB). The incremental harvest process processes the information from the "delta" file and combines it with existing schema information to generate new data, which is sent to the storage service.
データのサブセット化
データ採集と増分更新を行うための、ここに記載のシステムは、ソースから全データを採集することができる一方、採集したいデータのJSONスキーマ(または関係スキーマ)を前もって指定することによって、比較的簡単にサブセットだけを採集することができる。これは、JSONスキーマ自体の提供、あるいは、サブセットを指定するクエリの提供によって行われる。このように、分析プラットフォームは、ソースデータを具体化したビューとして考えることができる。
Data Subsetting While the system described here for collecting data and incremental updates can collect all the data from the source, by pre-specifying the JSON schema (or relationship schema) of the data you want to collect It is relatively easy to collect only a subset. This is done by providing the JSON schema itself or providing a query specifying a subset. Thus, the analysis platform can be considered as a materialized view of the source data.
また、ユーザが採集されたくないデータを指定することも可能である。採集されるべきでないデータの一部を記述するJSONスキーマまたは関係スキーマを提供することができる。そうすると、単に、全てのその後のローの、採集されるべきでない要素を単純にスキップするように採集処理に告げる情報の、メタデータサービスへの記録の問題に過ぎない。これをデータ採集後に行う場合、既に採集されたデータは、単純に入手不能になり、バックグラウンドタスクによってガベージコレクションにかけることができる。このガベージコレクションは、インデックスストア(例えば、LevelDB)の圧縮プロセスに組み込まれることになる。 It is also possible to specify data that the user does not want to collect. A JSON schema or relationship schema can be provided that describes some of the data that should not be collected. Then it's just a matter of recording to the metadata service of the information that tells the collection process to simply skip all subsequent rows that should not be collected. If this is done after data collection, the data that has already been collected is simply not available and can be garbage collected by the background task. This garbage collection will be incorporated into the compression process of the index store (eg, LevelDB).
耐障害性
初期採集中にロードプロセスを再起動することが可能である一方、増分採集プロセスは、ユーザが全データをゼロからリロードする必要がないように、システムの既存データを破損してはいけない。ファイル採集は冪等演算ではないので、id生成に起因して、基礎的ストレージシステムのスナップショットを撮ることに基づいて簡単な耐障害性スキームを実装することができる。
Fault Tolerance While it is possible to restart the loading process during initial harvesting, the incremental harvesting process should not corrupt existing data in the system so that the user does not have to reload all data from scratch. . Since file collection is not a plagiarism operation, a simple fault tolerance scheme can be implemented based on taking a snapshot of the underlying storage system due to id generation.
基礎的ストレージシステムが、LevelDBが行うように、ある時点で一貫性のあるスナップショットを撮ることをサポートする場合、スナップショットを撮ることは、簡単であろう。このプリミティブを用いると、増分ロードのステップは、以下のようになる。単一プロセスは、各ストレージサーバに、ローカルにスナップショットを撮るように指示し、ロード期間中、全クエリをこのスナップショットに導く。各チャンクは、前述のようににロードされる。完了すると、チャンクのロードを担当する採集サーバは、メタデータサービスにおいて終了したものとしてマークを付ける。 If the underlying storage system supports taking consistent snapshots at some point in time, as LevelDB does, taking snapshots may be easy. Using this primitive, the steps for incremental loading are as follows: A single process instructs each storage server to take a snapshot locally, leading all queries to this snapshot during the load period. Each chunk is loaded as described above. Once complete, the collection server responsible for loading the chunks marks it as terminated in the metadata service.
プロセスは、メタデータサービスを監視する。全チャンクがロードされている場合、プロセスは、状態の更新済みバージョンにクエリをアトミックにリダイレクトする。そして、第1のステップで撮られたスナップショットは捨ててよい。失敗した場合、スナップショットは、状態の正準バージョンになり、状態の部分的に更新された(及び破損の可能性のある)元のバージョンは捨てられる。そして、採集処理が再開される。さらに、サーバが故障の場合には、ストレージシステムディスク量のスナップショットを、回復のために使用することができる。 The process monitors metadata services. If all chunks are loaded, the process redirects the query atomically to the updated version of the state. Then, the snapshot taken in the first step may be discarded. If it fails, the snapshot becomes the canonical version of the state, and the partially updated (and possibly corrupted) original version of the state is discarded. Then, the collection process is resumed. In addition, in the event of a server failure, snapshots of storage system disk space can be used for recovery.
クエリ実行
クエリ例
実行例を示すために、簡単なクエリ
select count(*) from table as t where t.a > 10;
を考える。
最初に、プロキシは、クエリを受信し、計画立案のためにそれをエクゼキュータノードに発行する。次に、エクゼキュータノードは、どのコレクション及びストレージノードが使用可能であるかを決定するためにメタデータサービスを呼び出すクエリ計画を生成する。エクゼキュータノードは、典型的には、その計画を他のエクゼキュータノードに分散させるが、ここでは、単一のエクゼキュータノードだけを必要とする。
Query execution query example A simple query to show an execution example
select count (*) from table as t where ta>10;
think of.
First, the proxy receives the query and issues it to the executor node for planning. The executor node then generates a query plan that invokes the metadata service to determine which collection and storage nodes are available. The executor node typically distributes its plans to other executor nodes, but here only needs a single executor node.
そして、実行ノードは、RPC呼び出しをストレージサービスノードに行い、t.a>10述語及びカウント関数をプッシュダウンする。次に、ストレージノードは、サブカウントを計算し、それらをエクゼキュータノードに返す。そして、エクゼキュータノードは、プロキシが次の結果値をフェッチするときに結果をプロキシに返す。 Then, the execution node makes an RPC call to the storage service node, and t. a> Push down the 10 predicates and the counting function. The storage node then calculates subcounts and returns them to the executor node. The executor node then returns the result to the proxy when it fetches the next result value.
動的型付け
データベースシステム(例えば、PostgreSQL)のストレージエンジンは、強く型付けされる。それは、カラム(または属性)の値の全てが、全く同じ型(例えば、整数、文字列、タイムスタンプ等)を有する必要があることを意味する。ビッグデータ分析の文脈において、これは、かなりの制約である。なぜなら、かなり多くのアプリケーションが個々の情報(属性)の表現を変える必要があり、その結果として、アプリケーションがその情報の記憶に使用するデータ型の変更が必要となるからである。例えば、アプリケーションは、最初に、整数を使用して、ある属性の値を記憶し、その後、浮動小数の使用に切り替える場合がある。データベースシステムは、そのような操作をサポートするように設計されていない。
The storage engine of a dynamically typed database system (eg, PostgreSQL) is strongly typed. That means that all of the column (or attribute) values need to have exactly the same type (eg integer, string, timestamp etc). In the context of big data analysis, this is a significant limitation. This is because a large number of applications need to change the representation of individual information (attributes), and as a result, it is necessary to change the data type that the application uses to store that information. For example, an application may first store the value of an attribute using an integer and then switch to using floating point. Database systems are not designed to support such operations.
この問題に対処する1つの方法は、各属性について複数の関係カラムを使用すること、すなわち、各異なるデータ型について1つの関係カラムを使用することである。例えば、値31432及び“31433”(すなわち、整数及び文字列)を有する属性“user.id”を見た場合、別個のカラムとして“user.id<int>”及び“user.id<string>”を記憶することができる。単一のレコードは、これらのカラムのうち、そのレコードの“user.id“の型に対応する1つのカラムにのみ値を有することになる。そのレコードに関する他のカラムの値はNULLとなる。 One way to address this problem is to use multiple relationship columns for each attribute, ie, one relationship column for each different data type. For example, if you look at the attribute "user.id" with values 31432 and "31433" (ie integers and strings), separate columns "user.id <int>" and "user.id <string>" Can be stored. A single record will have a value in only one of these columns that corresponds to the "user.id" type of that record. The other column values for that record will be NULL.
同じ属性について複数のカラムを提示することは、ユーザが使用するには複雑すぎることが多い。ユーザ体験を簡単にするために、分析プラットフォームは、ユーザが用いようとする型を、クエリ時に動的に推論することができる。この目的のために、ストレージサービスは、複数の型を追跡している。例えば、ストレージサービスは、NUMBERと呼ばれる数字に関する包括的データ型を使用する。NUMBERは、整数と浮動小数の両方をカバーする。NUMBER型を使用する場合、更に具体的なデータ型が、値の一部として記憶される。例えば、属性“Customer.metric”の整数値10は、キーと値のペアとしてBI内に記憶される。ここで、(Customer.metric,<NUMBER>,tid)がキーであり、(10,INTEGER)が値である。同じ属性の浮動小数点値10.5は、キー:(Customer.metric,<NUMBER>,TID)、値:(10.5,FLOAT)として記憶されることになる。
Presenting multiple columns for the same attribute is often too complex for the user to use. To simplify the user experience, the analysis platform can dynamically infer at query time what type the user is going to use. For this purpose, storage services are tracking multiple types. For example, storage services use a generic data type for numbers called NUMBER. NUMBER covers both integers and floats. When using the NUMBER type, more specific data types are stored as part of the value. For example, the
最終的に、クエリ時に、分析プラットフォームは、クエリの特性(述語、型変換操作等)に従ってデータ型間の動的型変換を、これらの操作が情報損失をもたらさない限り、実行できる。“number”はANSI SQL型ではないが、柔軟な型付けシステムによって、クライアントは、クエリコンテキストから“number”を、標準ANSI SQL浮動小数、整数、または、数値型として扱うことができる。例えば、クエリ
select user.lang from tweets where user.id = '31432'
を考える。
“user.id<int>”及び“user.id<string>”の両方を有する場合、システムは、オプションとして、クエリ時に、整数(例えば、31432)を単一文字列表現(例えば、“31432”)に変換して、ユーザが、ANSI SQL型VARCHARで単一カラム“user.id”を処理することを可能にする。
Finally, at query time, the analysis platform can perform dynamic type conversion between data types according to the characteristics of the query (predicates, type conversion operations, etc.), as long as these operations do not result in information loss. Although "number" is not an ANSI SQL type, the flexible typing system allows the client to treat "number" from the query context as standard ANSI SQL floating point, integer, or numeric types. For example, query
select user.lang from tweets where user.id = '31432'
think of.
If you have both “user.id <int>” and “user.id <string>”, the system optionally optionally displays an integer (eg, 31432) as a single string representation (eg, “31432”) at query time. To allow the user to process single column "user.id" with ANSI SQL type VARCHAR.
米国規格協会(ANSI:American National Standards Institute)/国際標準化機構(ISO:International Organization for Standardization)SQL:2003に例として言及するが、他の実装では、他の規格、SQLまたはそれ以外のものに準拠してよい。ほんの一例として、公開したインターフェースは、ANSI/ISO SQL:2011に準拠する。 The American National Standards Institute (ANSI) / International Organization for Standardization (ISO) SQL: 2003 is mentioned as an example, but in other implementations it conforms to other standards, SQL or something else You may As just one example, the published interface conforms to ANSI / ISO SQL: 2011.
図面
図1Aは、分析プラットフォームのクラウドベースの実装例を示す。分析フレームワークを使用する組織のローカルエリアネットワーク(LAN)またはワイドエリアネットワーク(WAN)100が、インターネット104に接続する。この実装における計算ニーズ及びストレージニーズは、いずれも、クラウドベースのサービスによって提供される。図に示す特定の実装では、計算サーバは、ストレージサーバとは別個である。詳細には、計算クラウド108は、分析フレームワークに処理能力を与える複数のサーバ112を含む。サーバ112は、個別のハードウェアインスタンスであってもよいし、あるいは、仮想サーバであってもよい。
Drawings FIG. 1A shows a cloud-based implementation of the analysis platform. An organization's local area network (LAN) or wide area network (WAN) 100 using the analytics framework connects to the
サーバ112は、処理機能が動作する、それ自体のストレージも有してよい。例えば、サーバ112は、クエリエクゼキュータとストレージサービスの両方を実装してよい。従来のカラム型ストレージシステムは、ディスク上にカラムとしてデータを記憶し、そのデータはメモリに読み込まれるとき、そのカラム型データからローが再構築される。しかしながら、本開示のインデックスは、ディスク上とメモリ内の両方でカラム型ストレージとして機能する。インデックスが固有に構成されているので、高速カラム型アクセスという利点を、比較的小さな犠牲で達成することができる。
The
本開示によれば、データはインデックスに格納され、具体化されたテーブルには格納されないので、ストレージクラウド116は、インデックスデータに使用するストレージ配列120を含む。サーバ112のストレージリソースが使用されるとき、ストレージ配列120は、各クエリに応答するためではなく、バックアップ及びニアラインストレージのために使用されてよい。
According to the present disclosure, the
様々な実装において、ストレージ配列124は、分析フレームワークが処理するデータを含んでよい。ほんの一例として、ストレージ配列124は、ログデータなどの関連データを保持してよく、ユーザは、分析フレームワークを使用してそのデータにクエリすることを望んでよい。
ストレージ配列120及びストレージ配列124は、同じストレージクラウド116内に示されているが、外部にホストされたプライベートクラウド、パブリッククラウド、及び、組織に固有の内部にホストされた仮想環境を含む、別々のクラウド内に配置されてよい。
In various implementations,
ほんの一例として、ストレージクラウド116は、Amazonウェブサービス(AWS)S3クラウドであってよい。Amazonウェブサービス(AWS)S3クラウドは、企業がストレージ配列124にデータを記憶するために既に使用している。結果的に、データをストレージ配列120に移すことは、高スループット及び低費用で実現され得る。計算クラウド108は、AWS EC2によって提供されてよく、その場合、計算クラウド108及びストレージクラウド116は、共通のプロバイダによってホストされる。ユーザ130は、標準SQLツールを使用してクエリを構築し、そのクエリは計算クラウド108で実行され、応答はユーザ130に返される。SQLツールは、ユーザ130のコンピュータ134に既にインストールされたツールであってよく、本分析フレームワークと共に動作するために修正する必要は無い。
By way of example only,
図1Bでは、別のデプロイメントアプローチ例が示される。この場合、物理サーバ機器180は企業のLAN/WAN100に接続される。サーバ機器180は、オンサイトでホストされてもオフサイトでホストされてもよく、仮想プライベートネットワーク等を用いて、LAN/WAN100に接続されてよい。サーバ機器180は、計算機能及びストレージを含み、ソースから入力データを受信する。ソースは、LAN/WAN100に対してローカルであってよい。ほんの一例として、コンピュータもしくはサーバ184は、ウェブトラフィックログまたは侵入検出ログなどのログを記憶してよい。
In FIG. 1B, another example deployment approach is shown. In this case, the
サーバ機器180は、ユーザ130のクエリに応答するためにインデックスデータを取り出し、記憶する。ストレージクラウド116は、追加データソース188を含んでよく、追加データソース188は、更に他のデータを保持してよく、及び/または、古いデータのためのニアラインデータストレージ設備であってよい。サーバ機器180は、ユーザクエリを満足させるために、追加データソース188から追加データを取り出してよい。サーバ機器180はまた、バックアップ目的などのために、ストレージクラウド116にデータを記憶してよい。様々な他の実装においては、追加データソース188は、クラウドにおけるHadoop実装の一部であってよい。
本開示の分析フレームワークは柔軟で、多くの他のデプロイメントシナリオが可能である。ほんの一例として、ソフトウェアが企業に提供されてよく、そのソフトウェアは、所有のサーバまたはホストされたサーバにインストールできる。別の実装では、仮想マシンインスタンスが提供されてよく、仮想マシンインスタンスは、仮想化環境を通してインスタンス化することができる。さらに、ユーザは、ブラウザにおいてユーザインタフェースを提供されてよく、SQL部分は、Nou Data等のサービスプロバイダによってホストされてよく、それらのシステム上またはクラウドで実装されてよい。 The analysis framework of the present disclosure is flexible and allows many other deployment scenarios. By way of example only, software may be provided to the enterprise, which can be installed on its own server or hosted server. In another implementation, virtual machine instances may be provided, and virtual machine instances may be instantiated through a virtualized environment. Furthermore, the user may be provided with a user interface in the browser, and the SQL part may be hosted by a service provider such as Nou Data and implemented on their system or in the cloud.
データウェアハウス
図1Cは、本開示の原理によるデプロイメントアプローチ例を示す。採集したデータは、インデックスストレージ120内に加えて、または、その代わりに、データウェアハウス192に記憶することができる。様々な実装において、データウェアハウス192は、カスタマーサイトに配置してもよく、あるいは、図1Cに示すように、クラウド196に配置してもよい。
Data Warehousing FIG. 1C illustrates an example deployment approach according to the principles of the present disclosure. The collected data may be stored in
データウェアハウス192を用いることによって様々な利点がある。ほんの一例として、データウェアハウス192は、一般的に、成熟したフル機能を備えたクエリ処理層及びODBCインタフェースを有する。さらに、データウェアハウス192は、本開示によるシステムが採集する以外の他のデータのためのセントラルレポジトリであってよい。さらに、データウェアハウス192は、データのスナップショット及びリビジョン制御を実装してよく、また、確立されたバックアップ戦略の一部であってよい。
There are various advantages to using
様々な実装において、データウェアハウス192は、PostgreSQL、MySQL、Microsoft SQL サーバ、Oracleなどを含む、SQLコマンドのサブセットまたはフルセットをサポートする関係データベース等、単に関係データベースであってよい。採集したデータのスキーマは経時的に変わり得るので、カラム型ストレージを用いたデータウェアハウス192の実装によって、追加のカラム(新しい属性または既存の属性の新たな型など)が効率的に追加できるようになる。
In various implementations, the
ロー指向の従来のデータベースシステムにおいては、カラムの追加は、時間的、及び/または、空間的に非効率な場合がある。データウェアハウス192の様々な実装は、Vertica、Greenplum、Aster/Teradata、及び、Amazon(RedShift)の製品を含む、カラム型の特徴を有してよい。Vertica及びAmazon RedShift等のデータウェアハウス192の実装の一部は、並列ロードをサポートするので、適切にフォーマットされたデータを幾つかのソースから同時に採集できる。複数の中間ファイルにデータをパッケージ化することによって、データのデータウェアハウス192へのロードに必要な時間を大幅に減らし得る。
In a row oriented conventional database system, the addition of columns may be temporally and / or spatially inefficient. Various implementations of
データウェアハウス192をクラウド196で実装することによって、データウェアハウス192用のハードウェア及びソフトウェアの購入に関連する初期費用を減らせる等、様々な利益が得られる。さらに、データウェアハウス192を提供するクラウド196は、インターネット104の公共部分を介して入手可能なより大きいスループットで、インデックスストレージ120またはデータソース124からデータを採取することが可能になり得る。データウェアハウス192がAmazon RedShiftであり、インデックスストレージ120がAmazon S3に記憶される場合などの、様々な実装において、データは、インデックスストレージ120とデータウェアハウス192間を、Amazonのネットワークを離れることなく転送されてよい。これによって、待ち時間を減らすことができ、スループットを向上させることができる。
Implementing
図1Dは、サーバ200のハードウェア構成要素を示す。プロセッサ204は、メモリ208からの命令を実行し、メモリ208内に記憶された(読み取り及び書き込み)データを処理してよい。一般に、スピードを求めて、メモリ208は揮発性メモリである。プロセッサ204は、潜在的にチップセット212経由で、不揮発性ストレージ216と通信する。様々な実装において、不揮発性ストレージ216は、キャッシュとして機能するフラッシュメモリを含んでよい。より大容量及び低費用のストレージを二次不揮発性ストレージ220のために使用してよい。例えば、ハードドライブなどの磁気ストレージ媒体を用いて、二次不揮発性ストレージ220に基礎的データを記憶してよく、基礎的データのアクティブな部分は、不揮発性ストレージ216にキャッシュされる。
FIG. 1D shows the hardware components of
入出力機能224は、キーボードやマウスなどの入力と、グラフィックディスプレイや音声出力などの出力とを含んでよい。サーバ200は、ネットワーキングカード228を使用して他のコンピュータデバイスと通信する。様々な実装において、または、様々な時間に、入出力機能224が休止し、サーバ200と外部アクターとの間の全ての対話がネットワーキングカード228経由で行われてもよい。図を簡単にするために、一例として、不揮発性ストレージ216とメモリ208との間またはネットワーキングカード228とメモリ208との間のダイレクトメモリアクセス(DMA)機能などの、追加のよく知られた特徴及び変形形態は、示していない。
The input /
データフロー
図2Aにおいて、プロセス図は、ユーザ130がデータにクエリできるように当該データがどのように分析フレームワークに採集されるかの一実施例を示している。データソース300は、分析フレームワークが処理するデータを提供する。生データが自己記述的でない場合、オプションであるユーザ定義のラッパー関数304によって、その生データをJSONオブジェクト等の自己記述的な半構造データに変換してよい。
Data Flow In FIG. 2A, a process diagram illustrates an example of how data may be collected into an analysis framework so that
アドミニストレータ308は、異なる容量で動作しているユーザ130であってもよく、ラッパー関数を実装するガイドラインを指定することができる。アドミニストレータ308は、また、データソース300のうちのどのデータソースを使用するかと、そのデータソースからどのデータを取り出すかと、を指定することができる。様々な実装において、データの取り出しは、サブセット化操作及び/または他の計算を含み得る。ほんの一例として、データソース300の1つがHadoopである場合、分析フレームワークのためのデータ取り出しに先立って、MapReduceジョブが要求されてよい。
An
取り出したデータは、スキーマ推論モジュール312によって処理される。スキーマ推論モジュール312は、受信したデータの観察された構造に基づいてスキーマを動的に構築する。アドミニストレータ308は、様々な実装において、スキーマ推論モジュール312に型付けのヒントを提供する能力を有してよい。例えば、型付けのヒントは、日付、時間、または、他のアドミニストレータが定義した型など、個々のフォーマットを認識するための要求を含んでよく、それらは、例えば、正規表現によって指定されてよい。
The extracted data is processed by the
データオブジェクトと、スキーマ推論モジュール312が生成したスキーマとは、装飾モジュール316及びインデックス作成モジュール320に供給される。入力オブジェクトは、ソースデータと、そのソースデータを記述するメタデータと、を含む。ソースデータは、インデックス作成モジュール320によって、インデックスストレージ324に記憶される。
The data object and the schema generated by the
装飾モジュール316は、スキーマモジュール312が生成したスキーマ内のマップを識別する。マップの識別を求めない実装においては、装飾モジュール316は、省略されてよい。アドミニストレータ308は、マップ識別に用いられる装飾モジュール316が行うヒューリスティックスを調整するマップ基準を指定することができてよい。
マップが識別された後、関係スキーマ作成モジュール328は、SQL対応スキーマ等の関係スキーマを生成する。さらに、識別されたマップは、補助インデックス作成モジュール332に供給される。補助インデックス作成モジュール332は、MapIndex等の追加のインデックス、及び、上記のように、ValueIndex内にマップエントリを作成することができる。補助インデックスも、インデックスストレージ324に記憶されてよい。
After the map is identified, relationship
アドミニストレータ308は、マップインデックスの作成を要求する能力を有してよく、値インデックスにどのカラムを追加すべきかを指定してよい。さらに、アドミニストレータは、どのオブジェクトをマップとして扱うべきかを指定することができてよく、あるオブジェクトをマップとして扱うか否かを動的に変更することができる。このような変更によって、関係スキーマも変更されることになる。
The
関係最適化モジュール336は、関係スキーマを最適化して、より簡潔なスキーマをユーザ130に提示する。例えば、関係最適化モジュール336は、上記のように、テーブルとテーブルの間の1対1の関係を識別し、それらのテーブルを平坦化して単一のテーブルにしてよい。結果として生じる関係スキーマは、メタデータサービス340に供給される。
The
クエリエグゼキュータ344は、メタデータサービス340とインタフェースして、プロキシ348からのクエリを実行する。プロキシ348は、ODBCクライアント352等のSQL対応のクライアントと対話する。SQL対応のクライアントは、特別な構成なしにプロキシ348と対話することができる。ユーザ130は、ODBCクライアント352を用いて、クエリエグゼキュータ344にクエリを送り、そのクエリに対する応答を受信する。
ODBCクライアント352を介して、ユーザ130は、メタデータサービス340に記憶された関係スキーマを見ることもでき、関係スキーマに対するクエリを構築することができる。ユーザ130もアドミニストレータ308も予測スキーマを知る必要はなく、スキーマ作成を支援する必要もない。代わりに、スキーマは、取り出されたデータに基づいて動的に作成され、提示される。ODBCクライアント352を図に示したが、JDBC及び直接的なpostgresクエリを含む、ODBC以外の機構も利用可能である。様々な実装において、グラフィカルユーザインタフェースアプリケーションによって、ユーザがODBCクライアント352を使用するのを容易にし得る。
Through the
クエリエグゼキュータ344は、インデックスストレージ324を含むストレージサービス356からのデータを処理する。ストレージサービス356は、それ自体のローカルストレージ処理モジュール360を含んでよく、クエリエグゼキュータ344は、ローカルストレージ処理モジュール360に様々な処理タスクを任せることができる。処理されたデータは、次に、ストレージ処理モジュール360によって、クエリエグゼキュータ344に供給され、受信したクエリに対する応答を構築する。クラウドベースの実装においては、ストレージサービス356及びクエリエグゼキュータ344は両方とも、計算クラウドで実装してよく、インデックスストレージ324は、計算インスタンスに記憶することができる。インデックスストレージ324は、図1Aに示したストレージクラウド116内などの、ニアラインストレージにミラーされてよい。
図2Bにおいて、データロードモジュール370は、データウェアハウス192が理解するフォーマットで、データファイルを生成する。例えば、データウェアハウス192は、大量のデータをロードするためのSQL Copy Fromコマンドをサポートしてよい。このコマンドによって処理されるデータファイルは、所定の型を有してよく、その型は、CSV(comma−separated variable)の変形であってよい。関係スキーマの各関係について、データウェアハウス192にロードするための中間ファイルが作成される。データウェアハウス192が並列ロードをサポートする場合、大きいファイルの一部または全てを、並列ロード用に複数のファイルに分割してよい。これらの中間ファイルのためのデータは、インデックスストレージ124から取り出してもよく、及び/または、データソース300を通る第2のパスから取り出してもよい。ユーザインタフェース374は、データウェアハウス192へのアクセスをユーザ130に提供する。ほんの一例として、ユーザインタフェース374は、データウェアハウス192の一部として備えられてよい。他の実装においては、ユーザインタフェース374は、コマンドをデータウェアハウス192に渡してよく、及び/または、データウェアハウス192が実行するSQLコマンドを作成してよい。
In FIG. 2B, the
図2Cにおいて、ユーザインタフェース376は、プロキシ348を介してクエリエグゼキュータ344と通信する。クエリエグゼキュータ344は、一部のクエリをデータウェアハウス192に渡してよい。様々なクエリについて、クエリエグゼキュータ344は、ストレージ処理モジュール360とメタデータサービス340からのデータに基づいて、クエリの一部を行ってよく、クエリの他の部分をデータウェアハウス192に渡してよい。クエリエグゼキュータ344は、結果を組み合わせ、組み合わせた出力をプロキシ348に渡してよい。様々な実装において、ユーザインタフェース376は一部の関係またはデータがデータウェアハウス192またはインデックスストレージ324に記憶されているか否かを、ユーザ130に対して透明にしてよい。この特徴は、何らかのデータを既にデータウェアハウス192に記憶しており、かつ、インデックスストレージ324に新しいデータをロード中またはその逆を行っている、カスタマーに関係してよい。
In FIG. 2C,
図2Dは、ユーザインタフェース376の実装例の高レベル機能ブロック図である。スキーマ表現モジュール378は、スキーマ監視モジュール380からスキーマデータを受信する。スキーマ監視モジュール380は、メタデータサービス340から関係スキーマに関する情報を受信する。表示モジュール382は、1つまたは様々なフォーマットで、ユーザ130にスキーマを表示する。例えば、ネストされた属性の階層は、リスト形式においてインデントのレベルで示してよい。あるいは、視覚的なツリーフォーマットを用いてよい。
FIG. 2D is a high level functional block diagram of an example implementation of
メタデータサービス340がスキーマ監視モジュール380にスキーマの変更を知らせると、スキーマ表現モジュール378は、新しい属性、新たなサブ属性等を挿入することによって、スキーマを更新してよい。例えば、新たな中間ノード及び新たなリーフノードを含む、新たなノードをツリーに追加してよい。スキーマが変わるにつれて、リーフノードは中間ノードに変換されてよく、属性の型の変化は、色、ラベル、または、二次的な印で視覚的に表されてよい。ほんの一例として、二次的な印は、(例えば、マウスまたはトラックパッドを用いて)属性の上にカーソルをホバリングした時に現れてよい。
When the
スキーマに変更が加えられるとき、表示モジュール382は、表示領域の中心に現在表示されているスキーマに焦点を当て続けようとしてよい。ほんの一例として、多くの新しい属性が、リストされたスキーマの最初に追加される場合、前からリストされている属性は、画面上で下に移動し得る、または、画面上から見えなくなる場合がある。この視覚的に破壊的な変更に対処するために、表示モジュール382は、適切に一定の中央位置を維持するように属性のリストをスクロールしてよい。スキーマに追加された要素は、輪郭で囲む、シャドーイング、色、フォント(大文字、イタリック体、サイズ)などで、視覚的に表してよい。
As changes are made to the schema, the
ほんの一例として、色のグラデーションで、スキーマ要素が、どのくらい最近、変化したのかを示してよい。ほんの一例として、非常に鮮やかな青は、最近変更されたスキーマ要素を示してよく、青が薄くなって最終的には白になることは、長い間、存在したスキーマ要素であることを示す。 As just one example, a color gradient may indicate how recently the schema element has changed. By way of example only, very vivid blue may indicate a recently modified schema element, and that thinning of the blue and eventually becoming white indicates that it is a schema element that has existed for a long time.
様々な実装において、表示モジュール382は、表示モジュール382の要素にユーザがフォーカスしている時を決定するために、マウスの動き、キーボードの使用、オペレーティングシステムのどのウィンドウにフォーカスしているか、及び、節電のために表示をブランクにしているか否かを追跡してよい。例えば、ユーザが、この一時間、表示モジュール382と対話しなかったと、表示モジュール382が決定する場合、表示モジュール382は、この一時間に追加された全てのスキーマ要素を鮮やかな青のままにしてよい。ユーザが、もう一度、表示モジュール382と対話を開始した時点で、鮮やかな青は、薄くなり始めてよい。このように、積極的に表示モジュール382を監視していたか否かに関わらず、ユーザが最後に表示モジュール382と対話した後のメタデータへの変化に注意を向けさせるようになっている。
In various implementations, the
ユーザインタフェース376は、1つまたは複数のクエリの結果を表示する結果表現モジュール384も含む。結果は、テーブル、チャート、及び、グラフを含む、テキスト形式及びグラフィック形式の組み合わせで表示されてよい。視覚的表現の種類は、アクセスラベル、線形または対数スケーリング、及び、チャートタイプを選択することができ、ユーザによって選択されてよい。クエリエグゼキュータ344は、クエリ完了前に、結果の提供を始めてよい。
The
結果監視モジュール386は、結果がさらに入手可能な時、クエリエグゼキュータ344によって通知される。そうすると、結果表現モジュール384は、結果のビューを更新し、表示モジュール382に提示する。様々な他の実装において、結果監視モジュール386は、追加の結果が入手可能な時を決定するためにクエリエグゼキュータ344にポーリングしてよい。クエリエグゼキュータ344は、タイムスケジュールで、または、処理されたレコードの数などの別のメトリクスに基づいて、これらの増分結果を提供してよい。結果監視モジュール386が追加の結果を検出すると、結果表現モジュール384は、その追加データを収容するために軸のスケーリングの調整が必要な場合があり、バーチャートやパイチャートに追加のバーやスライス(項目)を追加してよく、及び、チャートの要素に割り当てられた値を調整してよい。
The
単純化した実施例として、データセットの各学年レベルに関する平均GPAを要求するクエリを考える。クエリエグゼキュータ344がデータを処理すると、最初の結果は、初期のレコードの平均GPAを表示する。追加のレコードが構文解析されると、GPAは更新されてよい。さらに、クエリでまだ観察されていない学年レベルが、結果表現モジュール384によって結果に追加されることになる。
As a simplified example, consider a query that requires an average GPA for each grade level in the data set. When the
様々なアプリケーションにおいて、また、様々なデータセットについて、かなりの数のレコードがまた構文解析されていない間に、平均等の様々なメトリクスが収束し始めてよい。これによって、データ傾向の高速な視覚化が可能になり、また、クエリの完了を待たずに、ユーザによるクエリの調整もしくはクエリの再編成が可能になり得る。これは、分単位または時間単位など、実行に時間がかかるクエリについて、特に価値があると思われる。一部のクエリに関しては、最初の結果を見て、ユーザに関連する結果を返すためにクエリの再形成が必要であることを、ユーザに示してよい。 In various applications, and also for various data sets, various metrics such as average may begin to converge while a significant number of records are not being parsed again. This allows for fast visualization of data trends, and may allow the user to adjust the query or reorganize the query without waiting for the query to complete. This may be particularly valuable for queries that take a long time to execute, such as minutes or hours. For some queries, the first result may be viewed to indicate to the user that the query needs to be reformed to return relevant results to the user.
単純化した実施例に戻ると、SQLクエリは、“SELECTstudent_id,avg(gpa)FROM students GROUP BY class ORDER BY 2 DESCENDING;”の形をとってよい。 Returning to the simplified example, the SQL query may take the form "SELECTstudent_id, avg (gpa) FROM students GROUP BY class ORDER BY 2 DESCENDING;".
クエリ管理モジュール388は、表示モジュール382でユーザが入力したクエリをクエリエグゼキュータ344に供給する。クエリ管理モジュール388は、以前実行したクエリを記憶し、それらのクエリの再実行を可能にしてよい。さらに、クエリ管理モジュール388は、ユーザによる複合クエリの構築、及び/または、前のクエリの結果の組み合わせを支援してよい。
The
図2Eにおいては、高レベル機能図が、複数ノード402‐1、402‐2、及び、402‐3(集合的に、ノード402)を有するストレージサービス356を示す。3つのノード402を示すが、使用するノードの数は3つより多くても少なくてもよく、分析フレームワークのニーズに基づいて動的に変更されてよい。ノード402の数は、記憶する必要のあるデータが多くなるにつれて、また、クエリ実行、及び/または、冗長性提供のために追加処理が要求されるのに応答して、増やされてよい。クエリエクゼキュータ344を、ノード406‐1、406‐2、及び、406‐3(集合的に、ノード406)と共に示す。ノード406の数も、クエリ負荷に基づいて動的に変更することができ、ノード402の数と無関係である。
In FIG. 2E, a high level functional diagram shows a
図2Fにおいて、ストレージサービス356は、データウェアハウス192にロードするデータを供給してよい。メタデータサービス340は、関係スキーマをデータウェアハウス192に供給してよく、データウェアハウス192は、その関係スキーマからテーブルを定義できる。データウェアハウス192は、単なるストレージを超えて、複数の機能構成要素を備えてよい。備える機能構成要素には、クエリエグゼキュータ420及びODBCインターフェース424が含まれるが、それらに限定されない。ユーザインタフェース376は、データウェアハウス192と通信する。様々な実装において、ユーザインタフェース376は、図2Eのクエリエグゼキュータ344とも通信してよい。
In FIG. 2F,
プロキシ348は、ODBCクライアント352とクエリエクゼキュータ344との間のインターフェースを提供する。クエリエクゼキュータ344は、メタデータサービス340と対話する。メタデータサービス340は、ストレージサービス356内にあるデータのスキーマを記憶する。
プロセス
図3は、データ採集プロセスの例を示す。制御は504で始まり、ここで、ユーザまたはアドミニストレータなどによって、データソースを指定することができる。さらに、データソースから一定のデータセットを選択してよく、一定のサブセッティング操作及び低減操作をデータソースに要求してよい。制御は508に続き、ここで、指定されたデータソースは、新しいデータを求めて監視される。
Process FIG. 3 shows an example of the data collection process. Control begins at 504, where a data source can be specified, such as by a user or administrator. In addition, certain data sets may be selected from the data sources, and certain subsetting and reduction operations may be required of the data sources. Control continues to 508 where the designated data source is monitored for new data.
512において、新しいデータオブジェクトがデータソースに追加されている場合、制御は516に移る。追加されていない場合、制御は504に戻って、必要に応じてデータソースの修正が可能なようにする。516において、新しいオブジェクトのスキーマが推論される。推論は、図4に示すような型関数に従って行われてよい。520において、516で推論されたスキーマが、既に存在しているスキーマとマージされる。マージは、図5に示すようなマージ関数に従って行われてよい。 At 512, if a new data object has been added to the data source, control passes to 516. If not, control returns to 504 to allow modification of the data source as needed. At 516, the schema of the new object is inferred. The inference may be performed according to a type function as shown in FIG. At 520, the schema inferred at 516 is merged with the already existing schema. The merging may be performed according to a merging function as shown in FIG.
524において、装飾が求められる場合、制御は528に移り、そうではない場合、制御は532に移る。528において、マップが、図8に示されるように、データ内で識別される。536において、新たなマップが識別されない場合、制御は532に続き、新たなマップが識別された場合、制御は540に移る。540において、マップインデックスが求められる場合、制御は544に移り、そうではない場合、制御は532に続く。544において、新たなマップ属性と関連付けられたBigIndexまたはArrayIndexの各値について、その値は、マップインデックスに追加される。さらに、ユーザ及び/またはアドミニストレータが求める場合、特定の属性について、値が値インデックスに追加される。制御は次に532に続く。 At 524, if a decoration is desired, control passes to 528, otherwise control passes to 532. At 528, a map is identified in the data, as shown in FIG. At 536, if a new map is not identified, control continues to 532 and if a new map is identified, control passes to 540. If, at 540, a map index is determined, control passes to 544; otherwise, control continues to 532. At 544, for each BigIndex or ArrayIndex value associated with the new map attribute, that value is added to the map index. Additionally, values may be added to the value index for specific attributes, as required by the user and / or administrator. Control then continues to 532.
様々な実装において、524における装飾は、オブジェクトの第1のラウンドが処理されるまで待機してよい。例えば、初期採集時、装飾は、初期オブジェクトの全てが採集されるまで遅延されてよい。このようにして、マップのヒューリスティックスが使用するための十分な統計が収集される。追加オブジェクトの増分採集については、装飾は、追加オブジェクトの各新しいグループの後に実行されてよい。 In various implementations, the decoration at 524 may wait until the first round of objects is processed. For example, at initial collection, the decoration may be delayed until all of the initial objects have been collected. In this way, enough statistics are collected for the map heuristics to use. For incremental collection of additional objects, decoration may be performed after each new group of additional objects.
532において、JSONスキーマが新しいオブジェクトの結果として変更された場合、制御は548に移り、ここで、スキーマは関係スキーマに変換される。制御は552に続き、ここで、1対1関係を平坦化することなどによって、関係ビューが最適化される。制御は次に556に続く。スキーマが532で変更されていない場合、制御は直接、556に移る。556において、インデックスは、新しいオブジェクトのデータをポピュレートされる。これは図7に示すように行われてよい。制御は次に504に戻る。 At 532, if the JSON schema is changed as a result of the new object, control is transferred to 548 where the schema is converted to a relationship schema. Control continues to 552, where the relationship view is optimized, such as by flattening the one-to-one relationship. Control then continues to 556. If the schema has not been changed at 532 then control passes directly to 556. At 556, the index is populated with data for the new object. This may be done as shown in FIG. Control then returns to 504.
インデックスのポピュレーションは、548で推論されたスキーマを関係スキーマに変換した後に実行されるとして、556に示しているが、様々な実装において、関係スキーマが要求されないので、インデックスは、関係スキーマの生成前にポピュレートされてよい。手順は、推論されたJSONスキーマを用いて、経路及び結合キーを生成することができる。関係スキーマは、基礎的半構造データの関係ビューとして機能する。 The population of indexes is shown in 556 as being executed after converting the schema inferred 548 to a relational schema, but in various implementations the relational schema is not required, so the index generates a relational schema It may be populated before. The procedure can generate path and binding keys using the inferred JSON schema. A relationship schema acts as a relationship view of underlying semi-structured data.
図4は、再帰に依存する型関数の実装例を示す。制御は604で始まり、ここで、型付けするオブジェクトがスカラである場合、制御は608に移る。608において、スカラの型が決定され、そのスカラ型は、612で関数の出力として戻される。スカラ型は、受信されたオブジェクトにおける自己記述に基づいて決定されてよい。さらに、一定の文字列が日付または時間などのデータを表すことを認識し得る更なる型付け規則が、使用されてよい。 FIG. 4 shows an implementation example of a type function that relies on recursion. Control begins at 604 where control transfers to 608 if the object to be typed is a scalar. At 608, the type of the scalar is determined, and the scalar type is returned at 612 as the output of the function. Scalar types may be determined based on self-description in the received object. In addition, additional typing rules may be used that may recognize that certain strings represent data such as date or time.
604において、オブジェクトがスカラではない場合、制御は616に移る。616において、オブジェクトが配列である場合、制御は620に移り、ここで、型関数(図4)は、配列の各要素に対して再帰的に呼び出される。これらの型関数の結果が受信されると、制御は624に続き、ここで、図6に示すような折り畳み関数が、620で決定された要素型の配列に対して呼び出される。折り畳まれた配列が折り畳み関数によって返されると、その折り畳まれた配列が、628で型関数によって返される。 At 604, if the object is not a scalar, control passes to 616. At 616, if the object is an array, control is transferred to 620 where the type function (FIG. 4) is called recursively for each element of the array. When the results of these type functions are received, control continues to 624 where the folding function as shown in FIG. 6 is called on the array of element types determined at 620. When a folded array is returned by the folding function, the folded array is returned by the type function at 628.
616において、オブジェクトが配列ではない場合、制御は632に移る。632において、型関数(図4)は、オブジェクトの各フィールドに対して再帰的に呼び出される。制御は636に続き、ここで、折り畳み関数は、632で決定されたフィールド型の連結に対して呼び出される。折り畳み関数によって返された折り畳まれたオブジェクトは、次に、640において型関数によって返される。 At 616, if the object is not an array, control passes to 632; At 632, the type function (FIG. 4) is called recursively for each field of the object. Control continues at 636 where the folding function is called for the field type concatenation determined at 632. The folded object returned by the folding function is then returned by the type function at 640.
図5は、2つのスキーマ要素を単一のスキーマ要素にマージするマージ関数の実装例を示す。マージ関数も再帰的であり、最初に呼び出されるとき、2つのスキーマ要素は、既存のスキーマと、新たに受信されたオブジェクトから推論された新しいスキーマと、である。マージ関数の更なる再帰的呼び出しでは、スキーマ要素は、これらのスキーマのサブ要素である。制御は704で始まり、ここで、マージしようとするスキーマ要素が等価である場合、制御は708に移り、等価なスキーマ要素のいずれか1つを返す。そうではない場合、制御は712に移り、ここで、マージしようとするスキーマ要素が両方とも配列である場合、制御は716に移り、そうではない場合、制御は720に移る。 FIG. 5 shows an implementation example of a merge function that merges two schema elements into a single schema element. The merge function is also recursive, and when first called, the two schema elements are the existing schema and the new schema inferred from the newly received object. For further recursive calls of merge functions, schema elements are subelements of these schemas. Control begins at 704, where if the schema elements to be merged are equivalent, control transfers to 708, which returns one of the equivalent schema elements. If not, control is transferred to 712, where control is transferred to 716 if both schema elements to be merged are arrays, otherwise control is transferred to 720.
716において、マージしようとする配列の一方が空である場合、他方の配列は724で返される。そうではない場合、制御は728に続き、ここで、図6に示すような折り畳み関数が、マージしようとする両方の配列の要素を含む配列に対して呼び出される。折り畳み関数によって返された折り畳まれた配列は、次に、732でマージ関数によって返される。 At 716, if one of the arrays to be merged is empty, the other array is returned at 724. Otherwise, control continues to 728 where a folding function as shown in FIG. 6 is called on the array containing the elements of both arrays to be merged. The folded array returned by the folding function is then returned by the merge function at 732.
720において、マージしようとするスキーマ要素の一方が空である場合、他方のスキーマ要素は、736でマージ関数によって返される。マージしようとする両方のスキーマ要素が空でない場合、制御は740に続き、ここで、折り畳み関数が、マージしようとする両方のスキーマ要素のキーと値のペアを含むオブジェクトに対して呼び出される。折り畳み関数によって返された折り畳まれたオブジェクトは、次に、744でマージ関数によって返される。 At 720, if one of the schema elements to be merged is empty, the other schema element is returned by the merge function at 736. If both schema elements to be merged are not empty, control continues to 740 where a folding function is called on the object containing key-value pairs of both schema elements to be merged. The folded objects returned by the folding function are then returned by the merge function at 744.
図6は、折り畳み関数の実装例を示す。制御は804で始まり、ここで、折り畳もうとするオブジェクトが配列である場合、制御は808に移り、そうではない場合、制御は812に移る。808において、配列が、両方とも配列である値のペアを含む場合、制御は816に移り、そうではない場合、制御は820に続く。820において、配列が、両方ともオブジェクトである値のペアを含む場合、制御は816に移り、そうではない場合、制御は824に続く。824において、配列が、等しいスカラ型である値のペアを含む場合、制御は816に移り、そうではない場合、折り畳みが完了し、配列が折り畳み関数から返される。816において、図5に示すようなマージ関数が、808、820、または824によって識別された値のペアに対して呼び出される。制御は828に続き、ここで、値のペアは、マージ関数によって返された単一の値で置き換えられる。 FIG. 6 shows an implementation example of the folding function. Control begins at 804 where, if the object to be folded is an array, control passes to 808, otherwise control passes to 812. At 808, if the array contains a pair of values that are both arrays, control passes to 816, otherwise control continues to 820. At 820, if the array contains a pair of values that are both objects, control passes to 816, otherwise control continues to 824. At 824, if the array contains a pair of values that are equal scalar types, control passes to 816, otherwise the folding is complete and the array is returned from the folding function. At 816, a merge function as shown in FIG. 5 is called for the value pair identified by 808, 820 or 824. Control continues to 828 where the value pairs are replaced with the single value returned by the merge function.
812において、オブジェクト内のキーのいずれかが同じである場合、制御は832に移り、そうではない場合、折り畳みが完了し、オブジェクトは返される。832において、制御は、同じキーのペアを選択し、836に続く。キーのペアについての値が両方とも配列であるか、両方ともオブジェクトである場合、制御は840に移り、そうではない場合、制御は844に移る。840において、キーのペアの値に対してマージ関数が呼び出される。制御は848に続き、ここで、キーのペアが、マージ関数によって返された値を有する単一キーで置き換えられる。制御は、次に852に続き、ここで、いずれかのキー同士がさらに同じである場合、制御は832に移り、そうではない場合、折り畳みは完了し、修正されたオブジェクトが返される。844において、キーのペアの値が両方ともスカラである場合、制御は856に移り、そうではない場合、制御は852に移る。856において、キーのペアの値のスカラ型が等しい場合、制御は、それらのキーのペアをマージするために840に移り、そうではない場合、制御は852に移る。 At 812, if any of the keys in the object are the same, control is transferred to 832, otherwise the folding is complete and the object is returned. At 832, control selects the same key pair and continues to 836. If the values for the key pair are both arrays or both objects, control passes to 840, otherwise control passes to 844. At 840, a merge function is called on the value of the key pair. Control continues to 848 where the key pair is replaced with a single key with the value returned by the merge function. Control then continues to 852 where control is transferred to 832 if any of the keys are further identical, otherwise the folding is complete and the modified object is returned. At 844, if the values of the key pair are both scalar, control passes to 856, otherwise control passes to 852. At 856, if the scalar types of the key pair values are equal, control passes to 840 to merge those key pairs, otherwise control passes to 852.
図7は、新たに取り出したオブジェクトからのデータをインデックスにポピュレートするプロセスの例を示す。制御は904で始まり、ここで、RowIndexが求められる場合、制御は908に移り、そうではない場合、制御は912に移る。908において、オブジェクトが、上記のようにRowIndexに追加され、制御は912に続く。912において、オブジェクトは、現在の関係スキーマについて関係タプルに平坦化され、結合キーが必要に応じて作成される。制御は916に続き、ここで、制御は、インデックスに追加する更なるタプルが存在するか否かを決定する。存在する場合、制御は920に移り、存在しない場合、インデックスはポピュレート済みであり、制御は終了する。 FIG. 7 shows an example of the process of populating the data from the newly retrieved object into an index. Control begins at 904, where if RowIndex is determined, control passes to 908, otherwise control passes to 912. At 908, an object is added to the RowIndex as described above, and control continues to 912. At 912, the objects are flattened into relation tuples for the current relation schema, and join keys are created as needed. Control continues to 916 where control determines whether there are more tuples to add to the index. If so, then control passes to 920; otherwise, the index is populated and control ends.
920において、制御は、タプルが配列表についてのものであるか否かを決定する。そうである場合、制御は924に移り、そうではない場合、制御は928に移る。924において、配列表内に更なる値カラムがある場合、制御は932に移る。932において、カラム値が元の取り出したオブジェクト内に存在する場合、936において、その値はArrayIndexに追加される。制御は、次に940に続く。ValueIndexがカラムについて求められる場合、制御は944に移り、そうではない場合、制御は924に戻る。カラム値が、932で元の取り出したオブジェクト内に存在しない場合、制御は924に戻る。 At 920, control determines whether the tuple is for a sequence list. If so, control passes to 924; otherwise, control passes to 928. At 924, if there are additional value columns in the sequence listing, control passes to 932. At 932, if the column value exists in the original retrieved object, then at 936, the value is added to the ArrayIndex. Control then continues to 940. If a ValueIndex is determined for the column, control passes to 944, otherwise control returns to 924. If the column value is not present at 932 in the original fetched object, control returns to 924.
928において、タプルがマップテーブルについてのものである場合、制御は948に移り、そうではない場合、制御は952に移る。948において、制御は、更なる値カラムがマップテーブル内に残っているか否かを決定する。残っている場合、制御は956に移り、残っていない場合、制御は916に戻る。956において、制御は、カラム値が元の取り出したオブジェクト内に存在するか否かを決定する。存在する場合、制御は960に移り、存在しない場合、制御は948に戻る。960において、値は、MapIndexに追加され、制御は964に移る。964において、ValueIndexがカラムについて求められる場合、値は、968においてValueIndexに追加される。いずれの場合においても、制御は次に948に戻る。 At 928, if the tuple is for a map table, control passes to 948, otherwise control passes to 952. At 948, control determines whether more value columns remain in the map table. If so, then control transfers to 956, otherwise control returns to 916. At 956, control determines whether the column value is present in the original retrieved object. If present, control passes to 960, and if not, control returns to 948. At 960, the value is added to MapIndex and control passes to 964. If at 964 a ValueIndex is determined for the column, then at 968 the value is added to the ValueIndex. In either case, control then returns to 948.
952において、制御は、テーブル内に存在する更なるカラムがあるか否かを決定する。存在する場合、制御は972に移り、存在しない場合、制御は916に戻る。972において、制御は、カラム値が元の取り出したオブジェクト内に存在するか否かを決定する。存在する場合、制御は976に移り、存在しない場合、制御は952に戻る。976では、値がBigIndexに追加され、制御は980に続く。980では、ValueIndexがカラムについて求められる場合、制御は984に移り、ここで、値がValueIndexに追加される。いずれの場合においても、制御は次に952に戻る。 At 952, control determines whether there are more columns present in the table. If so, control passes to 972, and if not, control returns to 916. At 972, control determines whether the column value is present in the original retrieved object. If so, control passes to 976; otherwise, control returns to 952. At 976, a value is added to BigIndex and control continues at 980. At 980, if the ValueIndex is determined for the column, control is transferred to 984, where the value is added to the ValueIndex. In either case, control then returns to 952.
図8は、マップを識別するプロセスの例を示す。制御は、1004で始まり、ここで、第1のオブジェクトが選択される。制御は1008に続き、ここで、オブジェクトが空である場合、1012において、含有オブジェクトがマップとして指定され、空でない場合、制御は1016に移る。1016において、制御は、上記のような含有オブジェクトの頻度に対する平均フィールド頻度の比率を決定する。制御は1020に続き、ここで、比率が閾値未満である場合、制御は1012に移って、マップとして含有オブジェクトを指定する。閾値以上の場合、制御は1024に移る。ほんの一例として、閾値は、ユーザが調整可能であってよく、及び/または、観察データに基づいて動的であってよい。様々な実装において、関係スキーマとしてのマップが多くなるにつれて、ヒューリスティックスは、フィールドをより容易に識別するように調整されてよい。1012において、含有オブジェクトがマップとして指定され、制御は1024に続く。評価すべきオブジェクトが更にある場合、制御は1028に移り、ここで、次のオブジェクトが選択され、制御は1008に続き、ない場合、制御は終了する。 FIG. 8 shows an example of the process of identifying a map. Control begins at 1004, where a first object is selected. Control continues to 1008 where, if the object is empty, then at 1012, the containing object is designated as a map, otherwise control passes to 1016. At 1016, control determines the ratio of average field frequency to the frequency of contained objects as described above. Control continues to 1020 where, if the ratio is below the threshold, control transfers to 1012 to specify the contained object as a map. If it is above the threshold, control passes to 1024. By way of example only, the threshold may be user adjustable and / or may be dynamic based on observational data. In various implementations, as there are more maps as relational schemas, the heuristics may be adjusted to more easily identify the fields. At 1012, the containing object is designated as a map and control continues to 1024. If there are more objects to evaluate, control transfers to 1028 where the next object is selected and control continues to 1008, otherwise control ends.
図9は、関係スキーマの作成を再帰に依存するcreate_schema関数の実装例を示す。create_schema関数が呼び出されると、制御は、スキーマ要素(Schema_Element)をテーブル(Current_Table)に組み込む。この目的のために、制御は1104で始まり、ここで、Schema_Elementがオブジェクトである場合、制御は1108に移り、そうではない場合、制御は1112に移る。1108では、オブジェクトが空のオブジェクトである場合、オブジェクトはマップとして扱われ、制御は1116に移り、そうではない場合、制御は1120に続く。1120では、新しいテーブル(New_Table)がネストされたオブジェクトのために作成される。1124において、結合キー(Join_Key)が、Current_Tableに追加され、1128において、対応するJoin_Keyが、New_Tableに追加される。制御は次に1132に続き、ここで、ネストされたオブジェクトの各フィールドについて、create_schema関数が、フィールドをテーブルに追加するために再帰的に呼び出される。制御は、次に1136においてcreate_schema関数の現在の呼び出しから戻る。 FIG. 9 shows an implementation example of a create_schema function that relies on recursion to create a relational schema. When the create_schema function is called, control incorporates a schema element (Schema_Element) into a table (Current_Table). For this purpose, control starts at 1104 where control is transferred to 1108 if Schema_Element is an object, otherwise control is transferred to 1112. At 1108, if the object is an empty object, the object is treated as a map, control passes to 1116, otherwise control continues to 1120. At 1120, a new table (New_Table) is created for the nested object. At 1124, a join key (Join_Key) is added to the Current_Table, and at 1128, the corresponding Join_Key is added to the New_Table. Control then continues to 1132, where for each field of the nested object, the create_schema function is called recursively to add the field to the table. Control then returns at 1136 from the current call of the create_schema function.
1112において、Schema_Elementがマップである場合、制御は1116に移り、そうではない場合、制御は1138に移る。1116において、新しいテーブル(New_Table)がマップのために作成される。制御は1140に続き、ここで、Join_Keyが、Current_Tableに追加され、1144において、対応するJoin_Keyが、New_Tableに追加される。1148において、文字列型を有するキーフィールドが、New_Tableに追加される。制御は1152に続き、ここで、マップの各値型について、create_schema関数が、値型をNew_Tableに追加するために再帰的に呼び出される。制御は次に1136に戻る。 At 1112, if the Schema_Element is a map, control passes to 1116, otherwise control passes to 1138. At 1116, a new table (New_Table) is created for the map. Control continues to 1140 where the Join_Key is added to the Current_Table, and at 1144 the corresponding Join_Key is added to the New_Table. At 1148, a key field having a string type is added to New_Table. Control continues to 1152 where, for each value type in the map, the create_schema function is called recursively to add the value type to New_Table. Control then returns to 1136.
1138において、制御は、Schema_Elementが配列であるか否かを決定する。配列である場合、制御は1156に移り、配列でない場合、制御は1160に移る。1156において、新しいテーブル(New_Table)が配列のために作成され、1164において、Join_KeyがCurrent_Tableに追加され、1168において、対応するJoin_KeyがNew_Tableに追加される。1172において、整数型を有するインデックスフィールドが、New_Tableに追加される。制御は1176に続き、ここで、配列の各アイテム型について、アイテム型をNew_Tableに追加するためにcreate_schema関数が呼び出される。制御は次に1136に戻る。 At 1138, control determines whether the Schema_Element is an array. If so, control passes to 1156; otherwise, control passes to 1160. At 1156, a new table (New_Table) is created for the array, at 1164 a Join_Key is added to the Current_Table, and at 1168 the corresponding Join_Key is added to the New_Table. At 1172, an index field having an integer type is added to New_Table. Control continues to 1176 where, for each item type in the array, the create_schema function is called to add the item type to New_Table. Control then returns to 1136.
1160において、消去プロセスによって、Schema_Elementは、プリミティブである。プリミティブと同じ名前を有するCurrent_Tableに既にフィールドがある場合、制御は1180に移り、そうではない場合、制御は1184に移る。1184において、名前フィールドがCurrent_Tableに単純に加えられ、制御は1136に戻る。1180において、型多様性が存在するので、プリミティブと同じ名前を有するCurrent_Tableの既存のフィールドが、名前を変更されて、それらの型をフィールド名に追加する。制御は1188に続き、ここで、新しいフィールドが現在のプリミティブに基づいて追加され、型はフィールド名に添えられる。制御は次に1136に戻る。 At 1160, by the erasure process, the Schema_Element is a primitive. If there is already a field in the Current_Table having the same name as the primitive, control passes to 1180, otherwise control passes to 1184. At 1184, the name field is simply added to the Current_Table and control returns to 1136. At 1180, as type diversity exists, existing fields in the Current_Table that have the same name as the primitive are renamed to add their type to the field name. Control continues to 1188 where a new field is added based on the current primitive and the type is appended to the field name. Control then returns to 1136.
図10Aにおいて、制御は、1204で開始し、ここで、ユーザまたはアドミニストレータは、データのソースを指定及び/または修正する。1208において、制御は、そのデータからスキーマを推論し、上記に詳述したように、推論中のスキーマをインデックスにポピュレートする。1212において、制御は、装飾が求められているか否かを決定する。装飾を求めるか否かは、ユーザまたはアドミニストレータによって設定されてよい。求めている場合、制御は、1216に移り、求めていない場合、制御は1220に移る。1216において、制御は、スキーマ内のマップを識別し、識別したマップを反映するようにスキーマを更新する。ユーザ及び/またはアドミニストレータからの設定に基づいて、一定の識別されたマップは、ユーザ及び/またはアドミニストレータによって、別個のカラムに手動で戻すことができる。これは、採集時、または、データ使用時のいつでも、行ってよい。マップが識別され、マップインデックスが作成されると、データは、マップインデックス内にとどまってよく、その結果、スキーマは、マップを反映することができる、または、カラムを個別に反映することができる、また、ユーザまたはアドミニストレータは、データをリロードすることなしに、これらの構成の間を切り替えることができる。制御は1220に続く。1220においては、制御は、推論されたスキーマを関係スキーマに変換する。1224において、制御は、使用中の特定のデータウェアハウスが認識可能なフォーマットにデータをパッケージ化する。1228において、関係スキーマに従ったテーブルが、データウェアハウス内に作成される。ほんの一例として、SQL create tableコマンドを用いてよい。1232において、パッケージ化されたデータは、データウェアハウスにバルクロードされる。データウェアハウスが、並列にバルクロードできる場合、1224におけるデータのパッケージ化は、1232のバルクロードを速めるために、各データベース関係について複数のファイルを作成してよい。 In FIG. 10A, control begins at 1204, where a user or administrator specifies and / or modifies a source of data. At 1208, control infers a schema from the data and populates the index with the schema being inferred, as detailed above. At 1212, control determines whether a decoration is required. Whether to request decoration may be set by the user or the administrator. If so, control passes to 1216; otherwise, control passes to 1220. At 1216, control identifies the map in the schema and updates the schema to reflect the identified map. Based on settings from the user and / or administrator, certain identified maps can be manually returned to separate columns by the user and / or administrator. This may be done at the time of collection or whenever data is used. Once the map is identified and the map index is created, the data may remain in the map index so that the schema can reflect the map or reflect the columns individually Also, the user or administrator can switch between these configurations without reloading the data. Control continues to 1220. At 1220, control transforms the inferred schema into a relational schema. At 1224, the control packages the data into a format recognizable by the particular data warehouse in use. At 1228, a table according to the relationship schema is created in the data warehouse. As an example only, the SQL create table command may be used. At 1232, the packaged data is bulk loaded into the data warehouse. If the data warehouse can bulk load in parallel, packaging the data at 1224 may create multiple files for each database relationship to speed up the 1232 bulk load.
図10Bにおいて、インデックスストアが現在この特定の時に、利用できない、満杯、または、求められない場合、修正されたプロセスが用いられてよい。1204の後、1250において、データのスキーマを推論する。図10Aと異なり、データは、インデックスのポピュレートに使用されない。1220の後、1228において、関係スキーマに従ったテーブルがデータウェアハウス内に作成される。制御は、1254に続き、ここで、第2のパスがデータに対して実行され、データウェアハウスにローカルロードするための中間ファイルが作成される。制御は、次に1232に続き、ここで、バルクロードがデータウェアハウスに再形成される In FIG. 10B, if the index store is currently unavailable, full, or not required at this particular time, a modified process may be used. After 1204, at 1250, the schema of the data is inferred. Unlike FIG. 10A, data is not used to populate the index. After 1220, at 1228, a table according to the relationship schema is created in the data warehouse. Control continues to 1254, where a second pass is performed on the data to create an intermediate file for local loading into the data warehouse. Control then continues to 1232 where the bulk load is reformed into the data warehouse
図11は、データウェアハウスがサポートする分析プラットフォームに新しいデータを統一するプロセスの例を示す。1304において、制御は、新しいデータが、指定されたデータソースから受信されたか否かを決定する。そうである場合、制御は、1308に移る。そうでない場合、制御は、1304にとどまる。1308において、制御は、新しいデータのスキーマを推論し、新しいデータをインデックスにポピュレートする。制御は1312に続き、ここで、制御は、新しいデータのスキーマが既に存在するスキーマのサブセットであるか否かを決定する。そうである場合、制御は1316に続き、そうでない場合、制御は、1320に移る。1320において、新しいスキーマは、既存のスキーマとマージされ、制御は1324に続く。1324において、制御は、装飾が求められているか否かを決定し、求められている場合、制御は1328に移り、求められていない場合、制御は1332に移る。1328において、制御は、新しいデータに基づいてマップを識別する。これらの識別されたマップは、新しいデータが、マップ基準に従ったマップとしてみなされる属性を生じる場合には、新しいデータと以前のデータとを含んでよい。追加のマップが識別される場合、スキーマは更新される。そして、制御は1332に続く。1332において、マージされたスキーマは、関係スキーマに変換される。1336において、テーブルは、データウェアハウス内で修正され、及び/または、新しいテーブルが作成される。1340において、ユーザインタフェースは、スキーマが更新されたことと、従って、ユーザインタフェースは、更新されたスキーマをユーザに表示すべきであることとを、知らされる。そして、制御は、1316に続く。1316において、制御は、インデックスからバルクロードのために新しいデータをパッケージ化する。制御は1344に続き、ここで、新たにパッケージ化されたデータのデータウェアハウスへのバルクロードを行う。制御は次に1304に続く。 FIG. 11 illustrates an example process for unifying new data into an analysis platform supported by the data warehouse. At 1304, control determines whether new data has been received from the designated data source. If so, control transfers to 1308. If not, control remains at 1304. At 1308, control infers the schema of the new data and populates the new data into an index. Control continues to 1312 where control determines whether the schema of the new data is a subset of an already existing schema. If so, control continues to 1316, otherwise control passes to 1320. At 1320, the new schema is merged with the existing schema, and control continues to 1324. At 1324, control determines whether a decoration is desired, if so, control passes to 1328, and if not, control passes to 1332. At 1328, control identifies the map based on the new data. These identified maps may include new data and previous data if the new data results in an attribute that is considered as a map according to the map criteria. If additional maps are identified, the schema is updated. Control then continues to 1332. At 1332, the merged schemas are converted to relational schemas. At 1336, the table is modified in the data warehouse and / or a new table is created. At 1340, the user interface is informed that the schema has been updated and, accordingly, the user interface should display the updated schema to the user. Control then continues to 1316. At 1316, control packages new data for bulk load from the index. Control continues to 1344 where bulk loading the newly packaged data into the data warehouse. Control then continues to 1304.
図12は、ユーザインタフェース操作の高レベルの概略図の例である。制御は1404で開始し、ここで、推論された関係スキーマがユーザに提示される。制御は1408に続き、ここで、スキーマが変更されている場合、制御は1412に移り、そうでない場合、制御は1416に移る。1412において、制御は、ユーザインタフェースで、表示されたスキーマを更新し、1420に続く。1420において、制御は、オプションで、スキーマへの変更をグラフィカルに識別する。ほんの一例として、最近変更されたスキーマ要素は、視覚的にハイライト表示されてよい。様々な実装において、ユーザインタフェースは、最後のクエリがいつ実行されたかに基づいて、スキーマ要素が最近変更されたか否かを決定してよい。ほんの一例として、最後のクエリが実行されてから変更されたスキーマ要素は、特に、ハイライト表示されてよい。制御は次に1416に続く。1416において、新たなクエリがユーザによって要求されている場合、制御は1424に移り、要求されていない場合、制御は1428に移る。1424において、制御は、実行されたクエリからのクエリ結果の表示を開始する。これらの結果は、一定のローもしくはカラムが抜けている、及び/または、不正確もしくは部分的に不正確なデータを有するなど、不完全な場合がある。制御は1428に続く。1428において、進行中のクエリから追加のクエリ結果がある場合、制御は1432に移る。ない場合、制御は1408に戻る。1432において、制御は、追加の結果を用いてインターフェースを更新する。制御は1436に続き、ここで、データのプロットが表示されている場合、軸の再スケーリングや再ラベル付けを行うなど、チャートの様々な態様を修正してよい。制御は1440に続き、ここで、制御は、クエリ結果への変更をグラフィカルに識別する。ほんの一例として、繰り返し変更されたクエリ結果はハイライト表示される。様々な実装において、大きな割合で、または、大量に変更されたクエリ結果は、より顕著にハイライト表示されてよい。さらに、新しいカラム及び/または新しいローを一意的に識別してよい。さらに、クエリ結果の傾向を視覚的に表すために、ゴースト及び/または色付けによって、現在の値と、以前表示した値とを示してよい。制御は次に1408に戻る。 FIG. 12 is an example of a high level schematic of user interface operation. Control begins at 1404, where the inferred relationship schema is presented to the user. Control continues to 1408 where, if the schema has been changed, control transfers to 1412, otherwise control transfers to 1416. At 1412, control updates the displayed schema with the user interface and continues to 1420. At 1420, control optionally identifies changes to the schema. By way of example only, recently modified schema elements may be highlighted visually. In various implementations, the user interface may determine whether the schema element has recently changed based on when the last query was executed. By way of example only, schema elements that have been modified since the last query was executed may be highlighted. Control then continues to 1416. At 1416, if a new query is requested by the user, then control passes to 1424, and if not, control passes to 1428. At 1424, control begins displaying query results from the executed query. These results may be incomplete, such as missing certain rows or columns and / or having incorrect or partially incorrect data. Control continues at 1428. At 1428, if there are additional query results from the ongoing query, control is transferred to 1432. If not, control returns to 1408. At 1432, control updates the interface with additional results. Control continues to 1436 where various aspects of the chart may be modified, such as rescaling and relabeling of the axes if a plot of the data is displayed. Control continues at 1440, where the control graphically identifies changes to the query results. By way of example only, query results that have been repeatedly modified are highlighted. In various implementations, query results that have been changed by a large percentage or a large number may be highlighted more noticeably. Additionally, new columns and / or new rows may be uniquely identified. In addition, ghosting and / or coloring may indicate current values and previously displayed values to visually represent trends in query results. Control then returns to 1408.
グラフィカルユーザインタフェース
図13Aにおいて、グラフィカルユーザインタフェースは、左側のウィンドウ枠に推論したスキーマを表示し、右側のウィンドウ枠に、クエリとクエリ結果を示す。これらの例においては、ツイッター属性の表現の例を提示している。
Graphical User Interface In FIG. 13A, the graphical user interface displays the inferred schema in the left pane and the query and query results in the right pane. In these examples, examples of expressions of Twitter attributes are presented.
図13Bにおいては、図13Aの後、追加された関係スキーマ属性が現れていることに留意する。詳細には、in_reply_toで始まる属性が、これらの属性を含んだ追加のデータが構文解析されていることに基づいて、ユーザインタフェースに動的に追加された。図13Cは、ネストされたオブジェクトの表現を1つ示している。詳細には、ユーザというノードの下に、属性が示されている。 Note that in FIG. 13B, after FIG. 13A, the added relationship schema attributes appear. In particular, attributes beginning with in_reply_to have been dynamically added to the user interface based on the additional data containing these attributes being parsed. FIG. 13C shows one representation of a nested object. In detail, the attribute is shown under the node of user.
図13Dは、データのテーブルによる表現を提示している。この表示においては、クエリによって10の言語が見つかった。図13Eにおいては、24の言語が見つかった。この特定の例においては、元の10の言語のカウントは変わらず、図13Dの表示と図13Eの表示との間に構文解析されたレコードは、図13Dの最初の10で示されていない追加の言語であることを示している。 FIG. 13D presents a tabular representation of the data. In this display, the query found 10 languages. In FIG. 13E, 24 languages were found. In this particular example, the counts of the original 10 languages remain unchanged, and the records parsed between the display of FIG. 13D and the display of FIG. 13E are additional not shown in the first 10 of FIG. 13D. It shows that it is the language of.
図13Bにおいて、追加の属性は、図13Aで示された表示の次の表示に動的に追加された。図13Eにおいて、追加のクエリ結果は、図13Dに示す表示の次の表示に動的に追加された。 In FIG. 13B, additional attributes have been dynamically added to the next display of the display shown in FIG. 13A. In FIG. 13E, additional query results were dynamically added to the next display of the display shown in FIG. 13D.
自動化された抽出、変換、ロード(ETL)
上記に、スキーマ推論を紹介した。スキーマ推論は、半構造オブジェクト(一定の実装においては、JSONドキュメント)のコレクションから累積(または、グローバル)スキーマ(一定の実装においては、JSONスキーマとも呼ばれる)を抽出する。この累積スキーマは、さらなる入力が入手されると、増分的に更新される。累積スキーマは、マップまたは配列に属するエンティティのセットを指定するように装飾されてよい。このような累積スキーマの作成、及び、累積スキーマに基づいたデータの処理は、従来の抽出、変換、ロード、(ETL)プロセスの一部として、または、そのプロセスに替えて有利に使用することができる。結果として生じるETLプロセスは、スピード、忠実度、ユーザビリティのうちの1つまたは複数において改善が見られる。
Automated Extraction, Transformation, Loading (ETL)
Above we introduced schema inference. Schema inference extracts a cumulative (or global) schema (also called a JSON schema in certain implementations) from a collection of semi-structured objects (in certain implementations, JSON documents). This cumulative schema is incrementally updated as more input is obtained. The cumulative schema may be decorated to specify a set of entities belonging to a map or array. The creation of such cumulative schemas and the processing of data based on cumulative schemas can be advantageously used as part of or in place of conventional extraction, transformation, loading, (ETL) processes. it can. The resulting ETL process shows improvements in one or more of speed, fidelity, and usability.
一般論として、ETLは、選択されたデータセットに一定の変換が行われるオプションとしての変換段階を備えた、1つまたは複数のソース位置から1つまたは複数の宛先位置へのデータの移動を管理するプロセスを指す。変換は宛先の1つの入力フォーマットに従うために必要な場合もある。ソース及び宛先は、関係データベース、オブジェクトストア(例えば、NoSQLまたはキーと値のストア)、または、それらのデータベースもしくはストアのフォーマットに従うデータのレポジトリ(例えば、CSVもしくはJSONデータを含むファイルもしくはドキュメントを記憶する、ローカルもしくは分散ファイルシステム、または、クラウドストア)であってよい。 In general terms, ETL manages the movement of data from one or more source locations to one or more destination locations, with an optional conversion stage where constant conversion is performed on the selected data set Refers to the process of Conversion may be necessary to follow one input format of the destination. Sources and destinations store relational databases, object stores (eg NoSQL or key and value stores), or repositories of data according to the format of those databases or stores (eg files or documents containing CSV or JSON data) , Local or distributed file system, or cloud store).
ETLの忠実度は、データ項目がどれくらい正確にソースから宛先にマップされるかで定義することができる。例えば、データ項目a、b、cをソースから宛先にロードすることを課され、結果として項目b、cが宛先に存在するETLプロセスは、結果として項目CだけがロードされたETLプロセスより忠実である。 ETL fidelity can be defined by how precisely the data items are mapped from source to destination. For example, an ETL process imposed to load data items a, b, c from source to destination, resulting in items b, c at the destination being more faithful than ETL processes resulting in only item C being loaded is there.
ETLのユーザビリティは、ロードされたデータの一部を入力として用いるタスクを宛先コンピュータシステムで行う際に、ユーザ及びコンピュータシステムの両方が行うステップの(削減された)数で測ることができる。例えば、ソースから宛先に結果的にデータ項目b、cをロードする2つの異なるETLプロセスについては、その2つの項目の最大のものを宛先システムで計算するステップの数が一方のプロセスの方が少なければ、ユーザビリティが異なると言える。 ETL's usability can be measured by the (reduced) number of steps taken by both the user and the computer system when performing on the destination computer system the task of using part of the loaded data as input. For example, for two different ETL processes that eventually load data items b, c from source to destination, the number of steps in the destination system to calculate the largest of the two items should be smaller in one process. For example, usability is different.
上記のように、半構造データは、関係形式に変換して、インデックス付きカラム型ストレージをサポートするシステムにロードすることができる。カラム型ストレージに加えて、または、その代わりに、データは、複数のターゲットにロードすることができる。これは、1つまたは複数の(可能であれば、半構造)ソースからデータを取得し、オプションで、1つまたは複数の変換を行い、そのデータを1つまたは複数の(可能であれば、関係)ターゲットにロードするフレキシブルなETLプロセスを記述するように一般化することができる。様々な実装において、ETLプロセスは、中間ストレージのためのインデックスストアを用いてもよく、中間ストアを省略してもよい。 As noted above, semi-structured data can be converted to relational form and loaded into systems that support indexed column storage. Data can be loaded into multiple targets in addition to, or instead of, column-based storage. It takes data from one or more (possibly semi-structured) sources, optionally performs one or more transformations, and puts that data into one or more (possibly Relationships can be generalized to describe a flexible ETL process for loading into a target. In various implementations, the ETL process may use an index store for intermediate storage, or may omit the intermediate store.
図14は、ETLプロセスの概略を示し、図2Bより高いレベルの、より一般化されたバージョンを示す。図14の左側で、データが1つまたは複数のデータソース(例えば、データソース1504、1508)からスタートし、データコレクタモジュール1512によって、未変換レコードの形で抽出される。データコレクタモジュール1512は、その未変換レコードをJSON等の半構造フォーマットで生成してよい。データソース1504、1508が、JSONオブジェクトを記憶するテキストファイル等の所定のフォーマットのデータを含む場合、データコレクタモジュール1512は、JSONオブジェクトは変更しないで渡してよい。様々な実装において、1つまたは複数の追加データコレクタモジュール(図示せず)は、同一のデータソース、または、複数のデータソースからのデータを並列に処理するように実装してよい。さらに、データコレクタモジュールは、スキーマ推論及び統計収集モジュール1516とメタデータストア1540とが利用可能な形式にデータを徐々に変換するチェーンとして実装してよい。
FIG. 14 shows a schematic of the ETL process, showing a more generalized version at a higher level than FIG. 2B. At the left side of FIG. 14, data is extracted from one or more data sources (eg,
収集されたレコードは、スキーマ推論及び統計収集モジュール1516に渡される。スキーマ推論及び統計収集モジュール1516が決定した累積スキーマに基づいて、データは、1つまたは複数の宛先システム(図14に示すような、データ宛先システム1524、1528)に後にロードするために、インデックスストア1520にロードすることができる。追加で、あるいは、その代わりに、データは、インデックスストア324を迂回して、エクスポートモジュール1534経由で、データ宛先システム1524または1528の1つまたは複数に直接送られてよい。
The collected records are passed to the schema inference and
変換モジュール1536は、データ宛先システム1524または1528の1つまたは両方にエクスポートモジュール1534経由でデータを記憶する前に、インデックスストア1520からのデータに1つまたは複数の変換を行うように実装してよい。あるいは、変換モジュール1536は、インデックスストアを迂回して、スキーマ推論及び統計収集モジュール1516から直接受信したデータを変換してよい。
エクスポートモジュール1534は、採集コマンドに対応しているフォーマットで、データをデータ宛先システム1524、1528に供給する。ほんの一例として、エクスポートモジュール1534は、SQLベースのデータウェアハウスまたはデータベースのために、テーブルのロー形式でデータを供給してよい。エクスポートモジュール1534は、JSONオブジェクトを受け入れるデータ宛先システム1524に応答して、JSONオブジェクト等のオブジェクトをデータ宛先システム1524に供給してよい。様々な実装において、オブジェクトは、データコレクタモジュール1512から、変更されずに渡されてよい。カラムデータを受け入れるデータ宛先システム1524に応答して、エクスポートモジュール1534は、インデックスストア1520からのカラムベースのデータを変更せずに渡してよい。
メタデータストア1540は、データコレクタモジュール1512、スキーマ推論及び統計収集モジュール1516、インデックスストア1520のそれぞれの状態を記録する。スケジューリングモジュール1544は、ジョブを、データコレクタモジュール1512、スキーマ推論及び統計収集モジュール1516、インデックスストア1520、エクスポートモジュール1534に割り当てる。スケジューリングモジュール1544は、図16A及び16Bに関して以下により詳細に述べる依存性に基づいて、ジョブをスケジュールしてよい。監視システム1548は、以下に記載するように、データコレクタモジュール1512、スキーマ推論及び統計収集モジュール1516、インデックスストア1520、変換モジュール1536、メタデータストア1540、並びに、データ宛先システムの1つまたは複数(図14の例では、データ宛先システム1524)の操作に関する性能及びエラーのデータを記録する。
The
複数のソースからデータを抽出
データソース
オブジェクトソース
入力ソースの定義をETLプロセスに広げてオブジェクトソースを取り扱う。これらのソースは、NoSQLストア、MongoDBやCouchbase等のドキュメントストア、Redis等のデータ構造ストア、Cassandra、HBase、DynamoDB等のキー/多値ストアを含むことができる。ファイルストアのファイル内に記憶されたオブジェクトは、追加のオブジェクトソースとして扱うことができる。ファイルに記憶されたオブジェクトは、JSON、BSON、Protobuf、Avro、Thrift及びXMLを含むことができる。
Extract Data from Multiple Sources Data Source Object Source Expand the definition of the input source to the ETL process to handle the object source. These sources can include NoSQL stores, document stores such as MongoDB and Couchbase, data structure stores such as Redis, and key / multi-value stores such as Cassandra, HBase, DynamoDB and the like. Objects stored in file store files can be treated as additional object sources. The objects stored in the file can include JSON, BSON, Protobuf, Avro, Thrift and XML.
様々な実装において、データ抽出のために選択された入力ソースの一部または全ての性質は、自動検出されてよい。異なる種類の入力ソースに対して専用コレクタを用いてよい。簡単にするために、今後の記載では、オブジェクトソースの実施例としてJSONドキュメントを用いる。本開示は、JSONドキュメントの代わりに、別のタイプのオブジェクトソースを用いることができ、他のオブジェクトソースとJSON間の1対1マッピングがあってよい。言い換えると、本開示は、それら他のタイプのオブジェクトソースに直接、適用することができる。 In various implementations, some or all of the properties of the input source selected for data extraction may be detected automatically. Dedicated collectors may be used for different types of input sources. For simplicity, we will use JSON documents as an example of an object source in the following. The present disclosure may use another type of object source instead of a JSON document, and there may be a one-to-one mapping between other object sources and JSON. In other words, the present disclosure can be applied directly to those other types of object sources.
関係ソース
データベース等の関係ソースもソースとして用いてよい。関係ソースからデータを抽出するプロセスは、ある意味では、JSONスキーマから関係スキーマを生成するプロセスを逆に実行すると考えることができる。プロセスは、各ローをオブジェクトに変換するルートテーブルを識別することで始まる。ルートテーブルは、ユーザが指定してもよく、データコレクタプロセスによって自動的に選択されてもよく、以前のヒューリスティックス、または、ユーザもしくはアドミニストレータが提供した規則セットに基づいて、データコレクタプロセスによって選択されてもよい。データコレクタは、ユーザが後に手動で変更を行うことを前提として、ルートテーブルを選択してよい。
Relational Sources Relational sources such as databases may also be used as sources. The process of extracting data from a relationship source can, in a sense, be thought of as reversing the process of generating a relationship schema from a JSON schema. The process begins by identifying a route table that converts each row into an object. The route table may be specified by the user, may be automatically selected by the data collector process, or selected by the data collector process based on previous heuristics or a set of rules provided by the user or administrator. Also good. The data collector may select the route table, provided that the user later makes manual changes.
そのルートテーブルのローを、他のテーブルのローと結合して、完全なオブジェクトを作成する。例えば、他のテーブルのローは、外部キー関係、統計的ペアリング、または、ユーザ指示を用いて選択してよい。統計的ペアリングは、統計を用いて、2つのカラム間の値の分布の類似性を検出することによって、実装することができる。タイムスタンプとキーカラムは、特に、関係を予測し得るカラムの候補にふさわしい。親テーブルと子テーブルのロー間に1対1の関係がある場合、子テーブルのローは、単純に、主オブジェクトのネストされたオブジェクトになる。1対多の関係がある場合、ローは、ネストされたオブジェクトの配列の一部になる。このプロセスによって、JSONドキュメントにマップすることができるオブジェクトを作成してよく、その時に、本開示におけるJSON処理の記述が直接適用される。 Combine the rows of the root table with the rows of other tables to create a complete object. For example, rows in other tables may be selected using foreign key relationships, statistical pairing, or user instructions. Statistical pairing can be implemented by using statistics to detect the similarity of the distribution of values between two columns. Time stamps and key columns are particularly good candidates for columns that can predict relationships. If there is a one-to-one relationship between the parent and child table rows, then the child table rows simply become the nested objects of the primary object. A row is part of an array of nested objects if there is a one-to-many relationship. This process may create an object that can be mapped to a JSON document, at which time the JSON processing descriptions in this disclosure are applied directly.
実施例として、次のテーブルを考える。
Table: user
Userid, name, age
1, "Nate", 27
2, "Stavros", 87
Table: address
Userid, start, end, city
1, 1995, 2006, Ann Arbor
1, 2006, NULL, Redwood City
2, 2005, 2007, Cambridge
2, 2007, NULL, San Francisco
As an example, consider the following table.
Table: user
Userid, name, age
1, "Nate", 27
2, "Stavros", 87
Table: address
Userid, start, end, city
1, 1995, 2006, Ann Arbor
1, 2006, NULL, Redwood City
2, 2005, 2007, Cambridge
2, 2007, NULL, San Francisco
JSONスキーマは、それらのテーブルから次のように推論されてよい。
user : { "userid" : "integer",
"name" : "string",
"age" : "integer",
"address" : [ {
"start" : "integer",
"end" : "integer",
"city" : "string" } 〕
}
The JSON schema may be inferred from these tables as follows:
user: {"userid": "integer",
"name": "string",
"age": "integer",
"address": [{
"start": "integer",
"end": "integer",
"city": "string"}]
}
JSONスキーマを用いて、入力テーブルからオブジェクトを作成すると、次のオブジェクトになる。
{ "userid" : 1, "name" : "Nate", "age" : 27,
"address" : [ { "start" : 1995, "end" : 2006",
"city" : "Ann Arbor" },
{ "start" : 2006, "end" : null,
"city" : "Redwood City" } 〕 }
{ "userid" : 2, "name" : "Stavros", "age" : 87,
"address" : [ { "start" : 2005, "end" : 2007",
"city" : "Cambridge" },
{ "start" : 2007, "end" : null,
"city" : "San Francisco" } 〕 }
When an object is created from an input table using JSON schema, it becomes the next object.
{"userid": 1, "name": "Nate", "age": 27,
"address": [{"start": 1995, "end": 2006 ",
"city": "Ann Arbor"},
{"start": 2006, "end": null,
"city": "Redwood City"}]}
{"userid": 2, "name": "Stavros", "age": 87,
"address": [{"start": 2005, "end": 2007 ",
"city": "Cambridge"},
{"start": 2007, "end": null,
"city": "San Francisco"}]}
イベント化を通して関係ソースをサポート
一部のケースでは、関係ソースは、単一のルートテーブルに関連付けられていない複数のテーブルを含み得る、または、異なるテーブルの結合方法は、自明でない場合がある。各テーブル(または、テーブルのセット)がタイムスタンプデータを有する少なくとも1つのカラムを含む状況では、コレクタプロセスは、テーブルのセットを次のように、「イベントにする」ことができる(「イベント化」と称する)。カラムとして入力テーブルからの全てのカラムの統合(複数のテーブルに現れる同じカラム名は、新しいテーブルでは、その名前を有する単一のカラムになり得る)と、”event”と”time”という少なくとも2つのカラムと、を有する新たな論理的または物理的なイベントテーブルを作成する。これらの名前は、既存のテーブルのカラム名との競合を避けるために、イベント化時に、プログラム的に(所定の接頭辞及び/または接尾辞を有するなど)変更することができる。
Supporting Relationship Sources Through Eventing In some cases, a relationship source may include multiple tables that are not associated with a single route table, or how different tables are joined may not be trivial. In situations where each table (or set of tables) contains at least one column with timestamp data, the collector process can "set event" as follows ("eventize") Called Consolidate all columns from the input table as columns (the same column name that appears in multiple tables can be a single column with that name in the new table) and at least two of "event" and "time" Create a new logical or physical event table with two columns. These names can be changed programatically (such as with a predetermined prefix and / or suffix) at eventization to avoid conflicts with existing table column names.
新しいテーブルに、入力テーブルのセットの各テーブルからローをポピュレートする。インポートされたローに存在しない新しいテーブルのカラムについては、ヌル値を用いることができる。”event”カラムは、ローのインポート元の入力テーブルの名前を値として用いる。”time”カラムは、イベント化されたテーブルのソート順を特定する。”time”カラムに入力テーブルの対応するローからタイムスタンプ情報をポピュレートする。 Populate rows from each table in the set of input tables into a new table. Null values can be used for new table columns that do not exist in the imported row. The "event" column uses as input the name of the input table from which the row was imported. The "time" column specifies the sort order of the evented table. Populate the "time" column with timestamp information from the corresponding row of the input table.
ソーステーブルにタイムスタンプデータを有する複数のカラムがある場合、“time1”、“time2”等、複数の”time”カラムを追加することができる。各“time”カラムは、入力テーブルの対応するタイムスタンプカラムによってポピュレートされる。あるいは、タイムスタンプデータを有する入力テーブルのカラムの1つを支配カラム(governing column)として選択し、テーブルのイベント化に用いてよい。入力テーブルのタイムスタンプカラムの選択は、自動規則(例えば、常に、最小の値を選ぶ、または、常に、一番左のカラムを選ぶ)によって、ユーザ入力に基づいて、または、ローが表すイベントが最も起こりそうな時間の導出を支援可能な統計的規則を通して、行われてよい。 If there are multiple columns with timestamp data in the source table, multiple "time" columns can be added, such as "time1", "time2", etc. Each "time" column is populated by the corresponding timestamp column in the input table. Alternatively, one of the columns of the input table having timestamp data may be selected as a governing column and used for eventing the table. The selection of timestamp columns in the input table can be based on automatic rules (for example, always choose the lowest value or always choose the leftmost column), based on user input, or the event that the row represents It can be done through statistical rules that can support the derivation of the most likely time.
イベント化の実施例として、3つのソーステーブル例の下記のスキーマを考える。
table:user_log {"id": "number", "session_start" :
"timestamp", "session_end" : "timestamp"}
table:query_log {"id": "number", "query_text" : "string",
"query_start" : "timestamp", "duration" : "number"}
table:cpu_load {"time":"timestamp", "load" : "float"}
As an example of eventing, consider the following schema of three example source tables.
table: user_log {"id": "number", "session_start":
"timestamp", "session_end": "timestamp"}
table: query_log {"id": "number", "query_text": "string",
"query_start": "timestamp", "duration": "number"}
table: cpu_load {"time": "timestamp", "load": "float"}
イベント化されたテーブルについてのスキーマ例を示す。
table:events { "event" : "string",
"_time" : "timestamp",
"_time2" : "timestamp",
"id": "number",
"session_start" : "timestamp",
"session_end" : "timestamp",
"query_text" : "string",
"query_start" : "timestamp",
"duration" : "number",
"time" : "timestamp",
"load" : "float" }
An example schema for an evented table is shown.
table: events {"event": "string",
"_time": "timestamp",
"_time2": "timestamp",
"id": "number",
"session_start": "timestamp",
"session_end": "timestamp",
"query_text": "string",
"query_start": "timestamp",
"duration": "number",
"time": "timestamp",
"load": "float"}
各ソーステーブルからの1つのローの例を考える。
user_log : (15213, "01/01/2014 12:15:00",
"01/01/2014 12:15:30")
query_log : (79004525, "select * from T;",
"01/01/2014 10:10:00", 53)
cpu_load : ("01/01/2014 11:20:30", 74.5)
Consider an example of one row from each source table.
user_log: (15213, "01/01/2014 12:15:00",
"01/01/2014 12:15:30")
query_log: (79004525, "select * from T;",
"01/01/2014 10:10:00", 53)
cpu_load: ("01/01/2014 11:20:30", 74.5)
下記は、イベント化されたテーブルにどのようにポピュレートするかの実施例である。
("user_log", "01/01/2014 12:15:00", "01/01/2014 12:15:30",
15213, "01/01/2014 12:15:00", "01/01/2014 12:15:30",
NULL, NULL, NULL, NULL, NULL),
("query_log", "01/01/2014 10:10:00", NULL, 79004525, NULL,
NULL, "select * from T;", "01/01/2014 10:10:00", 53,
NULL, NULL),
("cpu_load", "01/01/2014 11:20:30", NULL, NULL, NULL, NULL,
NULL, NULL, NULL, "01/01/2014 11:20:30", 74.5)
The following is an example of how to populate an evented table.
("user_log", "01/01/2014 12:15:00", "01/01/2014 12:15:30",
15213, "01/01/2014 12:15:00", "01/01/2014 12:15:30",
NULL, NULL, NULL, NULL, NULL),
("query_log", "01/01/2014 10:10:00", NULL, 79004525, NULL,
NULL, "select * from T;", "01/01/2014 10:10:00", 53,
NULL, NULL),
("cpu_load", "01/01/2014 11:20:30", NULL, NULL, NULL, NULL,
NULL, NULL, NULL, "01/01/2014 11:20:30", 74.5)
イベント化されたテーブルは、スキーマ内の元の位置に従ってタイムスタンプ値を維持するが、1つまたは複数の(この場合は、2つまで)のタイムスタンプを特別な“time”カラムにコピーして、ローをイベント化することに留意する。このようにして、入力の別個のローは、単一の参照“time”カラムを作成しながらも、保存された互いに排他的なタイムスタンプカラムを含んでよい。 The evented table maintains timestamp values according to their original position in the schema, but copies one or more (in this case up to two) timestamps into a special "time" column , Note that we will eventize the row. In this way, separate rows of input may contain stored mutually exclusive timestamp columns while creating a single reference "time" column.
ソース入力での入力テーブルのセットのイベント化は、物理的テーブル(テーブルは具体化される)または論理テーブルとして、存在してよい。論理テーブルについては、イベント化プロセスは、イベント化されたテーブルに属するローのストリームを作成することができ、このストリーム化された入力はETLプロセスに向けられる。イベント化されたテーブルの各ローは、一定の時間に起こったイベントに関する情報を含むオブジェクトストア内のオブジェクトに類似するので、イベント化によって、関係ソースをオブジェクトソースとして扱うことができる。 Eventization of the set of input tables at the source input may exist as a physical table (tables are instantiated) or as a logical table. For logical tables, the eventing process may create a stream of rows belonging to the evented table, and this streamed input is directed to the ETL process. Because each row of an evented table is similar to an object in the object store that contains information about the events that occurred at a certain time, eventing allows the relationship source to be treated as an object source.
特に、ユーザが、宛先地点でデータにクエリを行って、別々のイベントにわたって情報を抽出したい場合、イベント化によってユーザビリティを向上させることができる。例えば、関係ソースにクエリを行って、一定のタイムスタンプ値(または、値の範囲)を有するローに関する情報を見つけることは、イベント化されたテーブルにクエリを行うよりも複雑で時間がかかり得る。 In particular, if the user wants to query data at a destination point and want to extract information across different events, eventing can improve usability. For example, querying a relationship source to find information about a row with a constant timestamp value (or range of values) can be more complex and time consuming than querying an evented table.
データコレクタ
コレクタは、上記データソースの1つまたは複数から個々のレコードを抽出するのに使用可能なソフトウェア構成要素である。標準フォーマット(圧縮可能であってよい、または圧縮不能であってよい、JSON、BSON等)の受信ファイルの処理について前述したが、他の機構を用いて、新しいデータを求めてデータソースを監視し、このデータを採集プロセスに送るために抽出することができる。
Data Collector The Collector is a software component that can be used to extract individual records from one or more of the above data sources. Although the processing of received files in a standard format (which may or may not be compressible, JSON, BSON, etc.) has been described above, other mechanisms may be used to monitor the data source for new data. This data can be extracted for sending to the collection process.
ファイルシステムの監視
データが、ファイルシステムにおいて1つまたは複数のディレクトリで提供される場合、コレクタプロセスは、変更を探してファイルシステムを定期的に監視することができる。ファイルシステムは、従来のローカルファイルシステム(例えば、ext4)であってもよく、ファイルシステムのようなインタフェースを有する分散ストア(例えば、HDFS、AmazonS3)であってもよい。ファイルシステムの正確なインタフェースに応じて、コレクタは、ファイルシステムを定期的にスキャンして、既存のファイルのリストと比べることによって、または、インタフェースに組み込まれた通知機構(例えば、S3バケットロギング)を用いることによって、新たなファイルを検出することができる。
File System Monitoring If data is provided in the file system in one or more directories, the collector process can periodically monitor the file system for changes. The file system may be a conventional local file system (e.g., ext4) or a distributed store (e.g., HDFS, Amazon S3) having an interface such as a file system. Depending on the exact interface of the file system, the collector periodically scans the file system and compares it to a list of existing files, or a notification mechanism (eg S3 bucket logging) built into the interface By using it, new files can be detected.
定期的なスナップショット
ソースデータが、関係データベース(例えば、MySQL、PostgreSQL、Oracle等)またはNoSQLストア(例えば、MongoDB、CouchDB等)など、ファイルシステム以外の既存のデータストアに記憶されている場合、コレクタは、内蔵スナップショット機構を利用することができる。大抵のデータストアは、データを、ファイルシステムまたは他のプロセスにエクスポートする機構をサポートしている。例えば、PostgreSQLは、SQL COPYコマンドをサポートしており、pg_dumpという名の外部ユーティリティを利用可能である。この機構を用いると、新たなレコードを採集するために、ソースデータのダンプを定期的に行うことができる。スナップショットは、リモートプロシージャコールを介してコレクタによって、または、ユーザによって開始することができる。全てそろったスナップショットを撮ると、個々のレコードは、複数のスナップショットに現れ得る。このような重複レコードは、ソース固有の主キーを用いるなどして、または、全てそろったレコードが別々であることが確かな場合、比較の目的で、そのレコード全体に対してハッシュ関数を用いることによって、識別、無視してよい、
複製ログ
If the regular snapshot source data is stored in an existing data store other than a file system, such as a relational database (eg MySQL, PostgreSQL, Oracle etc) or a NoSQL store (eg MongoDB, CouchDB etc) Can utilize the built-in snapshot mechanism. Most data stores support mechanisms for exporting data to file systems or other processes. For example, PostgreSQL supports the SQL COPY command, and an external utility named pg_dump is available. Using this mechanism, dumping of source data can be performed periodically to collect new records. The snapshot can be initiated by the collector via remote procedure call or by the user. Taking a complete snapshot, an individual record can appear in multiple snapshots. Such duplicate records should use a hash function on the entire record for comparison purposes, such as using a source-specific primary key, or if it is certain that all the records are separate. By identification, may be ignored,
Replication log
複製をサポートする多くのデータストアは、複製されたものが同期されたままであることを保証するのに用いられる操作ログを維持する。このログに外部からアクセスできる場合、コレクタは、ログを用いて新しいデータを直接見つけてよい。例えば、MongoDBは、oplog(操作ログ)を公開している。oplogには、標準MongoDB APIを用いてクエリすることができ、データベースにおける、あらゆる挿入、更新、及び、削除操作についてのエントリを含む。このログを読み取ることによって、監視プロセスは、採集が必要な新しいレコードを識別することができる。
データ抽出
Many data stores that support replication maintain an operation log that is used to ensure that what is replicated remains synchronized. If the log is accessible externally, the collector may use the log to find new data directly. For example, MongoDB publishes oplog (operation log). The oplog can be queried using the standard MongoDB API and includes entries for any insert, update, and delete operations in the database. By reading this log, the monitoring process can identify new records that need to be collected.
Data extraction
新しいソースデータを検出した時点で、そのデータを採集プロセスに送る方法が幾つかある。データが既にファイル内にある場合、採集プロセスは、単に、ファイルを開いて、データを直接読み取ることができる。ファイルがネットワークにある場合、HDFS(Hadoop分散ファイルシステム)のようなネットワークファイルシステムを用いて、ネットワークを通して遠隔で開いてよい。 Once new source data is detected, there are several ways to send that data to the collection process. If the data is already in the file, the collection process can simply open the file and read the data directly. If the file is on a network, it may be opened remotely over the network using a network file system such as HDFS (Hadoop Distributed File System).
データがまだファイルシステム内にない(例えば、データが複製ログに由来している)場合、コレクタは、新しいレコードを含む1つまたは複数の中間ファイルを作成することができる。これらのファイルは、従来のファイルシステム、または、HDFSもしくはAmazon S3等の分散ストアに記憶してよい。ファイルは、作成されると、上記のようにロードすることができる。 If the data is not yet in the file system (eg, the data is from a duplicate log), the collector can create one or more intermediate files containing new records. These files may be stored in a conventional file system or distributed store such as HDFS or Amazon S3. Once the file is created, it can be loaded as described above.
コレクタは、プロセス間通信(IPC:inter−process communication)またはリモートプロシージャコール(RPC)機構を用いて、採集プロセスに直接、データを送ることも可能である。こうすると、採集プロセスは、新しいデータの処理を、そのデータのファイルへの書き込みを待つことなく、開始することができ、データの別個のコピーを維持する必要もなくなる。データのバックアップがあることが望ましい状況(例えば、ソースに一度しかアクセスできない場合など)においては、データを採集プロセスに直接送って、非同期で、バックアップファイルに書き込むことができる。このバックアップは、採集プロセス中にエラーが起きた場合、回復に用いることができる。 Collectors can also send data directly to the collection process using inter-process communication (IPC) or remote procedure call (RPC) mechanisms. In this way, the harvesting process can begin processing new data without waiting to write the data to a file, and it is not necessary to maintain separate copies of the data. In situations where it is desirable to have a backup of the data (eg, if the source is accessed only once), the data can be sent directly to the collection process and asynchronously written to the backup file. This backup can be used for recovery if an error occurs during the harvesting process.
統計
スキーマ推論ステップは、ソースデータを全て処理することが必要なので、データをさらにパスすることなく、このプロセス中、統計を計算することができる。統計は、ETLの忠実度の強化を含む、多くの利益を提供し得る。
スキーマ属性に関する統計
Statistics Since the schema inference step needs to process all the source data, statistics can be calculated during this process without passing the data further. Statistics can provide many benefits, including enhancing ETL fidelity.
Statistics on schema attributes
統計の第1のクラスは、ソースデータ内の累積スキーマの個々の属性から計算できる。最初に、各属性及び型がデータ内に現れる頻度を追跡することができる。これは、多くの理由で有用であると思われる。例えば、上記のように、マップ装飾のヒューリスティックスは、ある属性が、その属性を含むオブジェクトの頻度に対して、現れる頻度に基づいている。 The first class of statistics can be calculated from the individual attributes of the cumulative schema in the source data. First, we can track how often each attribute and type appears in the data. This appears to be useful for many reasons. For example, as described above, the map decoration heuristics are based on how often an attribute appears relative to the frequency of the object that contains that attribute.
頻度は、また、型に基づいた決定を行うために、そして、型の競合の解決に用いることができる。型情報を用いて、物理的なストレージの決定を最適化することができる。例えば、32ビット及び64ビットの整数と、浮動小数点の型と、を区別するために、数値型を追跡し、使用することができる。これらの各型は、異なる量のストレージスペースを必要とし得るので、どの型が適用可能かを決定することによって、最小の必要空間を割り当てることが可能になる。 Frequency can also be used to make type-based decisions and to resolve type conflicts. Type information can be used to optimize physical storage decisions. For example, numeric types can be tracked and used to distinguish between 32-bit and 64-bit integers and floating-point types. Each of these types may require a different amount of storage space, so determining which type is applicable makes it possible to allocate minimal space requirements.
別々の型を有するソースデータ内に同じ属性が複数回、現れるとき、型多様性が生じる。上記のスキーマ推論機構及びインデックスストアは、型多様性を完全にサポートするが、一部のケースでは、あるフィールドの多様性が望まれない場合がある。例えば、単一の属性が、レコードの99.9%に整数として現れ、他の0.1%に文字列として現れる場合、文字列型のレコードは、誤っているかもしれない。例えば、文字列型のレコードは、データエントリもしくは検証時のエラーを示すかもしれず、ソースデータの破損を示すかもしれない。これらの外れ値のレコードは、ユーザの注意をひくようにしてよく、及び/または、ヒューリスティックスに基づいて自動的に型変換してよい。例えば、レコードの1%未満が、異なる型である場合、それらのレコードは、優勢な型に変換してよく、このイベントを記し、オプションで、型変換されたソースデータを表すETLプロセスのためのログエントリを作成してよい。 Type diversity occurs when the same attribute appears multiple times in source data having different types. While the above schema inference mechanism and index store fully support type diversity, in some cases, some field diversity may not be desired. For example, if a single attribute appears as an integer in 99.9% of the records and as a string in the other 0.1%, records of type string may be erroneous. For example, string type records may indicate errors in data entry or validation, and may indicate corruption of source data. These outlier records may be made to draw the user's attention and / or may be retyped automatically based on heuristics. For example, if less than 1% of the records are of a different type, those records may be converted to a predominant type, note this event, and, optionally, for an ETL process that represents typed source data May create log entries.
下記のJSONレコードの例を考える。
{"id": 12345678, "location": "Saratoga, CA", "tags":
["urgent", "direct"]}
{"id": "12345678", "location": "San Francisco, CA", "source"
"iPhone"}
Consider the following JSON record example.
{"id": 12345678, "location": "Saratoga, CA", "tags":
["urgent", "direct"]}
{"id": "12345678", "location": "San Francisco, CA", "source"
"iPhone"}
これらのレコードから推論された累積スキーマは、下記のようになり得る。
{
"id" : "string",
"id" : "number",
"location" : "string",
"source" : "string",
"tags" : ["string"]
}
The cumulative schema inferred from these records may be as follows:
{
"id": "string",
"id": "number",
"location": "string",
"source": "string",
"tags": ["string"]
}
累積スキーマは、累積スキーマの各属性と型をカウントに関連付けるJSONスキーマで、ラップしてよい。例えば:
{
"type": "object",
"count" : 2,
"properties" : {
"id" : {
"type" : [
{"type": "string", "count": 1},
{"type": "int32", "count": 1},
〕
}"
location" : {
"type": "string",
"count": 2
},
"source" : {
"type": "string"
"count": 1
},
"tags" : {
"type": "array"
"count": 1
"items" : {
"type": "string",
"count": 2
}
}
}
}
The cumulative schema may be wrapped with a JSON schema that associates each attribute and type of cumulative schema with a count. For example:
{
"type": "object",
"count": 2,
"properties": {
"id": {
"type": [
{"type": "string", "count": 1},
{"type": "int32", "count": 1},
]
} "
location ": {
"type": "string",
"count": 2
},
"source": {
"type": "string"
"count": 1
},
"tags": {
"type": "array"
"count": 1
"items": {
"type": "string",
"count": 2
}
}
}
}
idは、一度は文字列として現れ、一度は32ビット整数として現れるので、各型は、カウント1でリストされるが、ルートオブジェクトのカウントは2であることに留意する。さらに、tags配列は、一度現れるので、カウントは1であるが、2つの文字列項目を含むので、項目フィールドは、カウント2である。レコードの各属性の頻度は、型付けプロセス中、計算することができ、複数の属性のカウントは、単純に追加することができる。追加は、結合的で可換的なので、このプロセスは、並列で行うことができる。カウントは、別々のデータストリームに関して、独立して維持することができ、マージしてグローバル統計を計算することができる。 Note that each type is listed with a count of one, but the count of the root object is two, since id appears once as a string and once as a 32-bit integer. Furthermore, since the tags array appears once, the count is one, but the item field is count two because it contains two string entries. The frequency of each attribute of the record can be calculated during the typing process, and the count of multiple attributes can be simply added. Because the addition is associative and commutative, this process can be done in parallel. The counts can be maintained independently for separate data streams and can be merged to calculate global statistics.
他の統計は、結合的及び可換的な方法で計算され得る限り、同じように各属性と関連付けることができる。例えば、文字列属性の平均的長さなどの統計や、別の型(日付など)を表す文字列値がどれくらいの頻度で現れるかなどを追跡することができる。平均に関しては、合計とカウントは、別に維持され、全てのデータが集計された時点で割り算が行われる(割り算は、結合的でも可換的でもないからである)。 Other statistics can be associated with each attribute as well, as long as they can be calculated in a joint and commutative way. For example, statistics such as average length of string attributes, and how often string values representing different types (such as dates) appear can be tracked. With regard to the mean, the sum and count are kept separately, and division is performed when all data have been aggregated (since the division is neither associative nor commutative).
値に関する統計
例えば、各キーが現れる頻度など、ソースデータのスキーマに関する統計の収集に加えて、特定の属性に関連付けられた値の統計をとることができる。これらの統計は、クエリ最適化、データ発見、及び、異常検出を含む、様々なアプリケーションに用いることができる。関心のある統計は、属性の型に応じて決まる。数値属性については、これらのメトリクスは、最低値及び最大値などの基本的な統計的尺度と、分散の平均や標準偏差と、を含んでよい。並列処理を可能にするために、統計は、可換的かつ結合的な操作を用いて収集することができるように、選択してよい。
Statistics on Values In addition to collecting statistics on the schema of the source data, such as the frequency with which each key appears, statistics on the values associated with specific attributes can be taken. These statistics can be used in a variety of applications, including query optimization, data discovery, and anomaly detection. The statistics of interest depend on the type of attribute. For numerical attributes, these metrics may include basic statistical measures such as minimum and maximum values, and the mean and standard deviation of the variance. Statistics may be selected so that they can be collected using commutative and joint operations to enable parallel processing.
分散のヒストグラムを含む、スカラ値に関するより高度な統計を、必要に応じて維持することができる。ある程度の量のエラーは容認できるというシナリオにおいては、計算より安価な近似アルゴリズムを用いることができる。例えば、HyperLogLogアルゴリズムを用いて、カラムの近似濃度(異なった値の数)を計算することができ、Q−Digestアルゴリズムを用いて、近似量を計算すことができる。値に関する統計は、プロパティに関する統計と同じように計算することができる。型推論中は、型を決定するために各値を分析し、同時に、統計をまとめることができる。ローカル統計は、メモリに保持することができ、グローバル統計とマージして、メタデータストアにスキーマと共に記憶することができる。大量の状態を保持する統計は、アクセス性能向上のために、オプションで、インデックスストアもしくは専用の統計ストアなどの別のストアに記憶してもよい。 More advanced statistics on scalar values can be maintained as needed, including histograms of variance. In scenarios where some amount of error is acceptable, an approximation algorithm that is less expensive than computation can be used. For example, the HyperLog Log algorithm can be used to calculate the approximate concentration (number of different values) of the column, and the Q-Digest algorithm can be used to calculate the approximate amount. Statistics on values can be calculated in the same way as statistics on properties. During type inference, each value can be analyzed to determine the type and statistics can be compiled at the same time. Local statistics can be kept in memory, merged with global statistics, and stored with the schema in the metadata store. Statistics that hold a large amount of state may optionally be stored in another store, such as an index store or a dedicated statistics store, to improve access performance.
レコード全体に関する統計
一部の統計は、単一の属性または値ではなく、複数の属性に基づいている。よくある例の1つは、どのカラムが頻繁に一緒に発生するかを識別することである。例えば、ログデータに基づいたソースは、同じストリームの別々の型のレコードを組み合わせてよい。下記のJSONレコードが一実施例である。
{"user": "mashah", "err_num": 4,
"err_msg": "Connection error."}
{"user": "lstavrachi", "session_time": 23,
"OS": "Mac OS X"}
{"user": "mashah", "session_time": 17,
"OS": "Windows 7"}
{"operation": "update", "duration": 10,
"frequency": 3600}
Statistics on the Entire Record Some statistics are based on multiple attributes rather than a single attribute or value. One common example is to identify which columns occur frequently together. For example, sources based on log data may combine different types of records of the same stream. The following JSON record is an example.
{"user": "mashah", "err_num": 4,
"err_msg": "Connection error."}
{"user": "lstavrachi", "session_time": 23 ,,
"OS": "Mac OS X"}
{"user": "mashah", "session_time": 17 ,,
"OS": "Windows 7"}
{"operation": "update", "duration": 10,
"frequency": 3600}
一番目ののレコードが、ユーザのエラーを表し、次の2つが、ユーザのセッションを表し、4番目がシステム操作を表す。これらのレコードから累積スキーマを決定し、その累積スキーマを関係スキーマに変換することは、これらのレコードを同じ関係テーブルに組み合わせることである一方、レコードは、異なるイベントを記述しているので、論理的に分けることができる。 The first record represents the user's error, the next two represent the user's session, and the fourth represents system operation. Determining the cumulative schema from these records and converting that cumulative schema into a relationship schema is to combine these records into the same relationship table, while the records describe different events, so it is logical Can be divided into
レコードのグループ間の相違を分析する1つの方法は、隣接行列を記憶することである。ここで、各エントリは、カラム対を表し、その2つのカラムが同じレコードに現れる回数を含む。隣接行列は、カラムの順は関係ないので、上三角行列または下三角行列であってよい。上の実施例では、ユーザローのエントリ、session_timeカラム(同等に、ユーザカラム、session_time row)は、それらの属性が両方とも、2つのレコードに現れるので、2を含むことになり、ユーザローのエントリ及び操作カラムは、それらの属性がデータセットに一緒に現れないので、0を含むことになる。 One way to analyze the differences between groups of records is to store the adjacency matrix. Here, each entry represents a column pair, and includes the number of times the two columns appear in the same record. The adjacency matrix may be an upper triangular matrix or a lower triangular matrix because the order of the columns does not matter. In the above example, the user row entry, session_time column (equivalently, the user column, session_time row) will contain 2 as both of its attributes appear in two records, so the user row entry And the operation column will contain 0 as their attributes do not appear together in the data set.
隣接行列は、隣接リスト等の様々なフォーマットで記憶されてよく、構文解析されたレコードがメモリにあるとき、更新されてよい。複数の行列は、対応するエントリを合計することによってマージすることができ、よって、並列で計算することができる。行列は、カラムの数の二乗として成長するが、疎らな場合、あまりスペースを使わずに圧縮フォーマットで記憶してよい。他の統計同様、行列は、メタデータストアまたはインデックスストアに記憶することができる。 The adjacency matrix may be stored in various formats, such as an adjacency list, and may be updated when parsed records are in memory. Multiple matrices can be merged by summing corresponding entries, and thus can be calculated in parallel. Matrices grow as the square of the number of columns, but if sparse, may be stored in a compressed format with less space. As with other statistics, matrices can be stored in a metadata store or index store.
隣接行列は、一旦、計算されると、幾つかの方法で関連カラムの識別に用いることができる。行列は、重み付けグラフに対応し、そこでは、ノードは属性であり、そのエンドポイントに対応するカラムが一緒にi回現れる場合、辺は、重みiを有する。このグラフのクリークは、あらゆるカラムが他のあらゆるカラムと共に現れるカラムのセットを表す。上記の実施例は、下記のクリークを含む。
("user", "err_num", "err_msg")
("user", "session_time", "OS")
("operation", "duration", "frequency")
The adjacency matrix, once calculated, can be used to identify relevant columns in several ways. The matrix corresponds to a weighting graph, where the nodes are attributes and the edge has a weight i if the columns corresponding to that endpoint appear i times together. The cliques in this graph represent the set of columns in which every column appears with every other column. The above example includes the following cliques:
("user", "err_num", "err_msg")
("user", "session_time", "OS")
("operation", "duration", "frequency")
これらは、役に立つことには、3つの別個のイベント型に対応し、ユーザに提示することができ、または、自動データ変換に用いることができる。これらのクリークは、標準グラフアルゴリズムを用いて計算することができ、そのアルゴリズムは、クリークの各辺が少なくとも最小の重みを有するように構成することができる。 These correspond in useful ways to three separate event types, which can be presented to the user or used for automatic data transformation. These cliques can be calculated using standard graph algorithms, which can be configured such that each side of the clique has at least a minimum weight.
関連カラムをより広いビューでとらえるために、上記グラフ内の全ての接続された構成要素をグループ化することができる。言い換えれば、間に経路のある2つの属性はいずれも、組み合わせて単一のグループにすることができる。上記実施例では、下記の2つのグループが作られる。
("user", "err_num", "err_msg", "session_time", "OS")
("operation", "duration", "frequency")
All connected components in the graph can be grouped to capture related columns in a wider view. In other words, any two attributes with paths in between can be combined into a single group. In the above embodiment, the following two groups are formed.
("user", "err_num", "err_msg", "session_time", "OS")
("operation", "duration", "frequency")
err_numとOSは、エラーレコードとセッションレコードの両方が、userフィールドを有するので、同じ接続された構成要素内に現れるが、同じクリーク内には現れないことに留意する。関連カラムのこのゆるい概念は、大きな無関連のデータのセットを大まかに分けるために有用であると思われる。 Note that err_num and the OS both appear in the same connected component but not in the same clique because both error records and session records have a user field. This loose notion of related columns seems to be useful for roughly separating large unrelated sets of data.
上記の隣接行列は、各レコードのスキーマのみに基づいているが、一定の値をカラムの有無と相関させることが望ましい場合がある。無関連のレコードが、異なるスキーマを有する1つの状況は、例えば、各レコードがレコードの型を識別する明示的な属性(例えば、event_id)を含む場合である。上記実施例においては、ユーザエラーは、1のevent_id、ユーザセッションは、2のevent_id、システム操作は、3のevent_idを有し得る。event_idの意味を決定(または、ユーザが示す)ことができる場合、event_idを用いて、イベント型によって属性を分離することができる。この場合、各event_id値について、全てのレコードのスキーマを、そのevent_id値とマージすることによって、別個の累積スキーマを維持することができる。event_idによってデータソースを分割するプロセスは、「シュレッディング(shredding)」と呼ばれ、以下に記載する。 Although the above adjacency matrix is based solely on the schema of each record, it may be desirable to correlate certain values with the presence or absence of columns. One situation where unrelated records have different schemata is, for example, if each record contains an explicit attribute (eg event_id) that identifies the type of record. In the above example, the user error may have an event_id of 1, the user session may have an event_id of 2, and the system operation may have an event_id of 3. If the meaning of event_id can be determined (or indicated by the user), event_id can be used to separate attributes by event type. In this case, for each event_id value, it is possible to maintain a separate cumulative schema by merging the schemas of all the records with that event_id value. The process of dividing a data source by event_id is called "shredding" and is described below.
インデックスストアを用いた非同期統計
上記統計は、一般的に並列で計算することができる一方、一部の統計は、一旦、全てのデータを準備しなければ、計算するのは難しい(例えば、メジアンやモード)。これらの統計は、インデックスストアのクエリ機能を用いてデータのロード完了した後、計算してよい。これには、大量のデータのスキャンが必要になり得るので、インデックスストアがアイドル状態のときに、非同期で行ってよい。
Asynchronous Statistics with Index Store While the above statistics can generally be calculated in parallel, some statistics are difficult to calculate once all the data has been prepared (eg median or mode). These statistics may be calculated after the data loading is complete using the index store's query function. This may require scanning a large amount of data, so it may be done asynchronously when the index store is idle.
エラー統計
レコードにとって有益であり得る統計の別のクラスは、エラー統計である。採集中、データ自体またはシステム操作で遭遇し得る多くの異なる種類のエラーがある。例えば、これらは、入力データ解凍に関するエラー、入力ファイルフォーマットのエラー、特定のレコードの構文解析エラー、文字列符号化のエラー(例えば、UTF−8)、ロックされたファイルを開こうとしてのエラー、及び、ネットワークを介したソースデータへのアクセスのエラーを含んでよい。これらの統計に関する情報は、メタデータストアに保持することができ、必要に応じて、ユーザ及び/またはアドミニストレータに送ることができる。
Error Statistics Another class of statistics that may be useful for records is error statistics. During collection, there are many different types of errors that may be encountered in the data itself or system operation. For example, these are errors related to input data decompression, input file format errors, specific record parsing errors, string encoding errors (eg UTF-8), errors trying to open locked files, And errors in access to source data through the network. Information about these statistics can be kept in a metadata store and can be sent to users and / or administrators as needed.
インデックスストア内の中間ストレージ
採集したデータは、記憶及びクエリを容易にする、上記のBigIndex(BI)、ArrayIndex(AI)及びRowIndex(RI)を含み得るインデックスのコレクションに記憶することができる。インデックスストアに、ユーザは直接クエリを行うことができるが、インデックスストアは、別のシステムをロードするプロセス中に、中間ストアとして用いることもできる。この欄は、ETLプロセスのための中間ストアとしてのインデックスストアの使用を記述する。
Intermediate Storage in Index Store The collected data can be stored in a collection of indexes that may include BigIndex (BI), ArrayIndex (AI) and RowIndex (RI) above, which facilitates storage and querying. The index store can be queried directly by the user, but the index store can also be used as an intermediate store during the process of loading another system. This column describes the use of the index store as an intermediate store for the ETL process.
バルクエクスポート
インデックスストアをETLの中間ストレージ領域として用いる際、インデックスストアからのバルクデータの効率の良いエクスポートが重要である。例えば、ハードディスクドライブ(特に、磁気ドライブ)を用いるとき、データの大きいチャンクを連続して読み取ることによって、シーク待ち時間を避けて、最大帯域幅を達成するのが、より効率的である。
Bulk Export When using an index store as an intermediate storage area for ETL, efficient export of bulk data from the index store is important. For example, when using hard disk drives (especially magnetic drives), it is more efficient to avoid seek latency and achieve maximum bandwidth by reading large chunks of data sequentially.
ハードディスクドライブのように連続的にアクセスされる媒体について、所与のピーク性能比(f)を決定してよい。ディスクのシーク待ち時間を(L)、持続的な連続帯域幅(sustained sequential bandwidth)を(B)とすると、求められるピーク性能比を達成するためにシーク毎に読み取る必要のあるバイト数(N)は、以下のように計算できる。
N = ( f / (1-f) ) * L * B
For media that are continuously accessed, such as hard disk drives, a given peak performance ratio (f) may be determined. Given the seek latency of the disk (L) and sustained sustained bandwidth (B), the number of bytes that need to be read per seek (N) to achieve the required peak performance ratio Can be calculated as follows.
N = (f / (1-f)) * L * B
例えば、100MB/秒の持続帯域幅と、平均シークあたり待ち時間10ミリ秒のディスクを考える。90%のピーク性能(f=.9)を達成するためには、
N = (.9 / (1 - .9)) * 10 ms/seek * 100 MB/s
N = 9 MB/seek
For example, consider a disk with a sustained bandwidth of 100 MB / s and a 10 ms latency per seek. To achieve 90% peak performance (f = .9)
N = (.9 / (1-.9)) * 10 ms / seek * 100 MB / s
N = 9 MB / seek
従って、指定の比の性能を達成するためのゴールは、少なくとも9MBの順次バーストでデータを読み取ることである。データのターゲットが、ディスクベースのシステムである場合、ターゲットの書き込み性能に基づいて、同じ式が当てはまる。 Thus, the goal to achieve a specified ratio of performance is to read the data in sequential bursts of at least 9 MB. If the target of data is a disk based system, the same formula applies, based on the write performance of the target.
概念上は、インデックスストアからのデータのエクスポートは、ロー毎にまたはカラム毎に行うことができる。モードの選択は、宛先データストアの能力に応じて決まる。カラムをエクスポートするとき、BI、AIまたはMI(これらはそれぞれ、最初に、カラムによってソートされ、次に、タプルIDによってソートされてよい)から広範囲のソートされたデータがエクスポートされてよい。要求されたタプルが一旦ソートされると、各カラムについて、少なくとも9MBのタプルを読み取る必要がある。効率を良くするために、1つのカラムからの全てのタプルは、次のカラムに移動する前に、読み取られ、出力に書き込まれてよい。 Conceptually, exporting data from the index store can be done row by row or column by column. The choice of mode depends on the capabilities of the destination data store. When exporting columns, a wide range of sorted data may be exported from BI, AI or MI (each of which may first be sorted by column and then sorted by tuple ID). Once the requested tuples are sorted, at least 9 MB of tuples need to be read for each column. For efficiency, all tuples from one column may be read and written to the output before moving to the next column.
ローをエクスポートするとき、少なくとも2つの選択肢がある。RIが利用可能な場合、要求されたデータは、RIでタプルIDによってソートされ、ソート順で読み取ることができる。RIもソート順で記憶されるので、これによって、ディスクに順次アクセスする。次に、出力システムに合わせて適切にローをフォーマットする必要がある。 When exporting rows, there are at least two options. If RI is available, the requested data can be sorted by Tuple ID in RI and read in sorted order. Since RIs are also stored in the sort order, this sequentially accesses the disk. Next, we need to format the rows appropriately for the output system.
RIをエクスポートに使用しない場合、ローは、例えば、BI、AI及びMIから構築されてよい。効率性のために、大きいチャンクのデータを、一度に、BI、AI及びMIの各カラムから読み取る。出力ローを生成するために、所与のローについてデータを各出力カラムから読み取った後、ローを生成することができる。 If RI is not used for export, rows may be constructed from BI, AI and MI, for example. For efficiency, large chunks of data are read at one time from the BI, AI and MI columns. Rows can be generated after reading data from each output column for a given row to generate an output row.
十分なRAMがあれば、各カラムのNメガバイトのチャンクは、RAMに読み取ることができ、そして、ローを出力することができる。カラムが圧縮される場合、メモリを節約するために、カラムは、可能な程度まで圧縮したままでよい。さらに、データが書き出されると、メモリは、リアルタイムで解放されてよい。1つのカラムのNメガバイトのチャンクは、別のカラムのNメガバイトのチャンクと同数のタプルを有する可能性は低い(特に、圧縮を使用しているとき)。従って、1つのカラムのタプルが別のカラムのタプルの前に枯渇することになるので、各カラムのチャンクは、独立して、フェッチされる必要があり得る。ディスクの待ち時間を最小にするために、プリフェッチを採用することができる。しかし、プリフェッチ及び部分解凍は両方とも、変換の必要メモリを増やし得る。 If there is enough RAM, N megabytes chunks of each column can be read into RAM and can output low. If the column is compressed, the column may remain compressed to the extent possible to save memory. Furthermore, memory may be released in real time as data is written out. An N-megabyte chunk in one column is unlikely to have the same number of tuples as an N-megabyte chunk in another column (especially when using compression). Thus, the chunks of each column may need to be fetched independently, as the tuples of one column will be depleted before the tuples of another column. Prefetching can be employed to minimize disk latency. However, both prefetching and partial decompression can increase the memory required for conversion.
BI、AI及びMIからのローのバルクエクスポートについての疑似コードの例である。
create a cache for each column,
this cache caches data for a tid with a
replacement policy geared towards streaming
and implements prefetching.
for tid in output_touple_ids:
start building new touple
for each column of this touple:
lookup tid in cache
if tid present
evict tid to optimize for streaming
check for free space in this cache,
if ample free space,
prefetch the next block
if tid not present,
fetch the block of data containing the tid from
the AI,
if necessary,
decompress chunk containing datum
add datum to touple
add touple to output buffer
if output buffer is full,
send output to destination
An example of pseudo code for bulk export of rows from BI, AI and MI.
create a cache for each column,
this cache caches data for a tid with a
replacement policy geared towards streaming
and implements prefetching.
for tid in output_touple_ids:
start building new touple
for each column of this touple:
lookup tid in cache
if tid present
evict tid to optimize for streaming
check for free space in this cache,
if ample free space,
prefetch the next block
if tid not present,
fetch the block of data containing the tid from
the AI,
if necessary,
decompress chunk containing datum
add datum to touple
add touple to output buffer
if output buffer is full,
send output to destination
システムが、RAMを制限している場合、変換は、複数のパスで行うことができる。ここで、各パスは、できるだけ多くのカラムチャンクを読み取り、部分的なロー出力チャンクを生成し、それらはディスクに記憶される。そうすると、部分的なロー出力チャンクは、カラムのように扱うことができ、プロセスは、全てのローが出力されるまで、繰り返すことができる。 If the system has limited RAM, the conversion can be done in multiple passes. Here, each pass reads as many column chunks as possible, producing partial raw output chunks, which are stored on disk. Then, partial row output chunks can be treated like columns, and the process can be repeated until all the rows have been output.
例えば、図15を参照すると、カラムA、B、C、Dを含むインデックスの、不揮発性ストレージ1580(例えば、ハードディスクドライブ上)の配置例が示されている。あるローをエクスポートするために、カラムA、B、C、Dのそれぞれからのデータが要求される。不揮発性ストレージ1580の各カラムからの単一のカラム値の読み取りは、シークタイム及びアクセスタイムに大きなペナルティとなり得る。その読み取りに代えて、各カラムのチャンクをメモリに読み取ることができる。これを単純化して例示すると、不揮発性ストレージ1580の各カラムには、1024個のエントリがある。メモリ1584(揮発性のダイナミックランダムアクセスメモリであってよい)には、512個のエントリが入る余地がある。よって、カラムA、B、C、Dのそれぞれに対する128個のエントリが、次に、不揮発性ストレージ1580からメモリ1584に読み取られる。
For example, referring to FIG. 15, an example arrangement of non-volatile storage 1580 (eg, on a hard disk drive) of an index including columns A, B, C, D is shown. In order to export a row, data from each of columns A, B, C, D is required. Reading a single column value from each column of
4つの読み取りのそれぞれが完了すると、それぞれ、4つのカラムA、B、C、Dのそれぞれからのエントリを含む、128のローをエクスポートすることができる。様々な実装において、各カラムのエントリのサイズは異なってよい。従って、メモリ1584内のストレージスペースは、多くのエントリを記憶するカラムが多くのスペースを与えられるように、カラム間で不均等に分けられてよい。こうすることによって、各カラムについて、ほぼ同数のエントリを記憶することができる。あるいは、メモリ1584は、カラム間で等しくストレージを割り当ててよい。その結果、多くのエントリを記憶するカラムは、メモリ1584内に、一度に記憶されるエントリが少なくなる。従って、ローがエクスポートされていくにつれて、これらのカラムからの新しいデータは、エントリの少ないカラムより早く、メモリ1584にロードされる必要がある。
Upon completion of each of the four reads, 128 rows can be exported, each containing an entry from each of the four columns A, B, C, D. In various implementations, the size of the entries in each column may be different. Thus, storage space in
インデックスストア管理
インデックスストアは、スナップショット、回復、サイズ変更、及び、移行など、様々な管理機能をサポートするように構成されてよい。これらの機能は、インデックスストアの書き込みと、Linux(登録商標)論理ボリュームマネージャ(LVM)等の基礎的システム技術の利用との、適切なオーケストレーションによって、実装することができる。
Index Store Management Index stores may be configured to support various management functions such as snapshot, recovery, resizing, and migration. These functions can be implemented by appropriate orchestration of writing index stores and using underlying system technologies such as Linux® Logical Volume Manager (LVM).
インデックスストアのスナップショットは、インデックスストアをクローンするために、または、回復を支援するために、バックアップに使用することができる。スナップショットは、書き込みのバッファリングを開始し、インデックスストアをディスクにフラッシュし、ファイルシステムまたはボリュームマネージャ内の基礎的スナップショットファシリティを使用し、そして、書き込みを適用することによって、達成することができる。さらに、LevelDB等のアーキテクチャに基づいたシステムでは、書き込みをバッファリングする代わりに、システムが、データを圧縮し、スナップショットの部分として、下位レベルにマークを付け、それら下位レベルがさらに圧縮されないようにし、下位レベルを含むファイルをコピーし、そして、圧縮を再度有効にするこができる。 Index store snapshots can be used for backup to clone the index store or to aid recovery. A snapshot can be achieved by starting buffering of writes, flushing the index store to disk, using the underlying snapshot facility in the file system or volume manager, and applying the writes . Furthermore, in systems based on an architecture such as LevelDB, instead of buffering writes, the system compresses the data and marks lower levels as part of a snapshot so that those lower levels are not further compressed. You can copy files containing lower levels, and re-enable compression.
回復は、基礎的なシステムに従ってバックアップデータをリストアし、インデックスストレージサービスを開始し、そして、リストアされたデータを指摘するようにメタデータサービスを更新することによって、達成される。記憶されたタプルIDのセットは、スナップショットが撮られる時に、メタデータサービスに記録され、スナップショットがリストアされる時にリストアされる。スナップショットからのリストアの後、欠けているデータは、全てのタプルIDのセットと、回復されたインデックスストアに記憶されたタプルIDのセットとを比較することによって、決定することができる。 Recovery is accomplished by restoring backup data according to the underlying system, starting an index storage service, and updating the metadata service to point out the restored data. The stored set of tuple IDs is recorded in the metadata service when a snapshot is taken and restored when the snapshot is restored. After restoration from a snapshot, the missing data can be determined by comparing the set of all tuple IDs with the set of tuple IDs stored in the recovered index store.
インデックスストアの縮小は、インデックスストア内の全てのデータを圧縮し、ファイルシステムサイズを小さくし、論理ボリュームサイズを小さくすることによって、達成されてよい。ディスク(または、仮想ディスク)を取り除くための十分なフリースペースがある場合、そのディスク上のデータは、ボリュームグループ内の他のフリースペースに移行することができ、ディスクは、ボリュームグループから取り除くことができ、次に、システムから取り除くことができる。インデックスストアの成長は、必要があれば、ディスクまたは仮想ディスクを追加することによって行ってよい。ディスクが追加された場合、そのディスクは、ボリュームグループに含むことができるので、論理ボリュームサイズを増やし、ひいては、ファイルシステムサイズを増やすことができる。インデックスストアの一部の実装においては、ファイルシステムは用いなくてもよく、その場合、インデックスストアは、ファイルシステムに依存する代わりに、サイズ変更操作を実施してよい。一部の実装においては、インデックスストアは、LVMを用いなくてもよく、自身で直接、ディスクを管理することができる。 Index store reduction may be achieved by compressing all data in the index store, reducing the file system size, and reducing the logical volume size. If there is enough free space to remove a disk (or virtual disk), data on that disk can be migrated to other free space in the volume group and the disk can be removed from the volume group It can then be removed from the system. The growth of the index store may be done by adding disks or virtual disks, if necessary. When a disk is added, the disk can be included in the volume group, so the logical volume size can be increased and thus the file system size can be increased. In some implementations of the index store, the file system may not be used, in which case the index store may perform resizing operations instead of relying on the file system. In some implementations, the index store does not have to use LVM, and can directly manage the disk itself.
クラウド環境において、または、サーバメンテナンス中に、インデックスストアを1つのマシンから別のマシンに移行させるのが望ましい。最も簡単なケースは、これをオフラインで行うことである。これは、読み取り及び書き込みをブロックし、インデックスストレージサービスをシャットダウンし、ファイルシステムをアンマウントし、論理ボリュームを無効にし、ディスク(または、仮想ディスク)を新しいマシンに移し、論理ボリュームを再有効化し、ファイルシステムをマウントし、インデックスストレージサービスを再び開始し、そして、メタサービスが所与のインデックスストアが存在する場所を知るようにメタデータサービスを更新することによって、行うことができる。 It is desirable to migrate the index store from one machine to another in a cloud environment or during server maintenance. The simplest case is to do this offline. It blocks reads and writes, shuts down the index storage service, unmounts file systems, deactivates logical volumes, transfers disks (or virtual disks) to a new machine, reactivates logical volumes, and files This can be done by mounting the system, restarting the index storage service, and updating the metadata service so that the metaservice knows where the given index store resides.
オンラインのインデックスストアを移行するために、新しいインデックスストアを立ち上げながら、システムは、書き込みをバッファリングし、古いインデックスストアからの読み取りを行ってよい。次に、データは、古いインデックスストアから新しいインデックスストアにコピーされ、新しいインデックスストアは、アクティブとしてマーク付けされる。次に、読み取りは、新しいインデックスストアに向けられて、最後に、バッファリングされた書き込みが適用される。この移行を最適化するために、新しいインデックスストアをスナップショットからリストアすることができる。このようなシナリオにおいては、書き込みはバッファリングされ、インデックスストアの現在の状態と、スナップショットとの間のデルタ(増分)を計算することができる。デルタは、新しいシステムのスナップショットを最新にするために、適用することができる。次に、新しいインデックスストアは、アクティブとマーク付けされ、バッファリングされた書き込みは、新しいインデックスストアに適用される。バッファリング時間を最小にするために、書き込みをバッファリングする前に、複数のデルタを計算、適用することができる。 The system may buffer writes and read from the old index store while launching a new index store to migrate the online index store. Next, data is copied from the old index store to the new index store, and the new index store is marked as active. The read is then directed to the new index store and finally the buffered write is applied. To optimize this migration, new index stores can be restored from snapshots. In such a scenario, the writes can be buffered and the delta (increment) between the current state of the index store and the snapshot can be calculated. Deltas can be applied to update the snapshot of a new system. Next, the new index store is marked as active, and buffered writes are applied to the new index store. Multiple deltas can be calculated and applied before buffering writes to minimize buffering time.
インデックスストア拡張子
系列
1つのデータストアから別のデータストアにデータを移す時、システムを通って移動する各データの系列を追跡可能であるのが望ましい。実施例として、各レコードが復帰改行で分けられたJSONレコードを含むファイルのコレクションを考える。これらのファイルからのデータは、インデックスストアにロードしてよく、インデックスストアからデータウェアハウスにロードされてよい。レコードの系列を維持するために、各レコードは、例えば、各レコードのソースファイル名と行番号を記録することによって、追跡することができる。系列情報は、追加のカラム(またはカラムのセット)として、インデックスストアに記憶することができる。
Index Store Extension Sequences When transferring data from one data store to another, it is desirable to be able to track each sequence of data moving through the system. As an example, consider a collection of files where each record contains a JSON record separated by a carriage return. Data from these files may be loaded into the index store and may be loaded from the index store into the data warehouse. In order to maintain a sequence of records, each record can be tracked, for example, by recording the source file name and line number of each record. Series information may be stored in the index store as additional columns (or sets of columns).
これらの追加カラムも、データウェアハウスにロードされてよい。こうすると、エンドユーザは、レコードの元のソースを見つけることができる。ユーザは、エラーがあるか否かを知ろうとして、または、削除された可能性のある、もしくは、ロードしないと選択された他のデータを見つけようとして、レコードの元のソースを見つけたいかもしれない。システムは、その情報を用いて、データの紛失があるか否かを決定することができる(例えば、ファイルやローによるソートを行い、ファイルまたはローが無くなっているかを見つける)。同様に、また、おそらくは類似の利益を伴って、データが、インデックスストアからデータウェアハウスにロードされる時、追加カラムを作成して、インデックスストアのタプルIDをデータウェアハウスに記録することができる。これによって、システムは、ある種のエラーからの回復が可能になり、インデックスストアとデータウェアハウスとのデータの比較が可能になる。 These additional columns may also be loaded into the data warehouse. In this way, the end user can find the original source of the record. The user may want to find the original source of the record, trying to find out if there is an error or to find other data that may have been deleted or was chosen not to load. Absent. The system can use that information to determine if there is a loss of data (eg, sort by file or row to find out if the file or row is lost). Similarly, and possibly with similar benefits, when data is loaded from the index store into the data warehouse, additional columns can be created to record the index store's tuple ID in the data warehouse . This allows the system to recover from certain errors and allows comparison of data between the index store and the data warehouse.
テンポラル(時間による)/バイテンポラル(2つの時間による)サポート
時間は、多くのシステムにおいて基本的変数である。一部の分析は、時間フィールドの意味を理解するシステムによって、改善される、または、可能になる。オブジェクトの複数のバージョンを保持し、時間を使って、それらのバージョンを区別するデータベースは、テンポラル(時間)データベースと呼ばれることが多い。オブジェクトに適用する時間には複数の概念がある。時間についての2つ一般的概念は、トランザクション時間(TT)と有効時間(VT)である。トランザクション時間は、システムがトランザクションを行った時間である。有効時間は、1つのデータが有効である時点または、時間範囲である。例えば、ある人が住んでいる特定の住所は、その人がそこに住んでいる特定の期間(VT)に関連する。住所がシステムに記録された時は、TTである。
Temporal (by time) / bitemporal (by two times) support time is a fundamental variable in many systems. Some analysis is improved or made possible by a system that understands the meaning of the time field. A database that holds multiple versions of an object and uses time to differentiate between those versions is often referred to as a temporal (time) database. There are multiple concepts of time applied to an object. Two general concepts about time are transaction time (TT) and time to live (VT). Transaction time is the time when the system performed a transaction. The valid time is the time or range of time when one data is valid. For example, a particular address where a person lives may be associated with a particular time period (VT) in which the person lives. When the address is recorded in the system, it is TT.
多くの環境において、データの履歴を見ることできるのは、有利である。履歴データにクエリを行う1つの機構は、クエリAS OFとして、特定の時点を定義することである。システムに、2014年1月31日現在(AS OF)入手可能であった全ての情報に基づいて、質問に応答するよう求めるとする。これらのクエリは、AS OF時以下の最大TTを有するオブジェクトをレビューしてよい。 In many environments, it is advantageous to be able to view the history of data. One mechanism for querying historical data is to define a particular point in time as the query AS OF. Suppose that the system is asked to respond to questions based on all information available as of January 31, 2014 (AS OF). These queries may review objects with maximum TT below AS OF.
他の環境においては、ユーザは、オブジェクトに関する事実が、経時的にどのように変化したかについて知りたい場合がある。ある人の自宅の住所が、それぞれ、異なる有効時間を有する多くのバージョンで、データベースに記録されている場合がある。データベースのユーザが、AS AT特定の時間で、その人の住所のクエリを行いたいとする。このクエリは、VTがAS AT時間を含むオブジェクトをレビューしてよい。 In other circumstances, the user may want to know how the facts about the object changed over time. A person's home address may be recorded in the database in many versions, each with different effective times. A user of a database wants to query the address of a person at a specific time of AS AT. This query may cause VT to review objects that contain ASA Time.
時間の1つの概念(トランザクション時間であることが多い)だけを主にサポートするデータベースは、モノテンポラルと考えられる。トランザクション時間と有効時間の両方など、時間の2つの概念をサポートするデータベースは、バイテンポラルと考えられる。バイテンポラルデータベースは、オブジェクトのバージョンの二次元空間をサポートし、AS OFで特定のTTと、AS ATで特定のVTの両方のクエリを行うことによって、バージョンの絞り込みをサポートする。 A database that primarily supports only one concept of time (often the transaction time) is considered to be monotemporal. A database that supports two notions of time, such as both transaction time and validity time, is considered bitemporal. The bitemporal database supports two-dimensional space of object versions, and supports version narrowing by querying both specific TT with AS OF and specific VT with AS AT.
R木、kd木、及び、Z−ordering(Z順序付け)等の空間的インデックス方法を用いて、N次元空間で互いに近いオブジェクトが、インデックスで互いに近くなるように、多次元に沿ってインデックスを構築することができる。 Construct indexes along multiple dimensions so that objects that are close to each other in N-dimensional space are near each other in index using spatial indexing methods such as R-trees, kd-trees, and Z-ordering (Z-ordering) can do.
インデックスストアの時間性をサポートするために、時間の次元について別のインデックスを作成することができる。このインデックスは、トランザクション時間をタプルidにマップするテンポラル時間インデックス(TTI)であってよい。別のインデックスは、有効時間をタプルidにマップする有効時間インデックス(VTI)であってよい。バイテンポラルシステムは、バイテンポラルインデックス(BTI)内の有効時間とテンポラル時間の両方をタプルidにマップするための空間的インデックスを含んでよい。 In order to support the index store temporality, another index can be created for the time dimension. This index may be a temporal time index (TTI) that maps transaction time to tuple id. Another index may be a valid time index (VTI) that maps valid time to tuple id. A bitemporal system may include a spatial index to map both valid and temporal times in a bitemporal index (BTI) to a tuple id.
更新
上記のインデックスストアは、様々な実装において、バルク挿入またはバルク追加を効率よく処理する。これは、ハードディスクドライブを有するシステム上での、クエリ及び抽出に効果がある。更新及び削除(既存のタプルが何らかの方法で変更されるとき、更新が起こる)を効率よく処理するためには、インデックスストアへの何らかの変更が必要となり得る。これらの更新は、MongoDB及びそのoplog等の何らかの種類のトランザクションストアが行った変更の順序付リストとして、到着してよい。
Update The above index store efficiently handles bulk insertion or bulk addition in various implementations. This is useful for queries and extractions on systems with hard disk drives. Some changes to the index store may be necessary to efficiently process updates and deletes (when an existing tuple changes in some way, updates occur). These updates may arrive as an ordered list of changes made by some type of transaction store, such as MongoDB and its oplogs.
更新を処理する1つの方法は、更新をオブジェクトのインプレース値に適用することである。単一のローの更新は、インデックスストアにおいては高価になり得るので、更新は書き込み最適化ストア(例えば、ローストア)にバッファリングされる。図14を参照すると、書き込み最適化ストア1552が示されている。クエリは、最初に、書き込み最適化ストア内の値を探し、次に、インデックスストアを探す。十分なデータが書き込み最適化ストアにあれば、そのデータをパッケージにして、インデックスストアでバルク更新を行うことができる。
One way to handle the update is to apply the update to the in-place value of the object. Updates are buffered in a write optimized store (e.g., a row store) as single row updates can be expensive in an index store. Referring to FIG. 14, a
更新を処理する別の方法は、入力からレコード/オブジェクトを取り出し、それらを、何らかのキー及びトランザクションレジスタに記録されたトランザクション時間に基づいて、異なるバージョンのレコード/オブジェクトに変換することである。変換されたレコード/オブジェクトは、次に、新しいレコードとして、インデックスストアに追加することができる。宛先ストアがテンポラルな場合、AS OFクエリを用いて、過去のクエリを行うことができる。 Another way to handle updates is to take records / objects from the input and convert them into different versions of records / objects based on some key and transaction time recorded in the transaction register. The converted record / object can then be added to the index store as a new record. If the destination store is temporal, an AS OF query can be used to perform past queries.
データ変換
中間ストアが存在する場合、中間ストアからデータをエクスポートするときに、変換を行うことができる。これによって、異なる宛先に対して異なる変換が可能になり、また、変換を行う前に、良く定義された単一のソースデータ表現の作成をサポートし得る。中間ストアを使用しない場合、各カラムを関係に変換する時に、変換を行ってよい。
Data conversion If an intermediate store exists, conversion can be done when exporting data from the intermediate store. This allows different transformations for different destinations, and may support the creation of a well-defined single source data representation before doing the transformation. If an intermediate store is not used, a conversion may be performed when converting each column to a relationship.
型変換
1つのよくある変換は、値を1つの型から別の型に変換することである。例えば、JSONは、データ型を定義しないので、文字列(例えば、ISO 8601に従って)または数値(例えば、UNIX(登録商標)エポックからの秒で)として、日付を記憶するのが一般的である。宛先が、データ型をサポートしている(大抵の関係データベースはサポートしている)場合、型変換ディレクティブを追加して、値を日付に変換することができる。同様のディレクティブを用いて、適切な文字列を数字に型変換することができる。これらの型変換ディレクティブは、データの予備知識を用いて手動で指定することもでき、スキーマ推論中に収集された統計を用いて自動で推論することもできる。
Type conversion One common conversion is to convert values from one type to another. For example, since JSON does not define data types, it is common to store dates as strings (eg, according to ISO 8601) or numbers (eg, in seconds from a UNIX epoch). If the destination supports data types (most relational databases do), type conversion directives can be added to convert values to dates. Similar directives can be used to cast appropriate strings into numbers. These type conversion directives can also be specified manually using prior knowledge of the data, or automatically inferred using statistics collected during schema inference.
データクリーニング
様々な他のデータクリーニング操作を、エクスポート中に行うことができる。例えば、ある属性があるドメインにあることが分かっている場合(例えば、州コードを表す文字列または郵便番号を表す数字)、値は、省略できるまたは、デフォルトに変換できる。
Data Cleaning Various other data cleaning operations can be performed during export. For example, if an attribute is known to be in a domain (eg, a string representing a state code or a number representing a zip code), the value can be omitted or converted to a default.
データの分割と結合
上記のように、システムは、配列及びマップからのデータを別々のテーブルに分割してよいが、一部のケースでは、ユーザは、関係スキーマに対して追加の制御を望む場合がある。例えば、ユーザは、組み合わせて同じ宛先にしたい複数のソース、または、その逆、を有する場合がある。テーブルを組み合わせるために、ユーザは、結合キーを指定してよく、結合は、エクスポートの前にインデックスストアで行うことができる。
Partitioning and Combining Data As noted above, the system may partition data from arrays and maps into separate tables, but in some cases, when the user wants additional control over the relationship schema There is. For example, a user may have multiple sources that want to be combined into the same destination, or vice versa. To combine the tables, the user may specify a join key, and the join can be done at the index store prior to export.
データを分割するために、別個のテーブルに配置するためのカラムのセットを識別する。グローバルに固有のレコードidを結合キーとして用いることができ、テーブルは、別々にエクスポートされる。これらのカラムは関連する属性セットを識別するために、手動で、または、上記のような統計的方法を用いて指定することができる。 Identify the set of columns to place in a separate table to split the data. Globally unique record ids can be used as join keys, and the tables are exported separately. These columns can be specified manually or using statistical methods as described above to identify the associated attribute set.
シュレッディングと呼ばれる操作によって、単一の属性の値に基づいて、データをテーブルにパーティション化する。これは、単一の属性の値がレコードの型を決定するイベントのようなデータソースについては、特に有用である。どのカラムが各idと関連付けられているかを特定する統計を収集することができ、各レコード型について別個のテーブルをエクスポートすることができる。 Data is partitioned into tables based on the value of a single attribute by an operation called shredding. This is particularly useful for data sources such as events where the value of a single attribute determines the type of record. Statistics can be collected identifying which columns are associated with each id, and separate tables can be exported for each record type.
採集ターゲット
データウェアハウス
ETLプロセスの1つの可能な出力先(または、ターゲット)は、データウェアハウスである。データウェアハウスは、ローフォーマット(例えば、CSV)で出力ファイルのセットを作成することによって、動的スキーマの変更に従ってデータウェアハウスを適合させるための対応する一連のALTER TABLE/COLUMNコマンドと共にロードされてよい。
Collection Target Data Warehouse One possible destination (or target) of the ETL process is a data warehouse. The data warehouse is loaded with a series of corresponding ALTER TABLE / COLUMN commands to adapt the data warehouse according to dynamic schema changes by creating a set of output files in raw format (eg CSV) Good.
Vertica、Greenplum、Aster/Teradata、及び、Amazon Redshiftの製品を含む、分析用に設計された一部データウェアハウスは、異なるカラムを別々に記憶するカラム指向のストレージを用いる。これらのシステムにおいては、新しいカラムの追加は、既存データの修正を必要とせず、より効率が良いと思われる。このようなデータウェアハウスへのファイルのロードは、データウェアハウスがサポートするコマンドを用いて行ってよい。複数の並列ロードを受け入れることができる宛先への供給について以下に記載する。 Some data warehouses designed for analytics, including the products of Vertica, Greenplum, Aster / Teradata, and Amazon Redshift, use column-oriented storage that stores different columns separately. In these systems, adding new columns does not require modification of existing data and seems to be more efficient. Loading files into such a data warehouse may be done using commands supported by the data warehouse. The supply of destinations that can accept multiple parallel loads is described below.
無関係オブジェクトストア
ユーザは、関係ストアの代わりに、オブジェクトストアのロードを選んでよい。データをオブジェクトストアにロードする1つの方法は、求められる出力フォーマットに従って、累積的JSONスキーマを用いて、オブジェクトをシリアライズすることである。
Irrelevant Object Store Users may choose to load the object store instead of the relational store. One way to load data into the object store is to serialize the object using a cumulative JSON schema according to the required output format.
オーケストレーション
ETLプロセスの個々の構成要素は、分散コンピュータ環境内、すなわち、クラウドで、または、プライベートデータセンター内で、スケジュール、及び、実行することができる。スケジューリングは、データソース及び宛先の性質、インデックスストアが用いられているか否か、並びに、求められる並列処理の程度に応じて決まってよい。パイプラインの各段階の状態は、回復、統計、及び、系列をサポートするためにメタデータサービスに記憶されてよい。
The individual components of the orchestration ETL process can be scheduled and run in a distributed computing environment, ie, in the cloud or in a private data center. The scheduling may depend on the nature of the data source and destination, whether an index store is being used, and the degree of parallelism desired. The state of each stage of the pipeline may be stored in a metadata service to support recovery, statistics, and sequences.
ETLプロセスの実施例は、次の構成要素にセグメント化されてよい。すなわち、新しいデータの検出(D)、ソースからデータを抽出(S)、ソースのスキーマを推論(I)、オプションでインデックスストアをロード(L)、累積スキーマを生成(G)、alter tableステートメントの生成(A)、オプションで、中間フォーマットでデータをエクスポート(E)、及び、データを宛先にコピー(C) An embodiment of the ETL process may be segmented into the following components: That is, detect new data (D), extract data from source (S), infer source schema (I), optionally load index store (L), generate cumulative schema (G), alter table statement Generate (A), optionally export data in an intermediate format (E), and copy data to a destination (C)
検出(D)プロセスの実施例は、下記の疑似コードを用いて記述される。
old_metadata = None
while True:
metadata = source.get_metadata()
if old_metadata == metadata:
# nothing new here
sleep if necessary to prevent overwhelming source
continue
# find new stuff
new_stuff = metadata - old_metadata
# build chunks of appropriate size
chunk = new Chunk()
for item in new_stuff:
chunk.add_data(item)
if chunk.big_enough():
mds.record_chunk(chunk)
chunk = new Chunk()
An example of the detection (D) process is described using the pseudo code below.
old_metadata = None
while True:
metadata = source.get_metadata ()
if old_metadata == metadata:
# nothing new here
sleep if necessary to prevent overwhelming source
continue
# find new stuff
new_stuff = metadata-old_metadata
# build chunks of appropriate size
chunk = new Chunk ()
for item in new_stuff:
chunk.add_data (item)
if chunk.big_enough ():
mds.record_chunk (chunk)
chunk = new Chunk ()
インデックスストアを用いた採集プロセスは、データ抽出(S)、スキーマ推論(I)、及び、インデックスストアのロード(L)を含んでよく、それらは合わせてSILと呼ばれる。SILプロセスの例の疑似コードを下記に示す、ここで、インデックスストアは、“ISS”と呼ぶ。
while True:
# Get any unprocessed chunk of source data
chunk = mds.get_any_unprocessed_chunk()
# code below can be in an asynchronous task
cumulative = new Schema()
for record in chunk.read():
schema = get_schema(record)
cumulative.update(schema)
iss.write(record)
iss.commit_chunk()
mds.save_chunk_schema(chunk, cumulative)
The collection process using the index store may include data extraction (S), schema inference (I), and load index store (L), which are collectively referred to as SIL. Pseudo code for an example of the SIL process is shown below, where the index store is called "ISS".
while True:
# Get any unprocessed chunk of source data
chunk = mds.get_any_unprocessed_chunk ()
# code below can be in an asynchronous task
cumulative = new Schema ()
for record in chunk.read ():
schema = get_schema (record)
cumulative.update (schema)
iss.write (record)
iss.commit_chunk ()
mds.save_chunk_schema (chunk, cumulative)
スキーマ生成プロセス(G)の例の疑似コードは下記のようになる。
parent = None
while True:
# get a few committed chunks such that they form a
# reasonable copy size
chunks = mds.get_committed_chunks()
# generate a cumulative schema across loads
cumulative = Schema()
for chunk in chunks:
cumulative.update(mds.get_schema(chunk))
parent = mds.store_new_cumulative(cumulative, chunks,
parent)
The pseudo code of the example of the schema generation process (G) is as follows.
parent = None
while True:
# get a few committed chunks such that they form a
# reasonable copy size
chunks = mds.get_committed_chunks ()
# generate a cumulative schema across loads
cumulative = Schema ()
for chunk in chunks:
cumulative.update (mds.get_schema (chunk))
parent = mds.store_new_cumulative (cumulative, chunks,
parent)
インデックスストアからのエクスポートプロセス(E)の例の疑似コードは下記のようになる。
while True:
cumulative, chunks = mds.get_unexpoeted_schema()
# code below can be in an asynchronous task
# export the new chunks according to the
# cumulative schema
intermediate = new Intermediate()
for record in iss.get_chunks(chunks):
export_data = prepare_output(record, cumulative)
intermediate.append(export_data)
mds.record_schema_export(cumulative, intermediate)
The pseudo code of the example of export process (E) from index store is as follows.
while True:
cumulative, chunks = mds.get_unexpoeted_schema ()
# code below can be in an asynchronous task
# export the new chunks according to the
# cumulative schema
intermediate = new Intermediate ()
for record in iss.get_chunks (chunks):
export_data = prepare_output (record, cumulative)
intermediate.append (export_data)
mds.record_schema_export (cumulative, intermediate)
テーブル変更(alter table)要素(A)及びコピー要素(C)を含む、累積的にACと呼ばれる、プロセスの例の疑似コードは下記のようになる。
while True:
schema, output = mds.get_uncopied_output()
previous = mds.get_parent_schema(schema)
# generate alter table statements
if schema != previous:
difference = schema - previous
warehouse.alter_table(difference)
warehouse.copy_from(output)
Pseudocode for an example of a process, cumulatively called AC, containing the alter table element (A) and the copy element (C) is as follows:
while True:
schema, output = mds.get_uncopied_output ()
previous = mds.get_parent_schema (schema)
# generate alter table statements
if schema! = previous:
difference = schema-previous
warehouse.alter_table (difference)
warehouse.copy_from (output)
インデックスストアを用いず、データが、データソースからターゲットにストリーム配信される場合、プロセス全体は、SIEGCAと呼んでよく、データ抽出(S)、スキーマ推論(I)、データエクスポート(E)、コピー(C)、及び、ターゲットのテーブルの変更(A)を含む。SIEGCAプロセスの例の疑似コードは下記のようになる。
cumulative = new Schema()
intermediate = new Intermediate()
while True:
# Get any unprocessed chunk of source data
chunk = mds.get_any_unprocessed_chunk()
# code below can be in an asynchronous task
for record in chunk.read():
schema = get_schema(record)
if schema != cumulative:
mds.record_schema_export(cumulative,
intermediate)
cumulative.update(schema)
intermediate = new Intermediate()
intermediate.append(record)
iss.write(record)
mds.save_chunk_schema(chunk, cumulative)
If the data is streamed from the data source to the target without using an index store, the whole process may be called SIEGCA, data extraction (S), schema inference (I), data export (E), copying ( C) and change of target table (A). The pseudo code for the example SIEGCA process is as follows:
cumulative = new Schema ()
intermediate = new Intermediate ()
while True:
# Get any unprocessed chunk of source data
chunk = mds.get_any_unprocessed_chunk ()
# code below can be in an asynchronous task
for record in chunk.read ():
schema = get_schema (record)
if schema! = cumulative:
mds.record_schema_export (cumulative,
intermediate)
cumulative.update (schema)
intermediate = new Intermediate ()
intermediate.append (record)
iss.write (record)
mds.save_chunk_schema (chunk, cumulative)
図16A、16Bにおいて、本開示の原理に従った、ETLプロセスの構成要素の並列化の依存関係図を示す。図16Aは、中間インデックスストアの使用を示している。検出プロセス(D)は、6つのサブプロセス1600−1...1600−6に分けて示されている。依存関係は、矢印で示され、ここで、D2 1600−2は、D1 1600−1等に依存している。言い換えれば、D2は、D1がが完了しないと、完了できない。ここで説明が簡単なように記載しているように、依存関係が厳密な場合、D2は、D1が完了するまで、開始することさえできない。これは、D1が完了して、D2に開始点を残すまで、D2は、新しいデータの検出をどこから始めるべきかも分からないからであろう。ほんの一例として、検出サブプロセスD1は、最初の10,000個の新しいオブジェクトを取得するように構成されてよい。サブプロセスD2は、サブプロセスD1が中止した場所から初めて、次の10,000個の新しいオブジェクトを識別する。 16A, 16B illustrate dependency diagrams of parallelization of components of the ETL process, in accordance with the principles of the present disclosure. FIG. 16A illustrates the use of an intermediate index store. The detection process (D) comprises six sub-processes 1600-1. . . It is shown divided into 1600-6. The dependency is indicated by an arrow, where D 2 1600-2 is dependent on D 1 1600-1, etc. In other words, D 2, when D 1 is not is completed, can not be completed. As described here for simplicity, if the dependency is strict, D 2 can not even start until D 1 completes. This is, and D 1 is completed, to leave the starting point to the D 2, D 2 is, probably because do not know whether to start the detection of new data from anywhere. By way of example only, detection subprocess D 1 may be configured to acquire the first 10,000 new object. Sub-process D 2, for the first time from the location where the sub-process D 1 has stopped, identifies the next 10,000 new object.
図16A、16Bに示す依存関係は、一定の状況においては、断たれてよい。例えば、D1及びD2が、別々のデータソース、または、データソースの異なった部分を調べている場合、D2は、D1の完了を待たずに開始してよい。 The dependencies shown in FIGS. 16A, 16B may be broken in certain circumstances. For example, if D 1 and D 2 are looking at different data sources or different parts of data sources, D 2 may start without waiting for D 1 to complete.
抽出プロセス(S)は、サブプロセス1604−1...1604−6を含む。各抽出サブプロセス1604は、各検出ステップ1600に依存する。この依存関係は、ソースから抽出するファイル/オブジェクト/レコードは、検出サブプロセス中に識別されるという事実から生じる。 The extraction process (S) comprises sub-processes 1604-1. . . 1604-6. Each extraction sub-process 1604 depends on each detection step 1600. This dependency arises from the fact that files / objects / records extracted from the source are identified during the detection sub-process.
スキーマ推論は、抽出サブプロセス(S)で抽出されたレコードに関して行われるので、1608−1...1608−6で示す各推論サブプロセス(I)は、各抽出サブプロセス(S)に依存する。推論される(I)各レコードについては、そのレコードは、中間ストレージにロードされる(L)ので、ロードサブプロセス1612−1...1612−6は、それぞれ、各推論サブプロセスに従属する。 Since schema inference is performed on records extracted in the extraction subprocess (S), 1608-1. . . 1608- Each inference subprocess indicated by 6 (I) is dependent on the extraction sub-process (S). For each record that is inferred (I), that record is loaded into intermediate storage (L), so load sub-process 1612-1. . . Each of 1612-6 is subordinate to each inference sub-process.
1616−1...1616−3で示されるスキーマ生成サブプロセス(G)は、以前のスキーマを取得し、1つまたは複数のサブプロセスからの新しく推論されたスキーマを追加して、新しい累積スキーマを生成する。ヒューリスティックを用いて、推論サブプロセスが幾つ、単一のスキーマ生成サブプロセスに供給されるかを決定してよい。図16Aに見られるように、数字は変数であってよい。 1616-1. . . A schema generation sub-process (G), shown at 1616-3, obtains the previous schema and adds the newly inferred schema from one or more sub-processes to generate a new cumulative schema. Heuristics may be used to determine how many inference sub-processes are provided to a single schema-generation sub-process. As seen in FIG. 16A, the numbers may be variables.
抽出サブプロセス1620−1...1620−3は、生成されたスキーマを各生成サブプロセスから受信し、生成サブプロセスに対応するロードサブプロセスからデータを抽出する。抽出サブプロセス1620は、データウェアハウス等のターゲットにロードするための中間ファイルのセットを構築してよい。抽出サブプロセスを含む各サブプロセスは、内部並列化を活用できるように最適化されてよい。 Extraction sub-process 1620-1. . . 1620-3 receives the generated schema from each generation sub-process and extracts data from the load sub-process corresponding to the generation sub-process. The extraction sub-process 1620 may build a set of intermediate files for loading into a target, such as a data warehouse. Each subprocess, including the extraction subprocess, may be optimized to take advantage of internal parallelism.
生成サブプロセスに基づいて、テーブル変更サブプロセス1624−1...1624−3は、ターゲットが、スキーマサブプロセス1616が決定したスキーマの任意の新しいオブジェクトを収容するためのコマンドを生成する。例えば、A2は、任意の追加のオブジェクトがG2によって累積スキーマに追加されたオブジェクトか否かを、G1の後既に存在したオブジェクトと比較して、決定する。ターゲットのためのコマンドは、データ定義言語(DDL:Data Definition Language)ステートメントの形式をとってよい。テーブル変更サブプロセスとしてラベル付けされているが、実際の言語またはステートメントは、特定のステートメント“alter table”を用いなくてもよい。累積スキーマが、テーブル変更サブプロセス1624によってターゲットに反映された時点で、コピーサブプロセス1628−1...1628−3において、データはターゲットにコピーされる。 Table modification sub-process 1624-1. . . 1624-3, the target generates a command to accommodate any new objects of the schema determined by the schema sub-process 1616. For example, A 2 is any additional objects whether objects added to the cumulative schema by G 2, as compared with object already exists after G 1, is determined. The commands for the target may take the form of Data Definition Language (DDL) statements. Although labeled as a alter table subprocess, the actual language or statement may not use the specific statement "alter table". When the cumulative schema is reflected on the target by the table change subprocess 1624, the copy subprocess 1628-1. . . At 1628-3, data is copied to the target.
図16Bにおいて、ストリーミングアプローチを示す。ここでは、カラムまたはインデックスストア等の中間ストアはない。代わりに、データは、ターゲットに直接、採集され、1612のロードサブプロセスは省略される。結果として、抽出サブプロセス1620は、スキーマ推論サブプロセス1608に直接依存する。この実装においては、テーブル変更サブプロセス1624は、コピーサブプロセス1628に依存し、図16Aの依存関係と逆であることに留意する。 In FIG. 16B, a streaming approach is shown. Here there are no intermediate stores such as columns or index stores. Instead, data is collected directly to the target and the 1612 load sub-process is omitted. As a result, the extraction sub-process 1620 relies directly on the schema inference sub-process 1608. Note that in this implementation, the alter table sub-process 1624 relies on the copy sub-process 1628 and is the reverse of the dependencies of FIG. 16A.
ジョブの弾力的なスケジューリング
インデックスストアを用いるとき、採集タスク(SIL)及びエクスポートタスク(E)は、計算集約的であってよい。これらのタスクは、内部で並列化することができる。さらに、これらのタスクは、その依存関係が満たされれば、ジョブスケジューリングシステム(例えば、PBS、LSF、YARN、MESOS等)を介して非同期的に発行することもできる。これらのジョブスケジューリングシステムの多くは、ステップ間の依存関係も符号化することができる。(図16Aに示すような)依存グラフを知ることによって、スケジューリングモジュールは、全てのノードが使用中であるが、同時に、未処理の(outstanding)ジョブがあまり多くないことを保証しているグラフで、古いジョブを発行することができる。
Collection scheduling (SIL) and export task (E) may be computationally intensive when using a flexible scheduling index store of jobs. These tasks can be parallelized internally. Furthermore, these tasks can also be issued asynchronously via a job scheduling system (eg, PBS, LSF, YARN, MESOS, etc.) if their dependencies are satisfied. Many of these job scheduling systems can also encode inter-step dependencies. By knowing the dependency graph (as shown in FIG. 16A), the scheduling module ensures that all nodes are in use, but at the same time guaranteeing that there are not many outstanding jobs. , Can issue old jobs.
エラー回復
エラー回復の目的で、サブプロセスの一部または全ては、システムの状態に関するメタデータと、サブプロセスがシステムに行おうとする変化とを、記録する。ステップが失敗した場合、回復コードは、このメタデータを用いて、中断された操作を終えるか、再試行できるように不完全な操作を取り消すことができる。例えば、ロードサブプロセスは、ロード中のタプルIDのセットを記録する。ロードサブプロセスが失敗すると、そのセットに一致するタプルIDを有する全てのレコードをパージするにように指示するコマンドが、インデックスストアに発行されてよい。そうすると、ロードは再試行できる。
Error Recovery For the purpose of error recovery, some or all of the subprocesses record metadata about the state of the system and the changes that the subprocess is going to make to the system. If the step fails, the recovery code can use this metadata to terminate the interrupted operation or cancel the incomplete operation so that it can be retried. For example, the load sub-process records the set of tuple IDs being loaded. If the load sub-process fails, a command may be issued to the index store instructing it to purge all records with tuple IDs matching the set. The load can then be retried.
エクスポート最適化
一部の関係ストアは、中間ファイルなしにデータを直接ロードする機構を有している。例えば、Postgresは、COPY FROM STDINコマンドをサポートしており、データを直接データベースに供給することができる。エクスポートプロセスは、このインタフェースを用いて、データを直接、出力システムに書き込むことができるので、エクスポート(E)ステップとコピー(C)ステップをマージすることができる。AmazonのRedshift等、一部のシステムは、リモートプロシージャコールを介して、ウェアハウスから直接、データをインデックスストアに引き出してくる機構を有する。この場合、ユーザは、マニフェストァイルを作成し、コピーするために発行するセキュアシェル(ssh)コマンドのセットをリストにする。各sshコマンドは、ホストと、そのホスト上で実行するコマンドと、を指定する。タプルIDのセットをインデックスストアから抽出するコマンドを指定することによって、宛先データベースは、エクスポートのために必要なレコード/オブジェクトを、インデックスストアから引き出すことができる。
Export Optimization Some relationship stores have a mechanism to load data directly without intermediate files. For example, Postgres supports the COPY FROM STDIN command, which can supply data directly to the database. The export process can use this interface to write data directly to the output system, so it can merge the export (E) and copy (C) steps. Some systems, such as Amazon's Redshift, have a mechanism to pull data into the index store directly from the warehouse via remote procedure calls. In this case, the user creates a manifest file and lists the set of secure shell (ssh) commands issued to copy. Each ssh command specifies a host and a command to be executed on that host. By specifying a command to extract a set of tuple IDs from the index store, the destination database can pull out the records / objects necessary for export from the index store.
監視
リソース監視
監視システムは、システムが使用するハードウェアリソースとソフトウェアリソースを追跡する。それらリソースは、コレクタ、採集パイプライン、メタデータストア、(オプションの)インデックスストア、及び、データウェアハウスが使用する計算リソース及びストレージリソースを含んでよい。監視システムは、CPU、メモリ、ディスクの使用率などを含むが、それらに限られないメトリクスと、ネットワーク要求への応答と、を追跡する。
Monitoring Resource Monitoring The monitoring system tracks hardware and software resources used by the system. These resources may include collectors, collection pipelines, metadata stores, (optional) index stores, and computational and storage resources used by the data warehouse. The monitoring system tracks metrics such as, but not limited to, CPU, memory, disk utilization, etc. and responses to network requests.
監視サービスが、(パブリックであってもプライベートであっても)クラウド内に、または、プログラム的に割り当てられたリソースを有する別のシステムに配置される場合、監視システムを用いて、必要に応じて、システムのスケールアップまたはスケールダウンを自動的に行うことができる。例えば、インデックスストアのストレージスペース(Amazon EBS等のサービスを用いる仮想ハードディスクの形をとってよい)が十分でないことを監視サービスが検出した場合、監視サービスは、ユーザの介入なしに、追加のストレージを自動的に供給する要求をトリガすることができる。同様に、採集パイプラインが用いるワーカーマシンが、日常的にCPU使用率が低い場合、監視サービスは、そのマシンをシャットダウンすることができる。 If the monitoring service is deployed in the cloud (whether public or private) or in another system with programmatically assigned resources, using the monitoring system, as needed The system can be scaled up or down automatically. For example, if the monitoring service detects that the index store's storage space (which may take the form of a virtual hard disk using a service such as Amazon EBS) is not sufficient, the monitoring service will not need additional storage without user intervention. The request to supply automatically can be triggered. Similarly, if the worker machine used by the collection pipeline routinely has low CPU usage, the monitoring service can shut down that machine.
リソース監視機能は、Nagios等の監視フレームワークに依存してよい。 The resource monitoring function may rely on a monitoring framework such as Nagios.
採集監視
基本的なリソース監視に加えて、追加の監視を、特に、採集パイプラインに対して行うことができる。採集プロセスの各段階(スキーマ推論、インデックスストアのロード、スキーマ計算など)に関するメタデータを、採集中にセントラルメタデータストアに記憶することができ、そのメタデータを用いてシステムに関するメトリクスをインテロゲートする(問い合わせる)ことができる。最も基本的なレベルでは、この機構を用いて、停止したプロセスまたは正確に機能していないプロセスを識別することができる。
Collection monitoring In addition to basic resource monitoring, additional monitoring can be performed, particularly on the collection pipeline. Metadata about each step of the collection process (schema inference, index store loading, schema calculations, etc.) can be stored in the central metadata store during collection, and that metadata can be used to interrogate metrics about the system You can do it (inquire). At the most basic level, this mechanism can be used to identify stopped processes or processes that are not functioning properly.
監視システムは、どの段階が自動的に再開するのか、及び、どのくらい長く各段階がかかるのかを追跡することもできる。これによって、サービスの問題の識別を支援してよい。さらに、監視システムからの履歴データは、ユーザデータの異常を示し得る。例えば、一定量のソースデータのロードにかかる時間が大きく変わった場合、そのデータのどの特性が変更された可能性があるのかをユーザが調べるために、そのデータにフラグを立てることができる。 The monitoring system may also track which stages restart automatically and how long each stage takes. This may help identify service problems. Additionally, historical data from the monitoring system may indicate anomalies in user data. For example, if the time taken to load a fixed amount of source data changes significantly, the data can be flagged to determine which characteristics of that data may have changed.
クエリ監視
監視システムは、インデックスストアまたはデータウェアハウスに対して行われるクエリの実行時間を監視することができる。類似のクエリの実行時間がどのように変化するかを観察することによって、システムの問題の可能性、及び、ソースデータの特性の変化を、識別することができる。この情報は、データウェアハウスにおけるインデックスの使用、または、インデックスストアにおけるクエリ計画を知らせることができる。例えば、めったにクエリされないカラムは、専用インデックスを有する必要はないかもしれず、クエリ時に、一定の方法でソートされることが多いカラムは、頻繁なクエリに従ってソートされた新しいインデックスを有することによって利益を得てよい。
Query Monitoring The monitoring system can monitor the execution time of queries made against the index store or data warehouse. By observing how the execution time of similar queries changes, it is possible to identify potential problems in the system and changes in the characteristics of the source data. This information can inform the use of indexes in the data warehouse or query plans in the index store. For example, columns that are rarely queried may not need to have a dedicated index, and columns that are often sorted in a fixed way at query time benefit from having new indexes sorted according to frequent queries You may
結論
上記は、事実上単なる例示にすぎず、その開示、用途、または使用に限定することを意図してはいない。開示の広範な教示は、様々な形態で実装することができる。従って、この開示は特定の例を含むが、開示の真の範囲は、それに限定されるべきではない。図面、明細書、及び、特許請求の範囲を検討すると、他の変更形態が明らかになるであろう。本明細書においては、A、B、及び、Cの少なくとも1つという文言は、非排他的論理ORを使用する論理(AまたはBまたはC)を意味すると解釈されるべきである。方法内の1つまたは複数のステップは、本開示の原理を変えること無く、異なる順序で(または同時に)実行されてよいことは理解されたい。
Conclusion The above is merely exemplary in nature and is not intended to be limited to that disclosure, use, or use. The broad teachings of the disclosure can be implemented in various forms. Thus, although the disclosure includes specific examples, the true scope of the disclosure should not be limited thereto. Other modifications will be apparent upon review of the drawings, the description and the claims. As used herein, the term at least one of A, B, and C should be taken to mean logic (A or B or C) that uses non-exclusive logic OR. It is to be understood that one or more steps in the method may be performed in a different order (or simultaneously) without changing the principles of the present disclosure.
以下の定義を含むこの出願において、モジュールという用語は、回路という用語と置き換え可能である。モジュールという用語は、特定用途向け集積回路(ASIC)、デジタル、アナログ、もしくはアナログ/デジタル混合ディスクリート回路、デジタル、アナログ、もしくはアナログ/デジタル混合集積回路、組み合わせ論理回路、フィールドプログラマブルゲートアレイ(FPGA)、コードを実行する(共有、専用、もしくはグループ)プロセッサ、プロセッサが実行するコードを記憶する(共有、専用、もしくはグループ)メモリ、記載した機能を提供する他の適切なハードウェア構成要素、またはシステムオンチップにおけるものなどの上記の一部もしくは全ての組み合わせ、を指してよく、それらの一部であってよく、または、それらを含み得る。 In this application, including the following definitions, the term module is interchangeable with the term circuit. The term module refers to application specific integrated circuits (ASICs), digital, analog or mixed analog / digital discrete circuits, digital, analog or mixed analog / digital integrated circuits, combined logic circuits, field programmable gate arrays (FPGAs), Processor that executes code (shared, dedicated, or group), memory that stores code that processor executes (shared, dedicated, or group) memory, other suitable hardware components that provide the described functionality, or system on It may refer to, be part of, or include any combination of the above or any of the above, such as in a chip.
コードという用語は、上記で使用される際、ソフトウェア、ファームウェア、及び/またはマイクロコードを含んでよく、プログラム、ルーチン、関数、クラス、及び/またはオブジェクトのことを指してよい。共有プロセッサという用語は、多数のモジュールから幾つかのまたは全てのコードを実行する単一プロセッサを包含する。グループプロセッサという用語は、追加プロセッサと組み合わせて、1つまたは複数のモジュールから幾つかのまたは全てのコードを実行するプロセッサを包含する。共有メモリという用語は、多数のモジュールから幾つかのまたは全てのコードを記憶する単一メモリを包含する。グループメモリという用語は、追加メモリと組み合わせて、1つまたは複数のモジュールから幾つかのまたは全てのコードを記憶するメモリを包含する。メモリという用語は、コンピュータ可読媒体という用語のサブセットであってよい。コンピュータ可読媒体という用語は、媒体を通って伝搬する一時的な電気及び電磁信号を包含せず、従って、有形及び非一時的であると考えてよい。非一時的な有形のコンピュータで可読媒体の例は、不揮発性メモリ、揮発性メモリ、磁気ストレージ、及び、光ストレージを含むが、それらに限定されない。 The term code, as used above, may include software, firmware, and / or microcode, and may refer to programs, routines, functions, classes, and / or objects. The term shared processor encompasses a single processor that executes some or all of the code from a number of modules. The term group processor encompasses processors that execute some or all code from one or more modules in combination with additional processors. The term shared memory encompasses a single memory that stores some or all of the code from a number of modules. The term group memory encompasses memory which, in combination with additional memory, stores some or all of the code from one or more modules. The term memory may be a subset of the term computer readable medium. The term computer readable medium does not encompass temporal electrical and electromagnetic signals propagating through the medium, and may therefore be considered to be tangible and non-temporary. Examples of non-transitory tangible computer readable media include, but are not limited to, non-volatile memory, volatile memory, magnetic storage, and optical storage.
この出願に記載された装置及び方法は、1つまたは複数のプロセッサによって実行される1つまたは複数のコンピュータプログラムによって部分的にまたは全体的に実装されてよい。コンピュータプログラムは、少なくとも1つの非一時的な有形のコンピュータ可読媒体上に記憶されるプロセッサ実行可能命令を含む。コンピュータプログラムはまた、記憶されたデータを含んでよく、及び/または、記憶されたデータに依存してよい。 The apparatus and methods described in this application may be implemented in part or in whole by one or more computer programs executed by one or more processors. The computer program comprises processor executable instructions stored on at least one non-transitory tangible computer readable medium. The computer program may also include stored data and / or rely on stored data.
Claims (15)
前記取り出したオブジェクトのそれぞれは、(i)データと、(ii)前記データを記述するメタデータと、を含み、
前記累積スキーマの動的作成は、前記取り出したオブジェクトの各オブジェクトについて、(i)前記オブジェクトからスキーマを推論することと、(ii)前記推論されたスキーマに従って前記オブジェクトを記述するように、前記累積スキーマを選択的に更新することと、を含み、
前記スキーマ推論モジュールは、
前記取り出したオブジェクトのデータ型に関する統計を収集し、
前記データ型に関する統計に基づいて、前記取り出したオブジェクトのデータが正確に型付けされているかどうかを決定する、
ように構成されている、前記スキーマ推論モジュールと、
前記累積スキーマに従って、前記取り出したオブジェクトの前記データをデータ宛先システムに出力するように構成されたエクスポートモジュールと、
を備えるデータ変換システム。 A schema inference module configured to dynamically create a cumulative schema of objects retrieved from a first data source, comprising:
Each of the retrieved objects includes (i) data and (ii) metadata describing the data,
Dynamic creation of the cumulative schema includes, for each object of the retrieved object, (i) inferring a schema from the object; and (ii) describing the object in accordance with the inferred schema. Selectively updating the schema, and
The schema inference module
Collecting statistics on the data types of the retrieved objects;
Determine whether the data of the retrieved object is correctly typed based on statistics on the data type.
Said schema inference module being configured as
An export module configured to output the data of the retrieved object to a data destination system according to the cumulative schema;
Data conversion system comprising:
前記関係スキーマに行われた変更を反映するよう前記データウェアハウスのスキーマを更新するようにという前記データウェアハウスに対するコマンドを生成すること、
前記関係スキーマに従って、前記取り出したオブジェクトの前記データから少なくとも1つの中間ファイルを作成すること、
を実行するように構成され、
前記少なくとも1つの中間ファイルは、所定のデータウェアハウスフォーマットを有し、
前記エクスポートモジュールは、前記少なくとも1つの中間ファイルを前記データウェアハウスにバルクロードするように構成された、請求項4に記載のデータ変換システム。 The export module comprises at least one
Generating a command to the data warehouse to update the schema of the data warehouse to reflect changes made to the relationship schema;
Creating at least one intermediate file from the data of the retrieved object according to the relationship schema;
Configured to perform
The at least one intermediate file has a predetermined data warehouse format,
5. The data conversion system of claim 4, wherein the export module is configured to bulk load the at least one intermediate file into the data warehouse.
前記取り出したオブジェクトの各取り出したオブジェクトについて、前記時間値は、(i)前記取り出したオブジェクトの作成に対応するトランザクション時間と、
(ii)前記取り出したオブジェクトに対応する有効時間の少なくとも1つを表す、請求項6または7に記載のデータ変換システム。 The schema inference module is configured to create a time index in the index store that maps a time value to an identifier of the retrieved object;
For each retrieved object of the retrieved object, the time value may be (i) a transaction time corresponding to creation of the retrieved object;
The data conversion system according to claim 6 or 7, wherein (ii) at least one of valid times corresponding to the extracted object is represented.
前記取り出したオブジェクトの前記メタデータ、または
前記取り出したオブジェクトの前記データ、
の少なくとも1つに関する統計を収集するように構成され、
前記統計は、最低、最大、平均、及び、標準偏差の少なくとも1つを含む、請求項1から9のいずれか1項に記載のデータ変換システム。 The schema inference module is:
The metadata of the retrieved object, or the data of the retrieved object,
Configured to collect statistics on at least one of
The data conversion system according to any one of claims 1 to 9, wherein the statistics include at least one of minimum, maximum, average, and standard deviation.
前記データコレクタモジュールは、(i)前記関係データの各項目を取り出すためのテーブルを示す第1のカラムと、(ii)前記関係データの各項目に関連付けられたタイムスタンプを示す第2のカラムと、を作成することによって、前記関係データをイベント化するように構成された、請求項1〜10のいずれか1項に記載のデータ変換システム。 Further comprising a data collector module configured to receive relational data from the first data source and to generate the object for use by the schema inference module;
The data collector module includes (i) a first column indicating a table for extracting each item of the relationship data, and (ii) a second column indicating a time stamp associated with each item of the relationship data. The data conversion system according to any one of claims 1 to 10, wherein the relational data is configured to be eventified by creating.
前記エクスポートモジュールは、前記取り出したオブジェクトの対応するグループであって、それぞれ、識別子要素について異なる値を有するグループ、にあるカラムに従って、前記累積スキーマをパーティション化するように構成された、請求項1〜12のいずれか1項に記載のデータ変換システム。 The export module is configured to partition the cumulative schema into a plurality of tables, each table of the plurality of tables including a column that appears together with the retrieved object,
Prior Symbol export module, a corresponding group of said taken-out object, respectively, according to a column in the group, to have different values for the identifier element is configured to partition the cumulative schema claim 1 The data conversion system of any one of -12.
前記取り出したオブジェクトの各オブジェクトについて、前記ソース識別子は、前記第1のデータソースの固有の識別子と、前記第1のデータソース内の前記オブジェクトの位置と、を含む、請求項1〜13のいずれか1項に記載のデータ変換システム。 The schema inference module records a source identifier for each of the retrieved objects;
14. For each object of the retrieved object, the source identifier comprises the unique identifier of the first data source and the location of the object in the first data source. The data conversion system described in 1 or 2.
オブジェクトをデータソースから取り出すことであって、前記取り出したオブジェクトの各オブジェクトは、(i)データと、(ii)前記データを記述するメタデータと、を含む、前記取り出すことと、
前記取り出したオブジェクトの各オブジェクトについて、
(i)前記オブジェクトの前記メタデータと、前記オブジェクトの前記データの要素の推論されたデータ型とに基づいて、前記オブジェクトからスキーマを推論することであって、前記オブジェクトのうちの少なくとも1つのオブジェクトについて推論されたスキーマは、前記オブジェクトのうちの他のオブジェクトについての他の推論されたスキーマとは異なる、前記推論することと、
(ii)(a)前記推論されたスキーマが記述する前記オブジェクトと、(b)累積スキーマが記述する累積したオブジェクトのセットと、の両方を記述する統合スキーマを作成することと、
(iii)前記統合スキーマを前記累積スキーマとして記憶することと、
前記取り出したオブジェクトのデータ型に関する統計を収集することと、
前記データ型に関する前記統計に基づいて、前記取り出したオブジェクトの前記データが正確に型付けされているかどうかを決定することと、
前記取り出したオブジェクトのそれぞれの前記データをデータウェアハウスにエクスポートすることと、
によって、前記累積スキーマを動的に生成することと、
を含む方法。 A data analysis system operating method,
Retrieving an object from a data source, wherein each object of the retrieved object comprises (i) data and (ii) metadata describing the data.
For each object of the retrieved object,
(I) inferring a schema from the object based on the metadata of the object and an inferred data type of an element of the data of the object, at least one object of the objects Said inferring schema being different from other inferred schemas for other objects of said objects;
(Ii) creating an integrated schema that describes both the object described by the inferred schema and the set of accumulated objects described by the accumulated schema;
(Iii) storing the integrated schema as the cumulative schema;
Collecting statistics on data types of the retrieved objects;
Determining whether the data of the retrieved object is correctly typed based on the statistics on the data type;
Exporting the data of each of the retrieved objects to a data warehouse;
Dynamically generating the cumulative schema by
Method including.
Applications Claiming Priority (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201361800432P | 2013-03-15 | 2013-03-15 | |
US61/800,432 | 2013-03-15 | ||
PCT/US2014/029484 WO2014144889A2 (en) | 2013-03-15 | 2014-03-14 | Scalable analysis platform for semi-structured data |
US14/213,941 | 2014-03-14 | ||
US14/213,941 US9613068B2 (en) | 2013-03-15 | 2014-03-14 | Scalable analysis platform for semi-structured data |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2016519810A JP2016519810A (en) | 2016-07-07 |
JP2016519810A5 JP2016519810A5 (en) | 2016-08-18 |
JP6416194B2 true JP6416194B2 (en) | 2018-10-31 |
Family
ID=51532920
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016503110A Active JP6416194B2 (en) | 2013-03-15 | 2014-03-14 | Scalable analytic platform for semi-structured data |
Country Status (6)
Country | Link |
---|---|
US (3) | US10275475B2 (en) |
EP (1) | EP2973051A4 (en) |
JP (1) | JP6416194B2 (en) |
CN (1) | CN105122243B (en) |
CA (2) | CA3078018C (en) |
WO (1) | WO2014144889A2 (en) |
Families Citing this family (276)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10534606B2 (en) | 2011-12-08 | 2020-01-14 | Oracle International Corporation | Run-length encoding decompression |
EP2795487A4 (en) * | 2011-12-23 | 2015-07-29 | Amazon Tech Inc | Scalable analysis platform for semi-structured data |
US9501550B2 (en) * | 2012-04-18 | 2016-11-22 | Renmin University Of China | OLAP query processing method oriented to database and HADOOP hybrid platform |
US10333820B1 (en) | 2012-10-23 | 2019-06-25 | Quest Software Inc. | System for inferring dependencies among computing systems |
EP2973051A4 (en) | 2013-03-15 | 2016-11-16 | Amazon Tech Inc | Scalable analysis platform for semi-structured data |
US9195456B2 (en) * | 2013-04-30 | 2015-11-24 | Hewlett-Packard Development Company, L.P. | Managing a catalog of scripts |
US9305067B2 (en) * | 2013-07-19 | 2016-04-05 | International Business Machines Corporation | Creation of change-based data integration jobs |
US10394848B2 (en) * | 2013-07-29 | 2019-08-27 | Amazon Technologies, Inc. | Generating a multi-column index for relational databases by interleaving data bits for selectivity |
US9380019B2 (en) * | 2013-08-26 | 2016-06-28 | Verisign, Inc. | Command performance monitoring |
US9536200B2 (en) * | 2013-08-28 | 2017-01-03 | International Business Machines Corporation | Sentiment analysis of data logs |
US11113054B2 (en) | 2013-09-10 | 2021-09-07 | Oracle International Corporation | Efficient hardware instructions for single instruction multiple data processors: fast fixed-length value compression |
US9471610B1 (en) * | 2013-09-16 | 2016-10-18 | Amazon Technologies, Inc. | Scale-out of data that supports roll back |
US9246688B1 (en) * | 2013-09-25 | 2016-01-26 | Amazon Technologies, Inc. | Dataset licensing |
US9811571B2 (en) * | 2013-12-13 | 2017-11-07 | Sap Se | Bitemporal timeline index |
US20150220584A1 (en) * | 2014-02-03 | 2015-08-06 | Codefutures Corporation | Dynamic modification of a database data structure |
US10037349B2 (en) * | 2014-02-05 | 2018-07-31 | International Business Machines Corporation | Optimization of an in memory data grid (IMDG) schema based upon a No-SQL document model |
JP6273969B2 (en) * | 2014-03-28 | 2018-02-07 | 富士通株式会社 | Data processing apparatus, information processing apparatus, method, and program |
US11005738B1 (en) | 2014-04-09 | 2021-05-11 | Quest Software Inc. | System and method for end-to-end response-time analysis |
US9411611B2 (en) * | 2014-05-02 | 2016-08-09 | International Business Machines Corporation | Colocation and anticolocation in colocation data centers via elastic nets |
US20150331875A1 (en) * | 2014-05-16 | 2015-11-19 | Syntel, Inc. | System and method for validating integrated data recasting objects |
US10705877B2 (en) | 2014-05-29 | 2020-07-07 | Ab Initio Technology Llc | Workload automation and data lineage analysis |
US20150347477A1 (en) * | 2014-05-30 | 2015-12-03 | John Esmet | Streaming File System |
US10061808B2 (en) * | 2014-06-03 | 2018-08-28 | Sap Se | Cached views |
US10198460B2 (en) * | 2014-06-04 | 2019-02-05 | Waterline Data Science, Inc. | Systems and methods for management of data platforms |
US10127244B2 (en) * | 2014-06-04 | 2018-11-13 | Harris Corporation | Systems and methods for dynamic data storage |
US10325206B2 (en) * | 2014-06-09 | 2019-06-18 | Cognitive Scale, Inc. | Dataset engine for use within a cognitive environment |
US10262264B2 (en) | 2014-06-09 | 2019-04-16 | Cognitive Scale, Inc. | Method for performing dataset operations within a cognitive environment |
EP3170099A4 (en) * | 2014-07-15 | 2017-11-22 | Microsoft Technology Licensing, LLC | Managing data ingestion |
US10176236B2 (en) | 2014-07-29 | 2019-01-08 | Microsoft Technology Licensing, Llc | Systems and methods for a distributed query execution engine |
US10169433B2 (en) * | 2014-07-29 | 2019-01-01 | Microsoft Technology Licensing, Llc | Systems and methods for an SQL-driven distributed operating system |
US10437843B2 (en) | 2014-07-29 | 2019-10-08 | Microsoft Technology Licensing, Llc | Optimization of database queries via transformations of computation graph |
US9686356B2 (en) * | 2014-08-12 | 2017-06-20 | Eingot Llc | Zero-knowledge environment based social networking engine |
US11474874B2 (en) | 2014-08-14 | 2022-10-18 | Qubole, Inc. | Systems and methods for auto-scaling a big data system |
US10877995B2 (en) * | 2014-08-14 | 2020-12-29 | Intellicus Technologies Pvt. Ltd. | Building a distributed dwarf cube using mapreduce technique |
US10019472B2 (en) * | 2014-08-14 | 2018-07-10 | Intellicus Technologies Pvt. Ltd. | System and method for querying a distributed dwarf cube |
US20160063078A1 (en) * | 2014-08-29 | 2016-03-03 | Apollo Education Group, Inc. | Automatic identification and tracking of log entry schemas changes |
US9678773B1 (en) | 2014-09-30 | 2017-06-13 | Amazon Technologies, Inc. | Low latency computational capacity provisioning |
US9146764B1 (en) | 2014-09-30 | 2015-09-29 | Amazon Technologies, Inc. | Processing event messages for user requests to execute program code |
US9600312B2 (en) | 2014-09-30 | 2017-03-21 | Amazon Technologies, Inc. | Threading as a service |
US10380136B2 (en) | 2014-10-10 | 2019-08-13 | Salesforce.Com, Inc. | Dataflow optimization for extractions from a data repository |
JP6302817B2 (en) * | 2014-10-17 | 2018-03-28 | アズビル株式会社 | Data recording apparatus and method |
EP3015984A1 (en) * | 2014-10-29 | 2016-05-04 | Hewlett-Packard Development Company, L.P. | Providing data from data sources |
US9971574B2 (en) * | 2014-10-31 | 2018-05-15 | Oracle International Corporation | JSON stylesheet language transformation |
US9208200B1 (en) * | 2014-11-01 | 2015-12-08 | Veeva Systems Inc. | System and method for reporting multiple objects in enterprise content management |
US9628350B2 (en) | 2014-11-05 | 2017-04-18 | Amazon Technologies, Inc. | Dynamic scaling of storage volumes for storage client file systems |
US10437819B2 (en) * | 2014-11-14 | 2019-10-08 | Ab Initio Technology Llc | Processing queries containing a union-type operation |
US10291493B1 (en) | 2014-12-05 | 2019-05-14 | Quest Software Inc. | System and method for determining relevant computer performance events |
US10120905B2 (en) * | 2014-12-22 | 2018-11-06 | Amazon Technologies, Inc. | Efficient determination of join paths via cardinality estimation |
US10685042B2 (en) * | 2014-12-22 | 2020-06-16 | Amazon Technologies, Inc. | Identifying join relationships based on transactional access patterns |
EP3248340A4 (en) | 2015-01-23 | 2018-01-03 | eBay Inc. | Processing high volume network data |
WO2016115735A1 (en) | 2015-01-23 | 2016-07-28 | Murthy Sharad R | Processing high volume network data |
US20160224594A1 (en) * | 2015-02-03 | 2016-08-04 | Simba Technologies Inc. | Schema Definition Tool |
US9733967B2 (en) | 2015-02-04 | 2017-08-15 | Amazon Technologies, Inc. | Security protocols for low latency execution of program code |
US9588790B1 (en) | 2015-02-04 | 2017-03-07 | Amazon Technologies, Inc. | Stateful virtual compute system |
US11386107B1 (en) | 2015-02-13 | 2022-07-12 | Omnicom Media Group Holdings Inc. | Variable data source dynamic and automatic ingestion and auditing platform apparatuses, methods and systems |
US10649964B2 (en) * | 2015-02-26 | 2020-05-12 | Red Hat, Inc. | Incorporating external data into a database schema |
US10833940B2 (en) | 2015-03-09 | 2020-11-10 | Vapor IO Inc. | Autonomous distributed workload and infrastructure scheduling |
US10579354B2 (en) * | 2015-03-10 | 2020-03-03 | Kordata, Llc | Method and system for rapid deployment and execution of customized functionality across multiple distinct platforms |
US20160267119A1 (en) * | 2015-03-13 | 2016-09-15 | Microsoft Technology Licensing, Llc | Index building in hybrid data system |
IN2015CH02357A (en) * | 2015-05-08 | 2015-05-22 | Wipro Ltd | |
US9613109B2 (en) | 2015-05-14 | 2017-04-04 | Walleye Software, LLC | Query task processing based on memory allocation and performance criteria |
US10025823B2 (en) * | 2015-05-29 | 2018-07-17 | Oracle International Corporation | Techniques for evaluating query predicates during in-memory table scans |
US10187260B1 (en) | 2015-05-29 | 2019-01-22 | Quest Software Inc. | Systems and methods for multilayer monitoring of network function virtualization architectures |
US11436667B2 (en) | 2015-06-08 | 2022-09-06 | Qubole, Inc. | Pure-spot and dynamically rebalanced auto-scaling clusters |
US20160371345A1 (en) * | 2015-06-22 | 2016-12-22 | International Business Machines Corporation | Preprocessing Heterogeneously-Structured Electronic Documents for Data Warehousing |
US9858299B2 (en) * | 2015-06-24 | 2018-01-02 | Oracle International Corporation | System and method for generating a JSON schema from a JSON stream |
US10733198B1 (en) | 2015-06-29 | 2020-08-04 | Trifacta Inc. | Visual interactions for transforming datasets with nested data structures |
US10067954B2 (en) | 2015-07-22 | 2018-09-04 | Oracle International Corporation | Use of dynamic dictionary encoding with an associated hash table to support many-to-many joins and aggregations |
US10387386B2 (en) * | 2015-08-11 | 2019-08-20 | International Business Machines Corporation | Automatic attribute structural variation detection for not only structured query language database |
US10776357B2 (en) * | 2015-08-26 | 2020-09-15 | Infosys Limited | System and method of data join and metadata configuration |
US10200252B1 (en) * | 2015-09-18 | 2019-02-05 | Quest Software Inc. | Systems and methods for integrated modeling of monitored virtual desktop infrastructure systems |
US10387578B1 (en) * | 2015-09-28 | 2019-08-20 | Amazon Technologies, Inc. | Utilization limiting for nested object queries |
US9881054B2 (en) * | 2015-09-30 | 2018-01-30 | International Business Machines Corporation | System and method of query processing with schema change in JSON document store |
US10922418B2 (en) * | 2015-10-01 | 2021-02-16 | Twistlock, Ltd. | Runtime detection and mitigation of vulnerabilities in application software containers |
US10599678B2 (en) * | 2015-10-23 | 2020-03-24 | Numerify, Inc. | Input gathering system and method for defining, refining or validating star schema for a source database |
CN106682004A (en) * | 2015-11-06 | 2017-05-17 | 网宿科技股份有限公司 | Redis Key management method and system |
CN106815246A (en) * | 2015-11-30 | 2017-06-09 | 北京国双科技有限公司 | Document storing method and device in non-relational database |
US11468053B2 (en) | 2015-12-30 | 2022-10-11 | Dropbox, Inc. | Servicing queries of a hybrid event index |
US10866940B2 (en) * | 2015-12-31 | 2020-12-15 | Fireeye, Inc. | Method, apparatus, and computer-readable medium for ingesting semi-structured data in a columnar format |
JP7051108B2 (en) * | 2016-02-26 | 2022-04-11 | クリスプ インテリジェンス プロプライエタリ リミテッド | Fact Category Partitioning Unknown to Data Source Systems Methods for Inserting and Retrieving Data Using Information Repositories and Information Repositories |
WO2017093576A1 (en) * | 2016-03-02 | 2017-06-08 | Integrit Sa/Nv | Improved construction of database schema models for database systems and rest api's |
US10061832B2 (en) | 2016-11-28 | 2018-08-28 | Oracle International Corporation | Database tuple-encoding-aware data partitioning in a direct memory access engine |
US10055358B2 (en) | 2016-03-18 | 2018-08-21 | Oracle International Corporation | Run length encoding aware direct memory access filtering engine for scratchpad enabled multicore processors |
US10402425B2 (en) | 2016-03-18 | 2019-09-03 | Oracle International Corporation | Tuple encoding aware direct memory access engine for scratchpad enabled multi-core processors |
US10061714B2 (en) | 2016-03-18 | 2018-08-28 | Oracle International Corporation | Tuple encoding aware direct memory access engine for scratchpad enabled multicore processors |
US10452792B1 (en) * | 2016-03-29 | 2019-10-22 | Amazon Technologies, Inc. | Simulating demand and load on storage servers |
EP3436927B1 (en) * | 2016-03-30 | 2023-12-13 | Amazon Technologies Inc. | Processing pre-existing data sets at an on-demand code execution environment |
US10025656B2 (en) * | 2016-03-30 | 2018-07-17 | Wipro Limited | Method and system for facilitating operation of an electronic device |
US11797495B2 (en) * | 2016-04-11 | 2023-10-24 | Oracle International Corporation | Simulating data definition triggers in a database system |
US20170308606A1 (en) * | 2016-04-22 | 2017-10-26 | Quest Software Inc. | Systems and methods for using a structured query dialect to access document databases and merging with other sources |
WO2017190153A1 (en) * | 2016-04-29 | 2017-11-02 | Unifi Software | Automatic generation of structured data from semi-structured data |
CN106021523B (en) * | 2016-05-24 | 2019-07-26 | 北京交通大学 | Data warehouse storage and query method based on JSON |
US11080207B2 (en) | 2016-06-07 | 2021-08-03 | Qubole, Inc. | Caching framework for big-data engines in the cloud |
US11514069B1 (en) * | 2016-06-10 | 2022-11-29 | Amazon Technologies, Inc. | Aggregation of contextual data and internet of things (IoT) device data |
US10248692B2 (en) * | 2016-06-15 | 2019-04-02 | International Business Machines Corporation | Cardinality estimation of a join predicate |
JP6720357B2 (en) * | 2016-06-29 | 2020-07-08 | アマゾン テクノロジーズ インコーポレイテッド | Change network accessible data volume |
US10102040B2 (en) | 2016-06-29 | 2018-10-16 | Amazon Technologies, Inc | Adjusting variable limit on concurrent code executions |
US10230601B1 (en) | 2016-07-05 | 2019-03-12 | Quest Software Inc. | Systems and methods for integrated modeling and performance measurements of monitored virtual desktop infrastructure systems |
WO2018011985A1 (en) * | 2016-07-15 | 2018-01-18 | 株式会社日立製作所 | Management system and platform construction supporting method |
US10922278B2 (en) * | 2016-07-22 | 2021-02-16 | Albert Haag | Systems and methods for database compression and evaluation |
US10956467B1 (en) * | 2016-08-22 | 2021-03-23 | Jpmorgan Chase Bank, N.A. | Method and system for implementing a query tool for unstructured data files |
US10353930B2 (en) | 2016-08-31 | 2019-07-16 | International Business Machines Corporation | Generating a trust factor for data in non-relational or relational databases |
US10503923B1 (en) | 2016-08-31 | 2019-12-10 | Amazon Technologies, Inc. | Centralized data store for multiple data processing environments |
US10606664B2 (en) | 2016-09-07 | 2020-03-31 | Qubole Inc. | Heterogeneous auto-scaling big-data clusters in the cloud |
US10592508B2 (en) * | 2016-09-13 | 2020-03-17 | The Bank Of New York Mellon | Organizing datasets for adaptive responses to queries |
US10437564B1 (en) * | 2016-09-16 | 2019-10-08 | Software Tree, LLC | Object mapping and conversion system |
US11151097B2 (en) * | 2016-09-25 | 2021-10-19 | Microsoft Technology Licensing, Llc | Dynamic schema inference and enforcement |
WO2018067624A1 (en) | 2016-10-05 | 2018-04-12 | Wal-Mart Stores, Inc. | Systems and methods for synchronizing database schema |
CN106502802A (en) * | 2016-10-12 | 2017-03-15 | 山东浪潮云服务信息科技有限公司 | A kind of concurrent acquisition method in distributed high in the clouds transmitted based on Avro RPC |
CN106503210A (en) * | 2016-11-03 | 2017-03-15 | 北京集奥聚合科技有限公司 | A kind of control method of hive persistences function and system |
US10102229B2 (en) * | 2016-11-09 | 2018-10-16 | Palantir Technologies Inc. | Validating data integrations using a secondary data store |
CN106528341B (en) * | 2016-11-09 | 2019-07-30 | 上海新炬网络信息技术股份有限公司 | Automation disaster tolerance system based on Greenplum database |
US10482098B2 (en) | 2016-11-14 | 2019-11-19 | Microsoft Technology Licensing, Llc | Consuming streamed data records |
CN106557574B (en) * | 2016-11-23 | 2020-02-04 | 广东电网有限责任公司佛山供电局 | Target address matching method and system based on tree structure |
US10459859B2 (en) | 2016-11-28 | 2019-10-29 | Oracle International Corporation | Multicast copy ring for database direct memory access filtering engine |
US10725947B2 (en) | 2016-11-29 | 2020-07-28 | Oracle International Corporation | Bit vector gather row count calculation and handling in direct memory access engine |
CN108241657B (en) * | 2016-12-24 | 2022-01-07 | 北京亿阳信通科技有限公司 | Web data list processing method and device |
CN108076036A (en) * | 2017-01-06 | 2018-05-25 | 哈尔滨安天科技股份有限公司 | It is a kind of to threaten vector extraction and the system and method for label for labelling |
CN108614689B (en) * | 2017-01-09 | 2021-08-13 | 斑马智行网络(香港)有限公司 | Method, device and terminal device for generating scene service |
US10614087B2 (en) | 2017-01-17 | 2020-04-07 | International Business Machines Corporation | Data analytics on distributed databases |
CN108255897B (en) * | 2017-02-17 | 2020-07-21 | 平安科技(深圳)有限公司 | Visualized chart data conversion processing method and device |
CA2997071A1 (en) * | 2017-03-03 | 2018-09-03 | Next Pathway Inc. | Metadata-driven data management platform |
EP3676731A4 (en) * | 2017-03-06 | 2021-06-02 | Appextremes, LLC | SYSTEMS AND PROCEDURES FOR MODIFYING AND CORRECTING NEGOTIATED DOCUMENTS |
US11182549B2 (en) | 2017-03-06 | 2021-11-23 | AppExtremes, LLC | Systems and methods for modifying and reconciling negotiated documents |
CN106934011A (en) * | 2017-03-09 | 2017-07-07 | 济南浪潮高新科技投资发展有限公司 | A kind of structuring analysis method and device of JSON data |
US10540366B2 (en) | 2017-03-09 | 2020-01-21 | Bank Of America Corporation | Transforming data structures and data objects for migrating data between databases having different schemas |
JP6480495B2 (en) * | 2017-03-16 | 2019-03-13 | ヤフー株式会社 | Data management apparatus, data management method, and program |
US10698873B2 (en) * | 2017-03-30 | 2020-06-30 | Microsoft Technology Licensing, Llc | Performance data storage |
US11567952B2 (en) * | 2017-04-24 | 2023-01-31 | President And Fellows Of Harvard College | Systems and methods for accelerating exploratory statistical analysis |
US11119992B2 (en) * | 2017-04-25 | 2021-09-14 | Petuum, Inc. | System for automated data engineering for large scale machine learning |
US10817490B2 (en) | 2017-04-28 | 2020-10-27 | Microsoft Technology Licensing, Llc | Parser for schema-free data exchange format |
GB2546459B (en) * | 2017-05-10 | 2018-02-28 | Tomlinson Martin | Data verification |
US10733024B2 (en) | 2017-05-24 | 2020-08-04 | Qubole Inc. | Task packing scheduling process for long running applications |
US10216823B2 (en) | 2017-05-31 | 2019-02-26 | HarperDB, Inc. | Systems, methods, and apparatus for hierarchical database |
US10846285B2 (en) * | 2017-06-02 | 2020-11-24 | Chaossearch, Inc. | Materialization for data edge platform |
US11416466B2 (en) * | 2017-06-02 | 2022-08-16 | Chaossearch, Inc. | Data edge platform for improved storage and analytics |
CN107145601B (en) * | 2017-06-02 | 2020-08-14 | 北京数语科技有限公司 | Efficient reference relation discovery method |
JP6758252B2 (en) * | 2017-06-05 | 2020-09-23 | Kddi株式会社 | Histogram generation method, histogram generator and histogram generation program |
US11048673B2 (en) | 2017-06-28 | 2021-06-29 | StreamSets, Inc. | Automatic drift detection and handling |
US10747731B2 (en) * | 2017-07-20 | 2020-08-18 | Vmware, Inc. | Transferring data using unique identifiers of a table of a relational database |
JP6881124B2 (en) * | 2017-07-21 | 2021-06-02 | 富士通株式会社 | Search control program, search control method and search control device |
US9934287B1 (en) | 2017-07-25 | 2018-04-03 | Capital One Services, Llc | Systems and methods for expedited large file processing |
US10929384B2 (en) | 2017-08-16 | 2021-02-23 | Walmart Apollo, Llc | Systems and methods for distributed data validation |
US10198469B1 (en) | 2017-08-24 | 2019-02-05 | Deephaven Data Labs Llc | Computer data system data source refreshing using an update propagation graph having a merged join listener |
US10581945B2 (en) | 2017-08-28 | 2020-03-03 | Banjo, Inc. | Detecting an event from signal data |
US10324948B1 (en) | 2018-04-27 | 2019-06-18 | Banjo, Inc. | Normalizing ingested signals |
US20190251138A1 (en) | 2018-02-09 | 2019-08-15 | Banjo, Inc. | Detecting events from features derived from multiple ingested signals |
US10257058B1 (en) | 2018-04-27 | 2019-04-09 | Banjo, Inc. | Ingesting streaming signals |
US11025693B2 (en) | 2017-08-28 | 2021-06-01 | Banjo, Inc. | Event detection from signal data removing private information |
US10313413B2 (en) * | 2017-08-28 | 2019-06-04 | Banjo, Inc. | Detecting events from ingested communication signals |
US11010223B2 (en) * | 2017-09-01 | 2021-05-18 | Infosys Limited | Method and system of automatic event and error correlation from log data |
US11244025B2 (en) * | 2017-09-12 | 2022-02-08 | Facebook, Inc. | Systems and methods for updating data pipelines |
US10747814B2 (en) * | 2017-09-29 | 2020-08-18 | Oracle International Corporation | Handling semi-structured and unstructured data in a sharded database environment |
US10771584B2 (en) * | 2017-11-30 | 2020-09-08 | Cisco Technology, Inc. | Provisioning using pre-fetched data in serverless computing environments |
JP6550448B2 (en) | 2017-12-18 | 2019-07-24 | ヤフー株式会社 | DATA MANAGEMENT DEVICE, DATA MANAGEMENT METHOD, AND PROGRAM |
US11010374B2 (en) | 2017-12-21 | 2021-05-18 | International Business Machines Corporation | Method and system for building a data grouping platform |
CN108268615B (en) * | 2018-01-02 | 2021-10-26 | 中国工商银行股份有限公司 | Data processing method, device and system |
US11228489B2 (en) | 2018-01-23 | 2022-01-18 | Qubole, Inc. | System and methods for auto-tuning big data workloads on cloud platforms |
US10503497B2 (en) * | 2018-01-30 | 2019-12-10 | Microsoft Technology Licensing, Llc | Techniques for utilizing an expression language in service configuration files |
US10585724B2 (en) | 2018-04-13 | 2020-03-10 | Banjo, Inc. | Notifying entities of relevant events |
US10324935B1 (en) | 2018-02-09 | 2019-06-18 | Banjo, Inc. | Presenting event intelligence and trends tailored per geographic area granularity |
US10970184B2 (en) | 2018-02-09 | 2021-04-06 | Banjo, Inc. | Event detection removing private information |
US10313865B1 (en) | 2018-04-27 | 2019-06-04 | Banjo, Inc. | Validating and supplementing emergency call information |
US10261846B1 (en) | 2018-02-09 | 2019-04-16 | Banjo, Inc. | Storing and verifying the integrity of event related data |
US10999731B2 (en) * | 2018-02-20 | 2021-05-04 | Veniam, Inc. | Systems and methods for real-time handling and processing of data in a network of moving things |
US11055650B2 (en) * | 2018-02-27 | 2021-07-06 | Logistiview, Inc. | Execution systems using unstructured data |
US11157510B2 (en) | 2018-02-28 | 2021-10-26 | Chaossearch, Inc. | Data normalization using data edge platform |
US11693832B2 (en) * | 2018-03-15 | 2023-07-04 | Vmware, Inc. | Flattening of hierarchical data into a relational schema in a computing system |
US11269821B2 (en) * | 2018-04-04 | 2022-03-08 | Oracle International Corporation | Method and system for generating schemas |
CN110377577B (en) * | 2018-04-11 | 2022-03-04 | 北京嘀嘀无限科技发展有限公司 | Data synchronization method, device, system and computer readable storage medium |
US10327116B1 (en) | 2018-04-27 | 2019-06-18 | Banjo, Inc. | Deriving signal location from signal content |
US10353934B1 (en) | 2018-04-27 | 2019-07-16 | Banjo, Inc. | Detecting an event from signals in a listening area |
US10904720B2 (en) | 2018-04-27 | 2021-01-26 | safeXai, Inc. | Deriving signal location information and removing private information from it |
CN108776678B (en) * | 2018-05-29 | 2020-07-03 | 阿里巴巴集团控股有限公司 | Index creation method and device based on mobile terminal NoSQL database |
US10936624B2 (en) | 2018-06-12 | 2021-03-02 | Sap Se | Development and productive use of system with parallel use of production data and zero downtime of software changes |
US10853115B2 (en) | 2018-06-25 | 2020-12-01 | Amazon Technologies, Inc. | Execution of auxiliary functions in an on-demand network code execution system |
US11032386B2 (en) * | 2018-07-08 | 2021-06-08 | Nimbella Corp. | Matrix data system for computation of exact and proximate solutions |
US11099870B1 (en) | 2018-07-25 | 2021-08-24 | Amazon Technologies, Inc. | Reducing execution times in an on-demand network code execution system using saved machine states |
CN109376339B (en) * | 2018-08-02 | 2020-07-03 | 浙江大学 | Text conversion candidate rule information extraction method based on user behaviors |
CN109254989B (en) * | 2018-08-27 | 2020-11-20 | 望海康信(北京)科技股份公司 | Elastic ETL (extract transform load) architecture design method and device based on metadata drive |
US11347740B2 (en) * | 2018-10-11 | 2022-05-31 | Varada Ltd. | Managed query execution platform, and methods thereof |
US10635360B1 (en) * | 2018-10-29 | 2020-04-28 | International Business Machines Corporation | Adjusting data ingest based on compaction rate in a dispersed storage network |
US11943093B1 (en) | 2018-11-20 | 2024-03-26 | Amazon Technologies, Inc. | Network connection recovery after virtual machine transition in an on-demand network code execution system |
US11182409B2 (en) | 2018-11-21 | 2021-11-23 | International Business Machines Corporation | Data processing with tags |
EP3660733B1 (en) | 2018-11-30 | 2023-06-28 | Tata Consultancy Services Limited | Method and system for information extraction from document images using conversational interface and database querying |
WO2020142719A1 (en) | 2019-01-04 | 2020-07-09 | AppExtremes, LLC, d/b/a Conga | Systems and methods for dynamic assignment, monitoring and management of discrete tasks |
US11853359B1 (en) | 2019-01-31 | 2023-12-26 | Veeva Systems Inc. | System and method for reporting multiple objects in enterprise content management |
US11861386B1 (en) | 2019-03-22 | 2024-01-02 | Amazon Technologies, Inc. | Application gateways in an on-demand network code execution system |
US11809382B2 (en) | 2019-04-01 | 2023-11-07 | Nutanix, Inc. | System and method for supporting versioned objects |
CN110138828A (en) * | 2019-04-08 | 2019-08-16 | 青岛民航凯亚系统集成有限公司 | Airport dynamic terminal real time data inspecting processing method |
US20220092130A1 (en) * | 2019-04-11 | 2022-03-24 | Mikko Kalervo Vaananen | Intelligent search engine |
CN111831423B (en) * | 2019-04-15 | 2024-11-12 | 阿里巴巴集团控股有限公司 | A method and system for implementing Redis in-memory database on non-volatile memory |
US11221788B2 (en) * | 2019-04-26 | 2022-01-11 | Shichao Jin | Data storage method and data storage engine |
US10423662B1 (en) * | 2019-05-24 | 2019-09-24 | Hydrolix Inc. | Efficient and scalable time-series data storage and retrieval over a network |
US11144360B2 (en) | 2019-05-31 | 2021-10-12 | Qubole, Inc. | System and method for scheduling and running interactive database queries with service level agreements in a multi-tenant processing system |
US11704316B2 (en) | 2019-05-31 | 2023-07-18 | Qubole, Inc. | Systems and methods for determining peak memory requirements in SQL processing engines with concurrent subtasks |
US11221998B2 (en) | 2019-05-31 | 2022-01-11 | Microsoft Technology Licensing, Llc | Ingesting and processing content types |
US10911379B1 (en) * | 2019-06-12 | 2021-02-02 | Amazon Technologies, Inc. | Message schema management service for heterogeneous event-driven computing environments |
US11119809B1 (en) | 2019-06-20 | 2021-09-14 | Amazon Technologies, Inc. | Virtualization-based transaction handling in an on-demand network code execution system |
US11170048B2 (en) * | 2019-06-25 | 2021-11-09 | Adobe Inc. | System for identifying typed graphlets |
US10582343B1 (en) | 2019-07-29 | 2020-03-03 | Banjo, Inc. | Validating and supplementing emergency call information |
US11537446B2 (en) * | 2019-08-14 | 2022-12-27 | Microsoft Technology Licensing, Llc | Orchestration and scheduling of services |
US11341154B2 (en) * | 2019-08-20 | 2022-05-24 | Adobe Inc. | Normalizing encodings of requested data from a common data schema to a target data schema |
US11182368B2 (en) * | 2019-09-24 | 2021-11-23 | International Business Machines Corporation | Indexing data in a table based on data usage statistics |
US11675752B2 (en) * | 2019-09-27 | 2023-06-13 | Atlassian Pty Ltd. | Systems and methods for generating schema notifications |
CN110738023B (en) * | 2019-10-17 | 2020-10-30 | 深圳旗鱼体育传播有限公司 | System and method for converting JSON weather data into JPEG picture |
US11416386B2 (en) | 2019-12-02 | 2022-08-16 | Curtail, Inc. | Behavior-based comparison of software |
US11449461B2 (en) * | 2019-12-17 | 2022-09-20 | Visa International Service Association | Metadata-driven distributed dynamic reader and writer |
US11726995B2 (en) | 2019-12-17 | 2023-08-15 | Hewlett Packard Enterprise Development Lp | System and method for value pack generation using generic SQL plugin for unified console |
US11836122B2 (en) | 2019-12-19 | 2023-12-05 | Capital One Services, Llc | Schema validation with data synthesis |
US10719490B1 (en) | 2019-12-19 | 2020-07-21 | Capital One Services, Llc | Forensic analysis using synthetic datasets |
CN111049854B (en) * | 2019-12-25 | 2021-12-14 | 微民保险代理有限公司 | Service request transmission method and device |
US11308090B2 (en) | 2019-12-26 | 2022-04-19 | Snowflake Inc. | Pruning index to support semi-structured data types |
US11567939B2 (en) * | 2019-12-26 | 2023-01-31 | Snowflake Inc. | Lazy reassembling of semi-structured data |
US11429561B2 (en) * | 2019-12-26 | 2022-08-30 | Yahoo Assets Llc | Replacing database table join keys with index keys |
CN111190929B (en) * | 2019-12-27 | 2023-07-14 | 四川师范大学 | Data storage query method, device, electronic equipment and storage medium |
US11327962B1 (en) * | 2020-01-23 | 2022-05-10 | Rockset, Inc. | Real-time analytical database system for querying data of transactional systems |
US11609777B2 (en) | 2020-02-19 | 2023-03-21 | Nutanix, Inc. | System and method for multi-cluster storage |
US11372871B1 (en) * | 2020-02-21 | 2022-06-28 | Rapid7, Inc. | Programmable framework for distributed computation of statistical functions over time-based data |
US11341135B2 (en) | 2020-02-28 | 2022-05-24 | International Business Machines Corporation | Optimizing JSON document usage |
US11714682B1 (en) | 2020-03-03 | 2023-08-01 | Amazon Technologies, Inc. | Reclaiming computing resources in an on-demand code execution system |
CN111522879B (en) * | 2020-04-16 | 2023-09-29 | 北京雷石天地电子技术有限公司 | Data distribution method based on cache and electronic equipment |
US11436229B2 (en) | 2020-04-28 | 2022-09-06 | Nutanix, Inc. | System and method of updating temporary bucket based on object attribute relationships or metadata relationships |
US12136044B2 (en) * | 2020-05-13 | 2024-11-05 | Paypal, Inc. | Dynamic determination of data load process for a rule engine in a decision service |
US11487787B2 (en) | 2020-05-29 | 2022-11-01 | Nutanix, Inc. | System and method for near-synchronous replication for object store |
CN111625300B (en) * | 2020-06-08 | 2023-03-24 | 成都信息工程大学 | Efficient data acquisition loading method and system |
US11886394B2 (en) * | 2020-08-25 | 2024-01-30 | Red Hat, Inc. | Composable query language gateway routing protocol |
CN112069201A (en) * | 2020-09-04 | 2020-12-11 | 北京百度网讯科技有限公司 | Target data acquisition method and device |
CN112070636B (en) * | 2020-09-09 | 2023-03-21 | 西南交通大学 | Image electronic contract signing and verifying method with multistage evidence chain |
US11693816B2 (en) * | 2020-09-17 | 2023-07-04 | ActionIQ, Inc. | Flexible data ingestion |
TWI809320B (en) * | 2020-10-14 | 2023-07-21 | 國立中央大學 | Adaptive multi-attribute index structure |
US12001872B2 (en) | 2020-10-14 | 2024-06-04 | Nutanix, Inc. | Object tiering from local store to cloud store |
CN112380163A (en) * | 2020-10-20 | 2021-02-19 | 广州西山居世游网络科技有限公司 | S3 file system space occupation monitoring method and system |
US11775487B2 (en) * | 2020-11-12 | 2023-10-03 | Western Digital Technologies, Inc. | Automatic flexible schema detection and migration |
US11900164B2 (en) | 2020-11-24 | 2024-02-13 | Nutanix, Inc. | Intelligent query planning for metric gateway |
US11593270B1 (en) | 2020-11-25 | 2023-02-28 | Amazon Technologies, Inc. | Fast distributed caching using erasure coded object parts |
US11550713B1 (en) | 2020-11-25 | 2023-01-10 | Amazon Technologies, Inc. | Garbage collection in distributed systems using life cycled storage roots |
US11822370B2 (en) | 2020-11-26 | 2023-11-21 | Nutanix, Inc. | Concurrent multiprotocol access to an object storage system |
CN112579287B (en) * | 2020-12-16 | 2024-07-30 | 跬云(上海)信息科技有限公司 | Cloud arrangement system and method based on read-write separation and automatic expansion |
US11928096B2 (en) * | 2020-12-16 | 2024-03-12 | Sap Se | Systems and methods using generic database search models |
US11281689B1 (en) * | 2021-01-13 | 2022-03-22 | Sas Institute Inc. | Distributed interaction feature generation system |
CN112883010A (en) * | 2021-02-02 | 2021-06-01 | 上海七牛信息技术有限公司 | Redis-based IP library management method and device, computer equipment and storage medium |
KR102449580B1 (en) * | 2021-02-15 | 2022-09-30 | (주)아이브릭스 | A method of analyzing unstructured data using a component network-based analysis system |
US11853272B2 (en) | 2021-02-19 | 2023-12-26 | International Business Machines Corporation | Governance based validation framework for JSON data using machine learning |
CN112783901B (en) * | 2021-03-01 | 2023-09-01 | 合沃物联技术(南京)有限公司 | Internet of things time sequence big data processing method based on Internet of things middleware |
CN112653771B (en) * | 2021-03-15 | 2021-06-01 | 浙江贵仁信息科技股份有限公司 | Water conservancy data fragment storage method, on-demand method and processing system |
US11693852B1 (en) | 2021-04-12 | 2023-07-04 | Amdocs Development Limited | System, method, and computer program for normalizing a JSON structure |
US11816157B2 (en) * | 2021-05-05 | 2023-11-14 | Google Llc | Efficient storage and query of schemaless data |
US20240054170A1 (en) * | 2021-05-28 | 2024-02-15 | Xero Limited | Methods and systems for web-based data presentation |
CN113326031B (en) * | 2021-05-28 | 2023-08-22 | 网易(杭州)网络有限公司 | Attribute acquisition method and device |
CN113297296B (en) * | 2021-05-31 | 2022-08-16 | 西南大学 | JSON processing method for multi-style type data |
US11388210B1 (en) | 2021-06-30 | 2022-07-12 | Amazon Technologies, Inc. | Streaming analytics using a serverless compute system |
US11748352B2 (en) * | 2021-08-26 | 2023-09-05 | International Business Machines Corporation | Dynamical database system resource balance |
US11899572B2 (en) | 2021-09-09 | 2024-02-13 | Nutanix, Inc. | Systems and methods for transparent swap-space virtualization |
CN113901120A (en) * | 2021-10-08 | 2022-01-07 | 广东东华发思特软件有限公司 | A method and device for exporting Excel files in batches of large data |
US11893038B2 (en) * | 2021-10-21 | 2024-02-06 | Treasure Data, Inc. | Data type based visual profiling of large-scale database tables |
US12032857B2 (en) | 2021-11-22 | 2024-07-09 | Nutanix, Inc. | System and method for shallow copy |
US11968280B1 (en) | 2021-11-24 | 2024-04-23 | Amazon Technologies, Inc. | Controlling ingestion of streaming data to serverless function executions |
WO2023096587A2 (en) * | 2021-11-29 | 2023-06-01 | Shopee IP Singapore Private Limited | Device and method for preparing data for responding to database queries |
US12015603B2 (en) | 2021-12-10 | 2024-06-18 | Amazon Technologies, Inc. | Multi-tenant mode for serverless code execution |
US12197606B1 (en) * | 2021-12-30 | 2025-01-14 | American Express Travel Related Services Company, Inc. | Inferring schema structure of flat file |
US12020352B2 (en) * | 2022-01-04 | 2024-06-25 | Accenture Global Solutions Limited | Project visualization system |
US12164538B2 (en) * | 2022-02-03 | 2024-12-10 | Datametica Solutions Private Limited | System and method for data warehouse workload transformation |
US11693869B1 (en) | 2022-02-04 | 2023-07-04 | Bank Of America Corporation | Processing queries and commands using a universal intelli-shell instrument |
US11775791B2 (en) | 2022-03-02 | 2023-10-03 | Ricoh Company, Ltd. | Cloud-based parallel ink estimation for production printers |
US11755863B1 (en) | 2022-03-02 | 2023-09-12 | Ricoh Company, Ltd. | Ink estimation model updates for production printers |
US12061632B2 (en) * | 2022-03-29 | 2024-08-13 | Treasure Data, Inc. | Interactive adaptation of machine learning models for time series data |
CN114741393B (en) * | 2022-04-19 | 2023-04-28 | 四川大学 | A material genetic engineering data conversion and retrieval method |
US11928125B2 (en) | 2022-07-05 | 2024-03-12 | Capital One Services, Llc | Cleaning and organizing schemaless semi-structured data for extract, transform, and load processing |
US20240045880A1 (en) * | 2022-08-02 | 2024-02-08 | Sap Se | Compact error tracking logs for etl |
US11947559B1 (en) | 2022-10-10 | 2024-04-02 | Bank Of America Corporation | Dynamic schema identification to process incoming data feeds in a database system |
WO2024263484A1 (en) * | 2023-06-22 | 2024-12-26 | Citibank, N.A. | Systems and methods for generating data transfers using programming language-agnostic data modeling platforms |
US11829340B1 (en) * | 2023-06-22 | 2023-11-28 | Citibank, N.A. | Systems and methods for generating data transfers using programming language-agnostic data modeling platforms |
US20250077478A1 (en) * | 2023-08-31 | 2025-03-06 | Google Llc | Managed Tables for Data Lakes |
CN116955363B (en) * | 2023-09-21 | 2023-12-26 | 北京四维纵横数据技术有限公司 | Method, device, computer equipment and medium for creating index of modeless data |
CN117852524B (en) * | 2023-11-30 | 2025-01-24 | 上海阅维科技股份有限公司 | Method and system for restoring Protobuf format data in network traffic |
Family Cites Families (37)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7007003B1 (en) | 1998-12-04 | 2006-02-28 | Intellisync Corporation | Notification protocol for establishing synchronization mode for use in synchronizing databases |
KR100424481B1 (en) | 2000-06-24 | 2004-03-22 | 엘지전자 주식회사 | Apparatus and method for recording and reproducing a digital broadcasting service information on optical medium |
AU2001290646A1 (en) * | 2000-09-08 | 2002-03-22 | The Regents Of The University Of California | Data source integration system and method |
JP4457184B2 (en) * | 2001-02-13 | 2010-04-28 | ネットアップ,インコーポレイテッド | Failover processing in the storage system |
US6985958B2 (en) * | 2001-03-14 | 2006-01-10 | Microsoft Corporation | Messaging infrastructure for identity-centric data access |
US6785689B1 (en) * | 2001-06-28 | 2004-08-31 | I2 Technologies Us, Inc. | Consolidation of multiple source content schemas into a single target content schema |
US7103848B2 (en) | 2001-09-13 | 2006-09-05 | International Business Machines Corporation | Handheld electronic book reader with annotation and usage tracking capabilities |
AU2002334721B2 (en) | 2001-09-28 | 2008-10-23 | Oracle International Corporation | An index structure to access hierarchical data in a relational database system |
JP2003157249A (en) | 2001-11-21 | 2003-05-30 | Degital Works Kk | Document compression storage method |
US6826568B2 (en) * | 2001-12-20 | 2004-11-30 | Microsoft Corporation | Methods and system for model matching |
US7089260B2 (en) * | 2002-02-14 | 2006-08-08 | International Business Machines Corporation | Database optimization apparatus and method |
AUPS300402A0 (en) * | 2002-06-17 | 2002-07-11 | Canon Kabushiki Kaisha | Indexing and querying structured documents |
US6941412B2 (en) * | 2002-08-29 | 2005-09-06 | Sandisk Corporation | Symbol frequency leveling in a storage system |
US20040148278A1 (en) | 2003-01-22 | 2004-07-29 | Amir Milo | System and method for providing content warehouse |
US7007033B1 (en) * | 2003-04-28 | 2006-02-28 | Microsoft Corporation | Management of markup language data mappings available to a spreadsheet application workbook |
US20040243555A1 (en) | 2003-05-30 | 2004-12-02 | Oracle International Corp. | Methods and systems for optimizing queries through dynamic and autonomous database schema analysis |
US8386503B2 (en) | 2004-01-16 | 2013-02-26 | International Business Machines Corporation | Method and apparatus for entity removal from a content management solution implementing time-based flagging for certainty in a relational database environment |
US8271428B2 (en) * | 2004-05-20 | 2012-09-18 | International Business Machines Corporation | Method and system for creating and loading data warehouse from semi-structured document |
US7844570B2 (en) * | 2004-07-09 | 2010-11-30 | Microsoft Corporation | Database generation systems and methods |
US7627589B2 (en) * | 2004-08-10 | 2009-12-01 | Palo Alto Research Center Incorporated | High performance XML storage retrieval system and method |
CN1760871A (en) | 2004-10-15 | 2006-04-19 | 微软公司 | Mapping of schema data into data structures |
US20060085451A1 (en) * | 2004-10-15 | 2006-04-20 | Microsoft Corporation | Mapping of schema data into data structures |
US7970730B2 (en) * | 2005-01-27 | 2011-06-28 | Microsoft Corporation | Efficient data access via runtime type inference |
JP2006350924A (en) * | 2005-06-20 | 2006-12-28 | Hitachi Ltd | Information processing apparatus, schema creation method, and program |
US9117005B2 (en) * | 2006-05-16 | 2015-08-25 | International Business Machines Corporation | Statistics collection using path-value pairs for relational databases |
US20090132621A1 (en) | 2006-07-28 | 2009-05-21 | Craig Jensen | Selecting storage location for file storage based on storage longevity and speed |
US20080201295A1 (en) * | 2007-02-21 | 2008-08-21 | Mylavarapu Praveena | Caching plans with using data values |
US20090024590A1 (en) * | 2007-03-15 | 2009-01-22 | Sturge Timothy | User contributed knowledge database |
US8868482B2 (en) * | 2008-03-20 | 2014-10-21 | Oracle International Corporation | Inferring schemas from XML document collections |
CN101477572B (en) * | 2009-01-12 | 2010-12-08 | 深圳市里王智通软件有限公司 | Method and system of dynamic data base based on TDS transition data storage technology |
NL2003447C2 (en) * | 2009-05-20 | 2010-08-16 | Megchelen & Tilanus B V Van | METHOD AND SYSTEM FOR CODING AND SPECIFICATING AN OBJECT. |
US9195657B2 (en) * | 2010-03-08 | 2015-11-24 | Microsoft Technology Licensing, Llc | Columnar storage of a database index |
US20130024207A1 (en) * | 2011-07-22 | 2013-01-24 | Medtronic, Inc. | Use of patient-centric records to facilitate analysis of outcomes of medical therapies |
EP2795487A4 (en) * | 2011-12-23 | 2015-07-29 | Amazon Tech Inc | Scalable analysis platform for semi-structured data |
US20130339399A1 (en) * | 2012-06-18 | 2013-12-19 | Dexter A. Dorris | Dynamic Schema |
US9075833B2 (en) * | 2013-01-21 | 2015-07-07 | International Business Machines Corporation | Generating XML schema from JSON data |
EP2973051A4 (en) | 2013-03-15 | 2016-11-16 | Amazon Tech Inc | Scalable analysis platform for semi-structured data |
-
2014
- 2014-03-14 EP EP14764749.9A patent/EP2973051A4/en not_active Withdrawn
- 2014-03-14 US US14/210,495 patent/US10275475B2/en active Active
- 2014-03-14 JP JP2016503110A patent/JP6416194B2/en active Active
- 2014-03-14 CA CA3078018A patent/CA3078018C/en active Active
- 2014-03-14 US US14/213,941 patent/US9613068B2/en active Active
- 2014-03-14 CA CA2906816A patent/CA2906816C/en active Active
- 2014-03-14 CN CN201480021193.7A patent/CN105122243B/en active Active
- 2014-03-14 WO PCT/US2014/029484 patent/WO2014144889A2/en active Application Filing
-
2017
- 2017-04-03 US US15/478,177 patent/US10983967B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
WO2014144889A2 (en) | 2014-09-18 |
CA3078018A1 (en) | 2014-09-18 |
CA2906816A1 (en) | 2014-09-18 |
US20140279834A1 (en) | 2014-09-18 |
US10983967B2 (en) | 2021-04-20 |
US20170206256A1 (en) | 2017-07-20 |
CN105122243B (en) | 2019-02-12 |
JP2016519810A (en) | 2016-07-07 |
US9613068B2 (en) | 2017-04-04 |
US20140279838A1 (en) | 2014-09-18 |
EP2973051A4 (en) | 2016-11-16 |
CA3078018C (en) | 2023-08-22 |
CN105122243A (en) | 2015-12-02 |
EP2973051A2 (en) | 2016-01-20 |
CA2906816C (en) | 2020-06-30 |
US10275475B2 (en) | 2019-04-30 |
WO2014144889A3 (en) | 2014-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6416194B2 (en) | Scalable analytic platform for semi-structured data | |
JP6617117B2 (en) | Scalable analysis platform for semi-structured data | |
US10977234B2 (en) | Combining compressed and uncompressed data at query time for efficient database analytics | |
US10509785B2 (en) | Policy-driven data manipulation in time-series database systems | |
KR102627690B1 (en) | Dimensional context propagation techniques for optimizing SKB query plans | |
EP3903205B1 (en) | Technique of comprehensively support autonomous json document object (ajd) cloud service | |
Jensen et al. | Time series management systems: A survey | |
WO2013074665A1 (en) | Data processing service | |
Marcu | KerA: A Unified Ingestion and Storage System for Scalable Big Data Processing | |
Sinthong et al. | AFrame: Extending DataFrames for large-scale modern data analysis (Extended Version) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160527 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160713 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170621 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170718 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20171018 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180306 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180409 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20180911 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20181003 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6416194 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |