[CALCITE-1559] Convert example models to stricter JSON
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/b0362231 Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/b0362231 Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/b0362231 Branch: refs/heads/master Commit: b0362231a6b1cbc85a0e1fe2308d2476800f1511 Parents: d4557f1 Author: Julian Hyde <[email protected]> Authored: Mon Jan 2 23:35:14 2017 -0800 Committer: Julian Hyde <[email protected]> Committed: Tue Jan 3 01:32:58 2017 -0800 ---------------------------------------------------------------------- cassandra/src/test/resources/model.json | 18 +- .../hsqldb-foodmart-lattice-model.json | 62 ++--- core/src/test/resources/hsqldb-model.json | 62 ++--- .../resources/mysql-foodmart-lattice-model.json | 62 ++--- .../test/resources/mysql-foodmart-model.json | 20 +- example/csv/src/test/resources/bug.json | 16 +- .../src/test/resources/filterable-model.json | 18 +- .../src/test/resources/model-stream-table.json | 26 +- .../test/resources/model-with-custom-table.json | 22 +- .../csv/src/test/resources/model-with-view.json | 24 +- example/csv/src/test/resources/model.json | 16 +- .../src/test/resources/order-stream-table.json | 36 +-- example/csv/src/test/resources/smart.json | 18 +- .../test/resources/mongo-foodmart-model.json | 244 +++++++++---------- .../src/test/resources/mongo-zips-model.json | 28 +-- 15 files changed, 336 insertions(+), 336 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/cassandra/src/test/resources/model.json ---------------------------------------------------------------------- diff --git a/cassandra/src/test/resources/model.json b/cassandra/src/test/resources/model.json index 29ca31e..5713d11 100644 --- a/cassandra/src/test/resources/model.json +++ b/cassandra/src/test/resources/model.json @@ -15,16 +15,16 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'twissandra', - schemas: [ + "version": "1.0", + "defaultSchema": "twissandra", + "schemas": [ { - name: 'twissandra', - type: 'custom', - factory: 'org.apache.calcite.adapter.cassandra.CassandraSchemaFactory', - operand: { - host: 'localhost', - keyspace: 'twissandra' + "name": "twissandra", + "type": "custom", + "factory": "org.apache.calcite.adapter.cassandra.CassandraSchemaFactory", + "operand": { + "host": "localhost", + "keyspace": "twissandra" } } ] http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/core/src/test/resources/hsqldb-foodmart-lattice-model.json ---------------------------------------------------------------------- diff --git a/core/src/test/resources/hsqldb-foodmart-lattice-model.json b/core/src/test/resources/hsqldb-foodmart-lattice-model.json index bf2543e..0643696 100644 --- a/core/src/test/resources/hsqldb-foodmart-lattice-model.json +++ b/core/src/test/resources/hsqldb-foodmart-lattice-model.json @@ -15,43 +15,43 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'foodmart', - schemas: [ { - type: 'jdbc', - name: 'foodmart', - jdbcUser: 'FOODMART', - jdbcPassword: 'FOODMART', - jdbcUrl: 'jdbc:hsqldb:res:foodmart', - /* jdbcCatalog: 'foodmart', */ - jdbcSchema: 'foodmart' + "version": "1.0", + "defaultSchema": "foodmart", + "schemas": [ { + "type": "jdbc", + "name": "foodmart", + "jdbcUser": "FOODMART", + "jdbcPassword": "FOODMART", + "jdbcUrl": "jdbc:hsqldb:res:foodmart", + /* "jdbcCatalog": "foodmart", */ + "jdbcSchema": "foodmart" }, { - name: 'adhoc', - lattices: [ { - name: 'star', - sql: [ - 'select 1 from "foodmart"."sales_fact_1997" as "s"', - 'join "foodmart"."product" as "p" using ("product_id")', - 'join "foodmart"."time_by_day" as "t" using ("time_id")', - 'join "foodmart"."product_class" as "pc" on "p"."product_class_id" = "pc"."product_class_id"' + "name": "adhoc", + "lattices": [ { + "name": "star", + "sql": [ + "select 1 from \"foodmart\".\"sales_fact_1997\" as \"s\"", + "join \"foodmart\".\"product\" as \"p\" using (\"product_id\")", + "join \"foodmart\".\"time_by_day\" as \"t\" using (\"time_id\")", + "join \"foodmart\".\"product_class\" as \"pc\" on \"p\".\"product_class_id\" = \"pc\".\"product_class_id\"" ], - auto: true, - algorithm: false, - rowCountEstimate: 86837, - defaultMeasures: [ { - agg: 'count' + "auto": true, + "algorithm": true, + "rowCountEstimate": 86837, + "defaultMeasures": [ { + "agg": "count" } ], - tiles: [ { - dimensions: [ 'the_year', ['t', 'quarter'] ], - measures: [ { - agg: 'sum', - args: 'unit_sales' + "tiles": [ { + "dimensions": [ "the_year", ["t", "quarter"] ], + "measures": [ { + "agg": "sum", + "args": "unit_sales" }, { - agg: 'sum', - args: 'store_sales' + "agg": "sum", + "args": "store_sales" }, { - agg: 'count' + "agg": "count" } ] } ] } ] http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/core/src/test/resources/hsqldb-model.json ---------------------------------------------------------------------- diff --git a/core/src/test/resources/hsqldb-model.json b/core/src/test/resources/hsqldb-model.json index a53efef..5aec1e6 100644 --- a/core/src/test/resources/hsqldb-model.json +++ b/core/src/test/resources/hsqldb-model.json @@ -15,41 +15,41 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'SCOTT', - schemas: [ { - type: 'jdbc', - name: 'FOODMART', - jdbcUser: 'FOODMART', - jdbcPassword: 'FOODMART', - jdbcUrl: 'jdbc:hsqldb:res:foodmart', - jdbcSchema: 'foodmart' + "version": "1.0", + "defaultSchema": "SCOTT", + "schemas": [ { + "type": "jdbc", + "name": "FOODMART", + "jdbcUser": "FOODMART", + "jdbcPassword": "FOODMART", + "jdbcUrl": "jdbc:hsqldb:res:foodmart", + "jdbcSchema": "foodmart" }, { - type: 'jdbc', - name: 'SCOTT', - jdbcUser: 'SA', - jdbcPassword: '', - jdbcUrl: 'jdbc:hsqldb:res:scott', - jdbcSchema: 'SCOTT' + "type": "jdbc", + "name": "SCOTT", + "jdbcUser": "SA", + "jdbcPassword": "", + "jdbcUrl": "jdbc:hsqldb:res:scott", + "jdbcSchema": "SCOTT" }, { - type: 'custom', - name: 'FOODMART_CLONE', - factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory', - operand: { - jdbcUser: 'FOODMART', - jdbcPassword: 'FOODMART', - jdbcUrl: 'jdbc:hsqldb:res:foodmart', - jdbcSchema: 'foodmart' + "type": "custom", + "name": "FOODMART_CLONE", + "factory": "org.apache.calcite.adapter.clone.CloneSchema$Factory", + "operand": { + "jdbcUser": "FOODMART", + "jdbcPassword": "FOODMART", + "jdbcUrl": "jdbc:hsqldb:res:foodmart", + "jdbcSchema": "foodmart" } }, { - type: 'custom', - name: 'SCOTT_CLONE', - factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory', - operand: { - jdbcUser: 'SA', - jdbcPassword: '', - jdbcUrl: 'jdbc:hsqldb:res:scott', - jdbcSchema: 'SCOTT' + "type": "custom", + "name": "SCOTT_CLONE", + "factory": "org.apache.calcite.adapter.clone.CloneSchema$Factory", + "operand": { + "jdbcUser": "SA", + "jdbcPassword": "", + "jdbcUrl": "jdbc:hsqldb:res:scott", + "jdbcSchema": "SCOTT" } } ] } http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/core/src/test/resources/mysql-foodmart-lattice-model.json ---------------------------------------------------------------------- diff --git a/core/src/test/resources/mysql-foodmart-lattice-model.json b/core/src/test/resources/mysql-foodmart-lattice-model.json index 09e574e..ed2eab0 100644 --- a/core/src/test/resources/mysql-foodmart-lattice-model.json +++ b/core/src/test/resources/mysql-foodmart-lattice-model.json @@ -15,43 +15,43 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'foodmart', - schemas: [ { - type: 'jdbc', - name: 'foodmart', - jdbcUser: 'foodmart', - jdbcPassword: 'foodmart', - jdbcUrl: 'jdbc:mysql://localhost', - jdbcCatalog: 'foodmart', - jdbcSchema: null + "version": "1.0", + "defaultSchema": "foodmart", + "schemas": [ { + "type": "jdbc", + "name": "foodmart", + "jdbcUser": "foodmart", + "jdbcPassword": "foodmart", + "jdbcUrl": "jdbc:mysql://localhost", + "jdbcCatalog": "foodmart", + "jdbcSchema": null }, { - name: 'adhoc', - lattices: [ { - name: 'star', - sql: [ - 'select 1 from "foodmart"."sales_fact_1997" as "s"', - 'join "foodmart"."product" as "p" using ("product_id")', - 'join "foodmart"."time_by_day" as "t" using ("time_id")', - 'join "foodmart"."product_class" as "pc" on "p"."product_class_id" = "pc"."product_class_id"' + "name": "adhoc", + "lattices": [ { + "name": "star", + "sql": [ + "select 1 from \"foodmart\".\"sales_fact_1997\" as \"s\"", + "join \"foodmart\".\"product\" as \"p\" using (\"product_id\")", + "join \"foodmart\".\"time_by_day\" as \"t\" using (\"time_id\")", + "join \"foodmart\".\"product_class\" as \"pc\" on \"p\".\"product_class_id\" = \"pc\".\"product_class_id\"" ], - auto: false, - algorithm: true, - rowCountEstimate: 86837, - defaultMeasures: [ { - agg: 'count' + "auto": false, + "algorithm": true, + "rowCountEstimate": 86837, + "defaultMeasures": [ { + "agg": "count" } ], - tiles: [ { - dimensions: [ 'the_year', ['t', 'quarter'] ], - measures: [ { - agg: 'sum', - args: 'unit_sales' + "tiles": [ { + "dimensions": [ "the_year", ["t", "quarter"] ], + "measures": [ { + "agg": "sum", + "args": "unit_sales" }, { - agg: 'sum', - args: 'store_sales' + "agg": "sum", + "args": "store_sales" }, { - agg: 'count' + "agg": "count" } ] } ] } ] http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/core/src/test/resources/mysql-foodmart-model.json ---------------------------------------------------------------------- diff --git a/core/src/test/resources/mysql-foodmart-model.json b/core/src/test/resources/mysql-foodmart-model.json index 16dc25a..d5b740b 100644 --- a/core/src/test/resources/mysql-foodmart-model.json +++ b/core/src/test/resources/mysql-foodmart-model.json @@ -15,17 +15,17 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'foodmart', - schemas: [ + "version": "1.0", + "defaultSchema": "foodmart", + "schemas": [ { - type: 'jdbc', - name: 'foodmart', - jdbcUser: 'foodmart', - jdbcPassword: 'foodmart', - jdbcUrl: 'jdbc:mysql://localhost', - jdbcCatalog: 'foodmart', - jdbcSchema: null + "type": "jdbc", + "name": "foodmart", + "jdbcUser": "foodmart", + "jdbcPassword": "foodmart", + "jdbcUrl": "jdbc:mysql://localhost", + "jdbcCatalog": "foodmart", + "jdbcSchema": null } ] } http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/bug.json ---------------------------------------------------------------------- diff --git a/example/csv/src/test/resources/bug.json b/example/csv/src/test/resources/bug.json index 1b4fece..acc939d 100644 --- a/example/csv/src/test/resources/bug.json +++ b/example/csv/src/test/resources/bug.json @@ -15,15 +15,15 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'BUG', - schemas: [ + "version": "1.0", + "defaultSchema": "BUG", + "schemas": [ { - name: 'BUG', - type: 'custom', - factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory', - operand: { - directory: 'bug' + "name": "BUG", + "type": "custom", + "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory", + "operand": { + "directory": "bug" } } ] http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/filterable-model.json ---------------------------------------------------------------------- diff --git a/example/csv/src/test/resources/filterable-model.json b/example/csv/src/test/resources/filterable-model.json index e53fd32..012cb83 100644 --- a/example/csv/src/test/resources/filterable-model.json +++ b/example/csv/src/test/resources/filterable-model.json @@ -19,16 +19,16 @@ * These tables can implement their own simple filtering. */ { - version: '1.0', - defaultSchema: 'SALES', - schemas: [ + "version": "1.0", + "defaultSchema": "SALES", + "schemas": [ { - name: 'SALES', - type: 'custom', - factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory', - operand: { - directory: 'sales', - flavor: "FILTERABLE" + "name": "SALES", + "type": "custom", + "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory", + "operand": { + "directory": "sales", + "flavor": "FILTERABLE" } } ] http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/model-stream-table.json ---------------------------------------------------------------------- diff --git a/example/csv/src/test/resources/model-stream-table.json b/example/csv/src/test/resources/model-stream-table.json index 62d6cba..8bac5f4 100644 --- a/example/csv/src/test/resources/model-stream-table.json +++ b/example/csv/src/test/resources/model-stream-table.json @@ -15,22 +15,22 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'STREAM', - schemas: [ + "version": "1.0", + "defaultSchema": "STREAM", + "schemas": [ { - name: 'SS', - tables: [ + "name": "SS", + "tables": [ { - name: 'DEPTS', - type: 'custom', - factory: 'org.apache.calcite.adapter.csv.CsvStreamTableFactory', - stream: { - stream: true + "name": "DEPTS", + "type": "custom", + "factory": "org.apache.calcite.adapter.csv.CsvStreamTableFactory", + "stream": { + "stream": true }, - operand: { - file: 'sales/SDEPTS.csv', - flavor: "scannable" + "operand": { + "file": "sales/SDEPTS.csv", + "flavor": "scannable" } } ] http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/model-with-custom-table.json ---------------------------------------------------------------------- diff --git a/example/csv/src/test/resources/model-with-custom-table.json b/example/csv/src/test/resources/model-with-custom-table.json index 28d5b38..f8da8f1 100644 --- a/example/csv/src/test/resources/model-with-custom-table.json +++ b/example/csv/src/test/resources/model-with-custom-table.json @@ -15,19 +15,19 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'CUSTOM_TABLE', - schemas: [ + "version": "1.0", + "defaultSchema": "CUSTOM_TABLE", + "schemas": [ { - name: 'CUSTOM_TABLE', - tables: [ + "name": "CUSTOM_TABLE", + "tables": [ { - name: 'EMPS', - type: 'custom', - factory: 'org.apache.calcite.adapter.csv.CsvTableFactory', - operand: { - file: 'sales/EMPS.csv.gz', - flavor: "scannable" + "name": "EMPS", + "type": "custom", + "factory": "org.apache.calcite.adapter.csv.CsvTableFactory", + "operand": { + "file": "sales/EMPS.csv.gz", + "flavor": "scannable" } } ] http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/model-with-view.json ---------------------------------------------------------------------- diff --git a/example/csv/src/test/resources/model-with-view.json b/example/csv/src/test/resources/model-with-view.json index 2c190e9..3d33ff8 100644 --- a/example/csv/src/test/resources/model-with-view.json +++ b/example/csv/src/test/resources/model-with-view.json @@ -17,21 +17,21 @@ * A JSON model of a Calcite schema that includes a view. */ { - version: '1.0', - defaultSchema: 'SALES', - schemas: [ + "version": "1.0", + "defaultSchema": "SALES", + "schemas": [ { - name: 'SALES', - type: 'custom', - factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory', - operand: { - directory: 'sales' + "name": "SALES", + "type": "custom", + "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory", + "operand": { + "directory": "sales" }, - tables: [ + "tables": [ { - name: 'FEMALE_EMPS', - type: 'view', - sql: 'SELECT * FROM emps WHERE gender = \'F\'' + "name": "FEMALE_EMPS", + "type": "view", + "sql": "SELECT * FROM emps WHERE gender = 'F'" } ] } http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/model.json ---------------------------------------------------------------------- diff --git a/example/csv/src/test/resources/model.json b/example/csv/src/test/resources/model.json index 60431a8..d6799bc 100644 --- a/example/csv/src/test/resources/model.json +++ b/example/csv/src/test/resources/model.json @@ -17,15 +17,15 @@ * A JSON model of a simple Calcite schema. */ { - version: '1.0', - defaultSchema: 'SALES', - schemas: [ + "version": "1.0", + "defaultSchema": "SALES", + "schemas": [ { - name: 'SALES', - type: 'custom', - factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory', - operand: { - directory: 'sales' + "name": "SALES", + "type": "custom", + "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory", + "operand": { + "directory": "sales" } } ] http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/order-stream-table.json ---------------------------------------------------------------------- diff --git a/example/csv/src/test/resources/order-stream-table.json b/example/csv/src/test/resources/order-stream-table.json index 8308846..4bbb317 100644 --- a/example/csv/src/test/resources/order-stream-table.json +++ b/example/csv/src/test/resources/order-stream-table.json @@ -15,30 +15,30 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'foodmart', - schemas: [ + "version": "1.0", + "defaultSchema": "foodmart", + "schemas": [ { - name: 'STREAMS', - tables: [ { - type: 'custom', - name: 'ORDERS', - stream: { - stream: true + "name": "STREAMS", + "tables": [ { + "type": "custom", + "name": "ORDERS", + "stream": { + "stream": true }, - factory: 'org.apache.calcite.test.StreamTest$OrdersStreamTableFactory' + "factory": "org.apache.calcite.test.StreamTest$OrdersStreamTableFactory" } ] }, { - name: 'INFINITE_STREAMS', - tables: [ { - type: 'custom', - name: 'ORDERS', - stream: { - stream: true + "name": "INFINITE_STREAMS", + "tables": [ { + "type": "custom", + "name": "ORDERS", + "stream": { + "stream": true }, - factory: 'org.apache.calcite.test.StreamTest$InfiniteOrdersStreamTableFactory' + "factory": "org.apache.calcite.test.StreamTest$InfiniteOrdersStreamTableFactory" } ] } ] -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/example/csv/src/test/resources/smart.json ---------------------------------------------------------------------- diff --git a/example/csv/src/test/resources/smart.json b/example/csv/src/test/resources/smart.json index b948259..1e1f0a8 100644 --- a/example/csv/src/test/resources/smart.json +++ b/example/csv/src/test/resources/smart.json @@ -24,16 +24,16 @@ * relational expression which participates in query planning. */ { - version: '1.0', - defaultSchema: 'SALES', - schemas: [ + "version": "1.0", + "defaultSchema": "SALES", + "schemas": [ { - name: 'SALES', - type: 'custom', - factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory', - operand: { - directory: 'sales', - flavor: "TRANSLATABLE" + "name": "SALES", + "type": "custom", + "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory", + "operand": { + "directory": "sales", + "flavor": "TRANSLATABLE" } } ] http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/mongodb/src/test/resources/mongo-foodmart-model.json ---------------------------------------------------------------------- diff --git a/mongodb/src/test/resources/mongo-foodmart-model.json b/mongodb/src/test/resources/mongo-foodmart-model.json index b472d57..f83ca44 100644 --- a/mongodb/src/test/resources/mongo-foodmart-model.json +++ b/mongodb/src/test/resources/mongo-foodmart-model.json @@ -15,205 +15,205 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'foodmart', - schemas: [ + "version": "1.0", + "defaultSchema": "foodmart", + "schemas": [ { - type: 'custom', - name: 'foodmart_raw', - factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory', - operand: { - host: 'localhost', - database: 'foodmart' + "type": "custom", + "name": "foodmart_raw", + "factory": "org.apache.calcite.adapter.mongodb.MongoSchemaFactory", + "operand": { + "host": "localhost", + "database": "foodmart" } }, { - name: 'foodmart', - tables: [ + "name": "foodmart", + "tables": [ { - name: 'sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_1997\"' + "name": "sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_1997\"" }, { - name: 'sales_fact_1998', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_1998\"' + "name": "sales_fact_1998", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_1998\"" }, { - name: 'sales_fact_dec_1998', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_dec_1998\"' + "name": "sales_fact_dec_1998", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\"\nfrom \"foodmart_raw\".\"sales_fact_dec_1998\"" }, { - name: 'inventory_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'warehouse_id\'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'units_ordered\'] AS INTEGER) AS \"units_ordered\",\n cast(_MAP[\'units_shipped\'] AS INTEGER) AS \"units_shipped\",\n cast(_MAP[\'warehouse_sales\'] AS DECIMAL(10,4)) AS \"warehouse_sales\",\n cast(_MAP[\'warehouse_cost\'] AS DECIMAL(10,4)) AS \"warehouse_cost\",\n cast(_MAP[\'supply_time\'] AS SMALLINT) AS \"supply_time\",\n cast(_MAP[\'store_invoice\'] AS DECIMAL(10,4)) AS \"store_invoice\"\nfrom \"foodmart_raw\".\"inventory_fact_1997\"' + "name": "inventory_fact_1997", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['warehouse_id'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['units_ordered'] AS INTEGER) AS \"units_ordered\",\n cast(_MAP['units_shipped'] AS INTEGER) AS \"units_shipped\",\n cast(_MAP['warehouse_sales'] AS DECIMAL(10,4)) AS \"warehouse_sales\",\n cast(_MAP['warehouse_cost'] AS DECIMAL(10,4)) AS \"warehouse_cost\",\n cast(_MAP['supply_time'] AS SMALLINT) AS \"supply_time\",\n cast(_MAP['store_invoice'] AS DECIMAL(10,4)) AS \"store_invoice\"\nfrom \"foodmart_raw\".\"inventory_fact_1997\"" }, { - name: 'inventory_fact_1998', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'warehouse_id\'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'units_ordered\'] AS INTEGER) AS \"units_ordered\",\n cast(_MAP[\'units_shipped\'] AS INTEGER) AS \"units_shipped\",\n cast(_MAP[\'warehouse_sales\'] AS DECIMAL(10,4)) AS \"warehouse_sales\",\n cast(_MAP[\'warehouse_cost\'] AS DECIMAL(10,4)) AS \"warehouse_cost\",\n cast(_MAP[\'supply_time\'] AS SMALLINT) AS \"supply_time\",\n cast(_MAP[\'store_invoice\'] AS DECIMAL(10,4)) AS \"store_invoice\"\nfrom \"foodmart_raw\".\"inventory_fact_1998\"' + "name": "inventory_fact_1998", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['warehouse_id'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['units_ordered'] AS INTEGER) AS \"units_ordered\",\n cast(_MAP['units_shipped'] AS INTEGER) AS \"units_shipped\",\n cast(_MAP['warehouse_sales'] AS DECIMAL(10,4)) AS \"warehouse_sales\",\n cast(_MAP['warehouse_cost'] AS DECIMAL(10,4)) AS \"warehouse_cost\",\n cast(_MAP['supply_time'] AS SMALLINT) AS \"supply_time\",\n cast(_MAP['store_invoice'] AS DECIMAL(10,4)) AS \"store_invoice\"\nfrom \"foodmart_raw\".\"inventory_fact_1998\"" }, { - name: 'agg_pl_01_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'store_sales_sum\'] AS DECIMAL(10,4)) AS \"store_sales_sum\",\n cast(_MAP[\'store_cost_sum\'] AS DECIMAL(10,4)) AS \"store_cost_sum\",\n cast(_MAP[\'unit_sales_sum\'] AS DECIMAL(10,4)) AS \"unit_sales_sum\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_pl_01_sales_fact_1997\"' + "name": "agg_pl_01_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['store_sales_sum'] AS DECIMAL(10,4)) AS \"store_sales_sum\",\n cast(_MAP['store_cost_sum'] AS DECIMAL(10,4)) AS \"store_cost_sum\",\n cast(_MAP['unit_sales_sum'] AS DECIMAL(10,4)) AS \"unit_sales_sum\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_pl_01_sales_fact_1997\"" }, { - name: 'agg_ll_01_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_ll_01_sales_fact_1997\"' + "name": "agg_ll_01_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_ll_01_sales_fact_1997\"" }, { - name: 'agg_l_03_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_03_sales_fact_1997\"' + "name": "agg_l_03_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_03_sales_fact_1997\"" }, { - name: 'agg_l_04_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'customer_count\'] AS INTEGER) AS \"customer_count\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_04_sales_fact_1997\"' + "name": "agg_l_04_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['customer_count'] AS INTEGER) AS \"customer_count\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_04_sales_fact_1997\"" }, { - name: 'agg_l_05_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_05_sales_fact_1997\"' + "name": "agg_l_05_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_l_05_sales_fact_1997\"" }, { - name: 'agg_c_10_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'month_of_year\'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP[\'quarter\'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP[\'the_year\'] AS SMALLINT) AS \"the_year\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'customer_count\'] AS INTEGER) AS \"customer_count\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_10_sales_fact_1997\"' + "name": "agg_c_10_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['month_of_year'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP['quarter'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP['the_year'] AS SMALLINT) AS \"the_year\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['customer_count'] AS INTEGER) AS \"customer_count\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_10_sales_fact_1997\"" }, { - name: 'agg_c_14_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'month_of_year\'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP[\'quarter\'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP[\'the_year\'] AS SMALLINT) AS \"the_year\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_14_sales_fact_1997\"' + "name": "agg_c_14_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['month_of_year'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP['quarter'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP['the_year'] AS SMALLINT) AS \"the_year\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_14_sales_fact_1997\"" }, { - name: 'agg_lc_100_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'quarter\'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP[\'the_year\'] AS SMALLINT) AS \"the_year\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_lc_100_sales_fact_1997\"' + "name": "agg_lc_100_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['quarter'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP['the_year'] AS SMALLINT) AS \"the_year\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_lc_100_sales_fact_1997\"" }, { - name: 'agg_c_special_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'time_month\'] AS SMALLINT) AS \"time_month\",\n cast(_MAP[\'time_quarter\'] AS VARCHAR(30)) AS \"time_quarter\",\n cast(_MAP[\'time_year\'] AS SMALLINT) AS \"time_year\",\n cast(_MAP[\'store_sales_sum\'] AS DECIMAL(10,4)) AS \"store_sales_sum\",\n cast(_MAP[\'store_cost_sum\'] AS DECIMAL(10,4)) AS \"store_cost_sum\",\n cast(_MAP[\'unit_sales_sum\'] AS DECIMAL(10,4)) AS \"unit_sales_sum\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_special_sales_fact_1997\"' + "name": "agg_c_special_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['time_month'] AS SMALLINT) AS \"time_month\",\n cast(_MAP['time_quarter'] AS VARCHAR(30)) AS \"time_quarter\",\n cast(_MAP['time_year'] AS SMALLINT) AS \"time_year\",\n cast(_MAP['store_sales_sum'] AS DECIMAL(10,4)) AS \"store_sales_sum\",\n cast(_MAP['store_cost_sum'] AS DECIMAL(10,4)) AS \"store_cost_sum\",\n cast(_MAP['unit_sales_sum'] AS DECIMAL(10,4)) AS \"unit_sales_sum\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_c_special_sales_fact_1997\"" }, { - name: 'agg_g_ms_pcat_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'gender\'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP[\'marital_status\'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP[\'product_family\'] AS VARCHAR(30)) AS \"product_family\",\n cast(_MAP[\'product_department\'] AS VARCHAR(30)) AS \"product_department\",\n cast(_MAP[\'product_category\'] AS VARCHAR(30)) AS \"product_category\",\n cast(_MAP[\'month_of_year\'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP[\'quarter\'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP[\'the_year\'] AS SMALLINT) AS \"the_year\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'customer_count\'] AS INTEGER) AS \"customer_count\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_g_ms_pcat_sales_fact_1997\"' + "name": "agg_g_ms_pcat_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['gender'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP['marital_status'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP['product_family'] AS VARCHAR(30)) AS \"product_family\",\n cast(_MAP['product_department'] AS VARCHAR(30)) AS \"product_department\",\n cast(_MAP['product_category'] AS VARCHAR(30)) AS \"product_category\",\n cast(_MAP['month_of_year'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP['quarter'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP['the_year'] AS SMALLINT) AS \"the_year\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['customer_count'] AS INTEGER) AS \"customer_count\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_g_ms_pcat_sales_fact_1997\"" }, { - name: 'agg_lc_06_sales_fact_1997', - type: 'view', - sql: 'select cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'city\'] AS VARCHAR(30)) AS \"city\",\n cast(_MAP[\'state_province\'] AS VARCHAR(30)) AS \"state_province\",\n cast(_MAP[\'country\'] AS VARCHAR(30)) AS \"country\",\n cast(_MAP[\'store_sales\'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP[\'store_cost\'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP[\'unit_sales\'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP[\'fact_count\'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_lc_06_sales_fact_1997\"' + "name": "agg_lc_06_sales_fact_1997", + "type": "view", + "sql": "select cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['city'] AS VARCHAR(30)) AS \"city\",\n cast(_MAP['state_province'] AS VARCHAR(30)) AS \"state_province\",\n cast(_MAP['country'] AS VARCHAR(30)) AS \"country\",\n cast(_MAP['store_sales'] AS DECIMAL(10,4)) AS \"store_sales\",\n cast(_MAP['store_cost'] AS DECIMAL(10,4)) AS \"store_cost\",\n cast(_MAP['unit_sales'] AS DECIMAL(10,4)) AS \"unit_sales\",\n cast(_MAP['fact_count'] AS INTEGER) AS \"fact_count\"\nfrom \"foodmart_raw\".\"agg_lc_06_sales_fact_1997\"" }, { - name: 'currency', - type: 'view', - sql: 'select cast(_MAP[\'currency_id\'] AS INTEGER) AS \"currency_id\",\n cast(_MAP[\'date\'] AS DATE) AS \"date\",\n cast(_MAP[\'currency\'] AS VARCHAR(30)) AS \"currency\",\n cast(_MAP[\'conversion_ratio\'] AS DECIMAL(10,4)) AS \"conversion_ratio\"\nfrom \"foodmart_raw\".\"currency\"' + "name": "currency", + "type": "view", + "sql": "select cast(_MAP['currency_id'] AS INTEGER) AS \"currency_id\",\n cast(_MAP['date'] AS DATE) AS \"date\",\n cast(_MAP['currency'] AS VARCHAR(30)) AS \"currency\",\n cast(_MAP['conversion_ratio'] AS DECIMAL(10,4)) AS \"conversion_ratio\"\nfrom \"foodmart_raw\".\"currency\"" }, { - name: 'account', - type: 'view', - sql: 'select cast(_MAP[\'account_id\'] AS INTEGER) AS \"account_id\",\n cast(_MAP[\'account_parent\'] AS INTEGER) AS \"account_parent\",\n cast(_MAP[\'account_description\'] AS VARCHAR(30)) AS \"account_description\",\n cast(_MAP[\'account_type\'] AS VARCHAR(30)) AS \"account_type\",\n cast(_MAP[\'account_rollup\'] AS VARCHAR(30)) AS \"account_rollup\",\n cast(_MAP[\'Custom_Members\'] AS VARCHAR(255)) AS \"Custom_Members\"\nfrom \"foodmart_raw\".\"account\"' + "name": "account", + "type": "view", + "sql": "select cast(_MAP['account_id'] AS INTEGER) AS \"account_id\",\n cast(_MAP['account_parent'] AS INTEGER) AS \"account_parent\",\n cast(_MAP['account_description'] AS VARCHAR(30)) AS \"account_description\",\n cast(_MAP['account_type'] AS VARCHAR(30)) AS \"account_type\",\n cast(_MAP['account_rollup'] AS VARCHAR(30)) AS \"account_rollup\",\n cast(_MAP['Custom_Members'] AS VARCHAR(255)) AS \"Custom_Members\"\nfrom \"foodmart_raw\".\"account\"" }, { - name: 'category', - type: 'view', - sql: 'select cast(_MAP[\'category_id\'] AS VARCHAR(30)) AS \"category_id\",\n cast(_MAP[\'category_parent\'] AS VARCHAR(30)) AS \"category_parent\",\n cast(_MAP[\'category_description\'] AS VARCHAR(30)) AS \"category_description\",\n cast(_MAP[\'category_rollup\'] AS VARCHAR(30)) AS \"category_rollup\"\nfrom \"foodmart_raw\".\"category\"' + "name": "category", + "type": "view", + "sql": "select cast(_MAP['category_id'] AS VARCHAR(30)) AS \"category_id\",\n cast(_MAP['category_parent'] AS VARCHAR(30)) AS \"category_parent\",\n cast(_MAP['category_description'] AS VARCHAR(30)) AS \"category_description\",\n cast(_MAP['category_rollup'] AS VARCHAR(30)) AS \"category_rollup\"\nfrom \"foodmart_raw\".\"category\"" }, { - name: 'customer', - type: 'view', - sql: 'select cast(_MAP[\'customer_id\'] AS INTEGER) AS \"customer_id\",\n cast(_MAP[\'account_num\'] AS BIGINT) AS \"account_num\",\n cast(_MAP[\'lname\'] AS VARCHAR(30)) AS \"lname\",\n cast(_MAP[\'fname\'] AS VARCHAR(30)) AS \"fname\",\n cast(_MAP[\'mi\'] AS VARCHAR(30)) AS \"mi\",\n cast(_MAP[\'address1\'] AS VARCHAR(30)) AS \"address1\",\n cast(_MAP[\'address2\'] AS VARCHAR(30)) AS \"address2\",\n cast(_MAP[\'address3\'] AS VARCHAR(30)) AS \"address3\",\n cast(_MAP[\'address4\'] AS VARCHAR(30)) AS \"address4\",\n cast(_MAP[\'city\'] AS VARCHAR(30)) AS \"city\",\n cast(_MAP[\'state_province\'] AS VARCHAR(30)) AS \"state_province\",\n cast(_MAP[\'postal_code\'] AS VARCHAR(30)) AS \"postal_code\",\n cast(_MAP[\'country\'] AS VARCHAR(30)) AS \"country\",\n cast(_MAP[\'customer_region_id\'] AS INTEGER) AS \"customer_region_id\",\n cast(_MAP[\'phone1\'] AS VARCHAR(30)) AS \"phone1\",\n cast(_MAP[\'phone2\'] AS VARCHAR(30)) AS \"phone2\",\n cast(_MAP[\'birthdate\'] AS DATE) A S \"birthdate\",\n cast(_MAP[\'marital_status\'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP[\'yearly_income\'] AS VARCHAR(30)) AS \"yearly_income\",\n cast(_MAP[\'gender\'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP[\'total_children\'] AS SMALLINT) AS \"total_children\",\n cast(_MAP[\'num_children_at_home\'] AS SMALLINT) AS \"num_children_at_home\",\n cast(_MAP[\'education\'] AS VARCHAR(30)) AS \"education\",\n cast(_MAP[\'date_accnt_opened\'] AS DATE) AS \"date_accnt_opened\",\n cast(_MAP[\'member_card\'] AS VARCHAR(30)) AS \"member_card\",\n cast(_MAP[\'occupation\'] AS VARCHAR(30)) AS \"occupation\",\n cast(_MAP[\'houseowner\'] AS VARCHAR(30)) AS \"houseowner\",\n cast(_MAP[\'num_cars_owned\'] AS INTEGER) AS \"num_cars_owned\",\n cast(_MAP[\'fullname\'] AS VARCHAR(60)) AS \"fullname\"\nfrom \"foodmart_raw\".\"customer\"' + "name": "customer", + "type": "view", + "sql": "select cast(_MAP['customer_id'] AS INTEGER) AS \"customer_id\",\n cast(_MAP['account_num'] AS BIGINT) AS \"account_num\",\n cast(_MAP['lname'] AS VARCHAR(30)) AS \"lname\",\n cast(_MAP['fname'] AS VARCHAR(30)) AS \"fname\",\n cast(_MAP['mi'] AS VARCHAR(30)) AS \"mi\",\n cast(_MAP['address1'] AS VARCHAR(30)) AS \"address1\",\n cast(_MAP['address2'] AS VARCHAR(30)) AS \"address2\",\n cast(_MAP['address3'] AS VARCHAR(30)) AS \"address3\",\n cast(_MAP['address4'] AS VARCHAR(30)) AS \"address4\",\n cast(_MAP['city'] AS VARCHAR(30)) AS \"city\",\n cast(_MAP['state_province'] AS VARCHAR(30)) AS \"state_province\",\n cast(_MAP['postal_code'] AS VARCHAR(30)) AS \"postal_code\",\n cast(_MAP['country'] AS VARCHAR(30)) AS \"country\",\n cast(_MAP['customer_region_id'] AS INTEGER) AS \"customer_region_id\",\n cast(_MAP['phone1'] AS VARCHAR(30)) AS \"phone1\",\n cast(_MAP['phone2'] AS VARCHAR(30)) AS \"phone2\",\n cast(_MAP['birthdate'] AS DATE) AS \"birthdate\",\n cast(_MAP['ma rital_status'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP['yearly_income'] AS VARCHAR(30)) AS \"yearly_income\",\n cast(_MAP['gender'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP['total_children'] AS SMALLINT) AS \"total_children\",\n cast(_MAP['num_children_at_home'] AS SMALLINT) AS \"num_children_at_home\",\n cast(_MAP['education'] AS VARCHAR(30)) AS \"education\",\n cast(_MAP['date_accnt_opened'] AS DATE) AS \"date_accnt_opened\",\n cast(_MAP['member_card'] AS VARCHAR(30)) AS \"member_card\",\n cast(_MAP['occupation'] AS VARCHAR(30)) AS \"occupation\",\n cast(_MAP['houseowner'] AS VARCHAR(30)) AS \"houseowner\",\n cast(_MAP['num_cars_owned'] AS INTEGER) AS \"num_cars_owned\",\n cast(_MAP['fullname'] AS VARCHAR(60)) AS \"fullname\"\nfrom \"foodmart_raw\".\"customer\"" }, { - name: 'days', - type: 'view', - sql: 'select cast(_MAP[\'day\'] AS INTEGER) AS \"day\",\n cast(_MAP[\'week_day\'] AS VARCHAR(30)) AS \"week_day\"\nfrom \"foodmart_raw\".\"days\"' + "name": "days", + "type": "view", + "sql": "select cast(_MAP['day'] AS INTEGER) AS \"day\",\n cast(_MAP['week_day'] AS VARCHAR(30)) AS \"week_day\"\nfrom \"foodmart_raw\".\"days\"" }, { - name: 'department', - type: 'view', - sql: 'select cast(_MAP[\'department_id\'] AS INTEGER) AS \"department_id\",\n cast(_MAP[\'department_description\'] AS VARCHAR(30)) AS \"department_description\"\nfrom \"foodmart_raw\".\"department\"' + "name": "department", + "type": "view", + "sql": "select cast(_MAP['department_id'] AS INTEGER) AS \"department_id\",\n cast(_MAP['department_description'] AS VARCHAR(30)) AS \"department_description\"\nfrom \"foodmart_raw\".\"department\"" }, { - name: 'employee', - type: 'view', - sql: 'select cast(_MAP[\'employee_id\'] AS INTEGER) AS \"employee_id\",\n cast(_MAP[\'full_name\'] AS VARCHAR(30)) AS \"full_name\",\n cast(_MAP[\'first_name\'] AS VARCHAR(30)) AS \"first_name\",\n cast(_MAP[\'last_name\'] AS VARCHAR(30)) AS \"last_name\",\n cast(_MAP[\'position_id\'] AS INTEGER) AS \"position_id\",\n cast(_MAP[\'position_title\'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'department_id\'] AS INTEGER) AS \"department_id\",\n cast(_MAP[\'birth_date\'] AS DATE) AS \"birth_date\",\n cast(_MAP[\'hire_date\'] AS TIMESTAMP) AS \"hire_date\",\n cast(_MAP[\'end_date\'] AS TIMESTAMP) AS \"end_date\",\n cast(_MAP[\'salary\'] AS DECIMAL(10,4)) AS \"salary\",\n cast(_MAP[\'supervisor_id\'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP[\'education_level\'] AS VARCHAR(30)) AS \"education_level\",\n cast(_MAP[\'marital_status\'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP[\'gender\'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP[\'management_role\'] AS VARCHAR(30)) AS \"management_role\"\nfrom \"foodmart_raw\".\"employee\"' + "name": "employee", + "type": "view", + "sql": "select cast(_MAP['employee_id'] AS INTEGER) AS \"employee_id\",\n cast(_MAP['full_name'] AS VARCHAR(30)) AS \"full_name\",\n cast(_MAP['first_name'] AS VARCHAR(30)) AS \"first_name\",\n cast(_MAP['last_name'] AS VARCHAR(30)) AS \"last_name\",\n cast(_MAP['position_id'] AS INTEGER) AS \"position_id\",\n cast(_MAP['position_title'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['department_id'] AS INTEGER) AS \"department_id\",\n cast(_MAP['birth_date'] AS DATE) AS \"birth_date\",\n cast(_MAP['hire_date'] AS TIMESTAMP) AS \"hire_date\",\n cast(_MAP['end_date'] AS TIMESTAMP) AS \"end_date\",\n cast(_MAP['salary'] AS DECIMAL(10,4)) AS \"salary\",\n cast(_MAP['supervisor_id'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP['education_level'] AS VARCHAR(30)) AS \"education_level\",\n cast(_MAP['marital_status'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP['gender'] AS VARCHAR(30)) AS \"gender\",\n cast(_MAP['ma nagement_role'] AS VARCHAR(30)) AS \"management_role\"\nfrom \"foodmart_raw\".\"employee\"" }, { - name: 'employee_closure', - type: 'view', - sql: 'select cast(_MAP[\'employee_id\'] AS INTEGER) AS \"employee_id\",\n cast(_MAP[\'supervisor_id\'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP[\'distance\'] AS INTEGER) AS \"distance\"\nfrom \"foodmart_raw\".\"employee_closure\"' + "name": "employee_closure", + "type": "view", + "sql": "select cast(_MAP['employee_id'] AS INTEGER) AS \"employee_id\",\n cast(_MAP['supervisor_id'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP['distance'] AS INTEGER) AS \"distance\"\nfrom \"foodmart_raw\".\"employee_closure\"" }, { - name: 'expense_fact', - type: 'view', - sql: 'select cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'account_id\'] AS INTEGER) AS \"account_id\",\n cast(_MAP[\'exp_date\'] AS TIMESTAMP) AS \"exp_date\",\n cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'category_id\'] AS VARCHAR(30)) AS \"category_id\",\n cast(_MAP[\'currency_id\'] AS INTEGER) AS \"currency_id\",\n cast(_MAP[\'amount\'] AS DECIMAL(10,4)) AS \"amount\"\nfrom \"foodmart_raw\".\"expense_fact\"' + "name": "expense_fact", + "type": "view", + "sql": "select cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['account_id'] AS INTEGER) AS \"account_id\",\n cast(_MAP['exp_date'] AS TIMESTAMP) AS \"exp_date\",\n cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['category_id'] AS VARCHAR(30)) AS \"category_id\",\n cast(_MAP['currency_id'] AS INTEGER) AS \"currency_id\",\n cast(_MAP['amount'] AS DECIMAL(10,4)) AS \"amount\"\nfrom \"foodmart_raw\".\"expense_fact\"" }, { - name: 'position', - type: 'view', - sql: 'select cast(_MAP[\'position_id\'] AS INTEGER) AS \"position_id\",\n cast(_MAP[\'position_title\'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP[\'pay_type\'] AS VARCHAR(30)) AS \"pay_type\",\n cast(_MAP[\'min_scale\'] AS DECIMAL(10,4)) AS \"min_scale\",\n cast(_MAP[\'max_scale\'] AS DECIMAL(10,4)) AS \"max_scale\",\n cast(_MAP[\'management_role\'] AS VARCHAR(30)) AS \"management_role\"\nfrom \"foodmart_raw\".\"position\"' + "name": "position", + "type": "view", + "sql": "select cast(_MAP['position_id'] AS INTEGER) AS \"position_id\",\n cast(_MAP['position_title'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP['pay_type'] AS VARCHAR(30)) AS \"pay_type\",\n cast(_MAP['min_scale'] AS DECIMAL(10,4)) AS \"min_scale\",\n cast(_MAP['max_scale'] AS DECIMAL(10,4)) AS \"max_scale\",\n cast(_MAP['management_role'] AS VARCHAR(30)) AS \"management_role\"\nfrom \"foodmart_raw\".\"position\"" }, { - name: 'product', - type: 'view', - sql: 'select cast(_MAP[\'product_class_id\'] AS INTEGER) AS \"product_class_id\",\n cast(_MAP[\'product_id\'] AS INTEGER) AS \"product_id\",\n cast(_MAP[\'brand_name\'] AS VARCHAR(60)) AS \"brand_name\",\n cast(_MAP[\'product_name\'] AS VARCHAR(60)) AS \"product_name\",\n cast(_MAP[\'SKU\'] AS BIGINT) AS \"SKU\",\n cast(_MAP[\'SRP\'] AS DECIMAL(10,4)) AS \"SRP\",\n cast(_MAP[\'gross_weight\'] AS REAL) AS \"gross_weight\",\n cast(_MAP[\'net_weight\'] AS REAL) AS \"net_weight\",\n cast(_MAP[\'recyclable_package\'] AS BOOLEAN) AS \"recyclable_package\",\n cast(_MAP[\'low_fat\'] AS BOOLEAN) AS \"low_fat\",\n cast(_MAP[\'units_per_case\'] AS SMALLINT) AS \"units_per_case\",\n cast(_MAP[\'cases_per_pallet\'] AS SMALLINT) AS \"cases_per_pallet\",\n cast(_MAP[\'shelf_width\'] AS REAL) AS \"shelf_width\",\n cast(_MAP[\'shelf_height\'] AS REAL) AS \"shelf_height\",\n cast(_MAP[\'shelf_depth\'] AS REAL) AS \"shelf_depth\"\nfrom \"foodmart_raw\".\"product\"' + "name": "product", + "type": "view", + "sql": "select cast(_MAP['product_class_id'] AS INTEGER) AS \"product_class_id\",\n cast(_MAP['product_id'] AS INTEGER) AS \"product_id\",\n cast(_MAP['brand_name'] AS VARCHAR(60)) AS \"brand_name\",\n cast(_MAP['product_name'] AS VARCHAR(60)) AS \"product_name\",\n cast(_MAP['SKU'] AS BIGINT) AS \"SKU\",\n cast(_MAP['SRP'] AS DECIMAL(10,4)) AS \"SRP\",\n cast(_MAP['gross_weight'] AS REAL) AS \"gross_weight\",\n cast(_MAP['net_weight'] AS REAL) AS \"net_weight\",\n cast(_MAP['recyclable_package'] AS BOOLEAN) AS \"recyclable_package\",\n cast(_MAP['low_fat'] AS BOOLEAN) AS \"low_fat\",\n cast(_MAP['units_per_case'] AS SMALLINT) AS \"units_per_case\",\n cast(_MAP['cases_per_pallet'] AS SMALLINT) AS \"cases_per_pallet\",\n cast(_MAP['shelf_width'] AS REAL) AS \"shelf_width\",\n cast(_MAP['shelf_height'] AS REAL) AS \"shelf_height\",\n cast(_MAP['shelf_depth'] AS REAL) AS \"shelf_depth\"\nfrom \"foodmart_raw\".\"product\"" }, { - name: 'product_class', - type: 'view', - sql: 'select cast(_MAP[\'product_class_id\'] AS INTEGER) AS \"product_class_id\",\n cast(_MAP[\'product_subcategory\'] AS VARCHAR(30)) AS \"product_subcategory\",\n cast(_MAP[\'product_category\'] AS VARCHAR(30)) AS \"product_category\",\n cast(_MAP[\'product_department\'] AS VARCHAR(30)) AS \"product_department\",\n cast(_MAP[\'product_family\'] AS VARCHAR(30)) AS \"product_family\"\nfrom \"foodmart_raw\".\"product_class\"' + "name": "product_class", + "type": "view", + "sql": "select cast(_MAP['product_class_id'] AS INTEGER) AS \"product_class_id\",\n cast(_MAP['product_subcategory'] AS VARCHAR(30)) AS \"product_subcategory\",\n cast(_MAP['product_category'] AS VARCHAR(30)) AS \"product_category\",\n cast(_MAP['product_department'] AS VARCHAR(30)) AS \"product_department\",\n cast(_MAP['product_family'] AS VARCHAR(30)) AS \"product_family\"\nfrom \"foodmart_raw\".\"product_class\"" }, { - name: 'promotion', - type: 'view', - sql: 'select cast(_MAP[\'promotion_id\'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP[\'promotion_district_id\'] AS INTEGER) AS \"promotion_district_id\",\n cast(_MAP[\'promotion_name\'] AS VARCHAR(30)) AS \"promotion_name\",\n cast(_MAP[\'media_type\'] AS VARCHAR(30)) AS \"media_type\",\n cast(_MAP[\'cost\'] AS DECIMAL(10,4)) AS \"cost\",\n cast(_MAP[\'start_date\'] AS TIMESTAMP) AS \"start_date\",\n cast(_MAP[\'end_date\'] AS TIMESTAMP) AS \"end_date\"\nfrom \"foodmart_raw\".\"promotion\"' + "name": "promotion", + "type": "view", + "sql": "select cast(_MAP['promotion_id'] AS INTEGER) AS \"promotion_id\",\n cast(_MAP['promotion_district_id'] AS INTEGER) AS \"promotion_district_id\",\n cast(_MAP['promotion_name'] AS VARCHAR(30)) AS \"promotion_name\",\n cast(_MAP['media_type'] AS VARCHAR(30)) AS \"media_type\",\n cast(_MAP['cost'] AS DECIMAL(10,4)) AS \"cost\",\n cast(_MAP['start_date'] AS TIMESTAMP) AS \"start_date\",\n cast(_MAP['end_date'] AS TIMESTAMP) AS \"end_date\"\nfrom \"foodmart_raw\".\"promotion\"" }, { - name: 'region', - type: 'view', - sql: 'select cast(_MAP[\'region_id\'] AS INTEGER) AS \"region_id\",\n cast(_MAP[\'sales_city\'] AS VARCHAR(30)) AS \"sales_city\",\n cast(_MAP[\'sales_state_province\'] AS VARCHAR(30)) AS \"sales_state_province\",\n cast(_MAP[\'sales_district\'] AS VARCHAR(30)) AS \"sales_district\",\n cast(_MAP[\'sales_region\'] AS VARCHAR(30)) AS \"sales_region\",\n cast(_MAP[\'sales_country\'] AS VARCHAR(30)) AS \"sales_country\",\n cast(_MAP[\'sales_district_id\'] AS INTEGER) AS \"sales_district_id\"\nfrom \"foodmart_raw\".\"region\"' + "name": "region", + "type": "view", + "sql": "select cast(_MAP['region_id'] AS INTEGER) AS \"region_id\",\n cast(_MAP['sales_city'] AS VARCHAR(30)) AS \"sales_city\",\n cast(_MAP['sales_state_province'] AS VARCHAR(30)) AS \"sales_state_province\",\n cast(_MAP['sales_district'] AS VARCHAR(30)) AS \"sales_district\",\n cast(_MAP['sales_region'] AS VARCHAR(30)) AS \"sales_region\",\n cast(_MAP['sales_country'] AS VARCHAR(30)) AS \"sales_country\",\n cast(_MAP['sales_district_id'] AS INTEGER) AS \"sales_district_id\"\nfrom \"foodmart_raw\".\"region\"" }, { - name: 'reserve_employee', - type: 'view', - sql: 'select cast(_MAP[\'employee_id\'] AS INTEGER) AS \"employee_id\",\n cast(_MAP[\'full_name\'] AS VARCHAR(30)) AS \"full_name\",\n cast(_MAP[\'first_name\'] AS VARCHAR(30)) AS \"first_name\",\n cast(_MAP[\'last_name\'] AS VARCHAR(30)) AS \"last_name\",\n cast(_MAP[\'position_id\'] AS INTEGER) AS \"position_id\",\n cast(_MAP[\'position_title\'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'department_id\'] AS INTEGER) AS \"department_id\",\n cast(_MAP[\'birth_date\'] AS TIMESTAMP) AS \"birth_date\",\n cast(_MAP[\'hire_date\'] AS TIMESTAMP) AS \"hire_date\",\n cast(_MAP[\'end_date\'] AS TIMESTAMP) AS \"end_date\",\n cast(_MAP[\'salary\'] AS DECIMAL(10,4)) AS \"salary\",\n cast(_MAP[\'supervisor_id\'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP[\'education_level\'] AS VARCHAR(30)) AS \"education_level\",\n cast(_MAP[\'marital_status\'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP[\'gender\'] AS VARCHAR( 30)) AS \"gender\"\nfrom \"foodmart_raw\".\"reserve_employee\"' + "name": "reserve_employee", + "type": "view", + "sql": "select cast(_MAP['employee_id'] AS INTEGER) AS \"employee_id\",\n cast(_MAP['full_name'] AS VARCHAR(30)) AS \"full_name\",\n cast(_MAP['first_name'] AS VARCHAR(30)) AS \"first_name\",\n cast(_MAP['last_name'] AS VARCHAR(30)) AS \"last_name\",\n cast(_MAP['position_id'] AS INTEGER) AS \"position_id\",\n cast(_MAP['position_title'] AS VARCHAR(30)) AS \"position_title\",\n cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['department_id'] AS INTEGER) AS \"department_id\",\n cast(_MAP['birth_date'] AS TIMESTAMP) AS \"birth_date\",\n cast(_MAP['hire_date'] AS TIMESTAMP) AS \"hire_date\",\n cast(_MAP['end_date'] AS TIMESTAMP) AS \"end_date\",\n cast(_MAP['salary'] AS DECIMAL(10,4)) AS \"salary\",\n cast(_MAP['supervisor_id'] AS INTEGER) AS \"supervisor_id\",\n cast(_MAP['education_level'] AS VARCHAR(30)) AS \"education_level\",\n cast(_MAP['marital_status'] AS VARCHAR(30)) AS \"marital_status\",\n cast(_MAP['gender'] AS VARCHAR(30)) AS \"gender\"\nfrom \"foo dmart_raw\".\"reserve_employee\"" }, { - name: 'salary', - type: 'view', - sql: 'select cast(_MAP[\'pay_date\'] AS TIMESTAMP) AS \"pay_date\",\n cast(_MAP[\'employee_id\'] AS INTEGER) AS \"employee_id\",\n cast(_MAP[\'department_id\'] AS INTEGER) AS \"department_id\",\n cast(_MAP[\'currency_id\'] AS INTEGER) AS \"currency_id\",\n cast(_MAP[\'salary_paid\'] AS DECIMAL(10,4)) AS \"salary_paid\",\n cast(_MAP[\'overtime_paid\'] AS DECIMAL(10,4)) AS \"overtime_paid\",\n cast(_MAP[\'vacation_accrued\'] AS REAL) AS \"vacation_accrued\",\n cast(_MAP[\'vacation_used\'] AS REAL) AS \"vacation_used\"\nfrom \"foodmart_raw\".\"salary\"' + "name": "salary", + "type": "view", + "sql": "select cast(_MAP['pay_date'] AS TIMESTAMP) AS \"pay_date\",\n cast(_MAP['employee_id'] AS INTEGER) AS \"employee_id\",\n cast(_MAP['department_id'] AS INTEGER) AS \"department_id\",\n cast(_MAP['currency_id'] AS INTEGER) AS \"currency_id\",\n cast(_MAP['salary_paid'] AS DECIMAL(10,4)) AS \"salary_paid\",\n cast(_MAP['overtime_paid'] AS DECIMAL(10,4)) AS \"overtime_paid\",\n cast(_MAP['vacation_accrued'] AS REAL) AS \"vacation_accrued\",\n cast(_MAP['vacation_used'] AS REAL) AS \"vacation_used\"\nfrom \"foodmart_raw\".\"salary\"" }, { - name: 'store', - type: 'view', - sql: 'select cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_type\'] AS VARCHAR(30)) AS \"store_type\",\n cast(_MAP[\'region_id\'] AS INTEGER) AS \"region_id\",\n cast(_MAP[\'store_name\'] AS VARCHAR(30)) AS \"store_name\",\n cast(_MAP[\'store_number\'] AS INTEGER) AS \"store_number\",\n cast(_MAP[\'store_street_address\'] AS VARCHAR(30)) AS \"store_street_address\",\n cast(_MAP[\'store_city\'] AS VARCHAR(30)) AS \"store_city\",\n cast(_MAP[\'store_state\'] AS VARCHAR(30)) AS \"store_state\",\n cast(_MAP[\'store_postal_code\'] AS VARCHAR(30)) AS \"store_postal_code\",\n cast(_MAP[\'store_country\'] AS VARCHAR(30)) AS \"store_country\",\n cast(_MAP[\'store_manager\'] AS VARCHAR(30)) AS \"store_manager\",\n cast(_MAP[\'store_phone\'] AS VARCHAR(30)) AS \"store_phone\",\n cast(_MAP[\'store_fax\'] AS VARCHAR(30)) AS \"store_fax\",\n cast(_MAP[\'first_opened_date\'] AS TIMESTAMP) AS \"first_opened_date\",\n cast(_MAP[\'last_remodel_date\'] AS TIMESTAMP) AS \"last_remodel_date\",\n cast(_MAP[\'store_sqft\'] AS INTEGER) AS \"store_sqft\",\n cast(_MAP[\'grocery_sqft\'] AS INTEGER) AS \"grocery_sqft\",\n cast(_MAP[\'frozen_sqft\'] AS INTEGER) AS \"frozen_sqft\",\n cast(_MAP[\'meat_sqft\'] AS INTEGER) AS \"meat_sqft\",\n cast(_MAP[\'coffee_bar\'] AS BOOLEAN) AS \"coffee_bar\",\n cast(_MAP[\'video_store\'] AS BOOLEAN) AS \"video_store\",\n cast(_MAP[\'salad_bar\'] AS BOOLEAN) AS \"salad_bar\",\n cast(_MAP[\'prepared_food\'] AS BOOLEAN) AS \"prepared_food\",\n cast(_MAP[\'florist\'] AS BOOLEAN) AS \"florist\"\nfrom \"foodmart_raw\".\"store\"' + "name": "store", + "type": "view", + "sql": "select cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_type'] AS VARCHAR(30)) AS \"store_type\",\n cast(_MAP['region_id'] AS INTEGER) AS \"region_id\",\n cast(_MAP['store_name'] AS VARCHAR(30)) AS \"store_name\",\n cast(_MAP['store_number'] AS INTEGER) AS \"store_number\",\n cast(_MAP['store_street_address'] AS VARCHAR(30)) AS \"store_street_address\",\n cast(_MAP['store_city'] AS VARCHAR(30)) AS \"store_city\",\n cast(_MAP['store_state'] AS VARCHAR(30)) AS \"store_state\",\n cast(_MAP['store_postal_code'] AS VARCHAR(30)) AS \"store_postal_code\",\n cast(_MAP['store_country'] AS VARCHAR(30)) AS \"store_country\",\n cast(_MAP['store_manager'] AS VARCHAR(30)) AS \"store_manager\",\n cast(_MAP['store_phone'] AS VARCHAR(30)) AS \"store_phone\",\n cast(_MAP['store_fax'] AS VARCHAR(30)) AS \"store_fax\",\n cast(_MAP['first_opened_date'] AS TIMESTAMP) AS \"first_opened_date\",\n cast(_MAP['last_remodel_date'] AS TIMESTAMP) AS \"last_remodel_date\",\n cast(_MAP['store_sqft'] AS INTEGER) AS \"store_sqft\",\n cast(_MAP['grocery_sqft'] AS INTEGER) AS \"grocery_sqft\",\n cast(_MAP['frozen_sqft'] AS INTEGER) AS \"frozen_sqft\",\n cast(_MAP['meat_sqft'] AS INTEGER) AS \"meat_sqft\",\n cast(_MAP['coffee_bar'] AS BOOLEAN) AS \"coffee_bar\",\n cast(_MAP['video_store'] AS BOOLEAN) AS \"video_store\",\n cast(_MAP['salad_bar'] AS BOOLEAN) AS \"salad_bar\",\n cast(_MAP['prepared_food'] AS BOOLEAN) AS \"prepared_food\",\n cast(_MAP['florist'] AS BOOLEAN) AS \"florist\"\nfrom \"foodmart_raw\".\"store\"" }, { - name: 'store_ragged', - type: 'view', - sql: 'select cast(_MAP[\'store_id\'] AS INTEGER) AS \"store_id\",\n cast(_MAP[\'store_type\'] AS VARCHAR(30)) AS \"store_type\",\n cast(_MAP[\'region_id\'] AS INTEGER) AS \"region_id\",\n cast(_MAP[\'store_name\'] AS VARCHAR(30)) AS \"store_name\",\n cast(_MAP[\'store_number\'] AS INTEGER) AS \"store_number\",\n cast(_MAP[\'store_street_address\'] AS VARCHAR(30)) AS \"store_street_address\",\n cast(_MAP[\'store_city\'] AS VARCHAR(30)) AS \"store_city\",\n cast(_MAP[\'store_state\'] AS VARCHAR(30)) AS \"store_state\",\n cast(_MAP[\'store_postal_code\'] AS VARCHAR(30)) AS \"store_postal_code\",\n cast(_MAP[\'store_country\'] AS VARCHAR(30)) AS \"store_country\",\n cast(_MAP[\'store_manager\'] AS VARCHAR(30)) AS \"store_manager\",\n cast(_MAP[\'store_phone\'] AS VARCHAR(30)) AS \"store_phone\",\n cast(_MAP[\'store_fax\'] AS VARCHAR(30)) AS \"store_fax\",\n cast(_MAP[\'first_opened_date\'] AS TIMESTAMP) AS \"first_opened_date\",\n cast(_MAP[\'last_remodel_date\'] AS TIMESTAMP) AS \"last_remodel_date\",\n cast(_MAP[\'store_sqft\'] AS INTEGER) AS \"store_sqft\",\n cast(_MAP[\'grocery_sqft\'] AS INTEGER) AS \"grocery_sqft\",\n cast(_MAP[\'frozen_sqft\'] AS INTEGER) AS \"frozen_sqft\",\n cast(_MAP[\'meat_sqft\'] AS INTEGER) AS \"meat_sqft\",\n cast(_MAP[\'coffee_bar\'] AS BOOLEAN) AS \"coffee_bar\",\n cast(_MAP[\'video_store\'] AS BOOLEAN) AS \"video_store\",\n cast(_MAP[\'salad_bar\'] AS BOOLEAN) AS \"salad_bar\",\n cast(_MAP[\'prepared_food\'] AS BOOLEAN) AS \"prepared_food\",\n cast(_MAP[\'florist\'] AS BOOLEAN) AS \"florist\"\nfrom \"foodmart_raw\".\"store_ragged\"' + "name": "store_ragged", + "type": "view", + "sql": "select cast(_MAP['store_id'] AS INTEGER) AS \"store_id\",\n cast(_MAP['store_type'] AS VARCHAR(30)) AS \"store_type\",\n cast(_MAP['region_id'] AS INTEGER) AS \"region_id\",\n cast(_MAP['store_name'] AS VARCHAR(30)) AS \"store_name\",\n cast(_MAP['store_number'] AS INTEGER) AS \"store_number\",\n cast(_MAP['store_street_address'] AS VARCHAR(30)) AS \"store_street_address\",\n cast(_MAP['store_city'] AS VARCHAR(30)) AS \"store_city\",\n cast(_MAP['store_state'] AS VARCHAR(30)) AS \"store_state\",\n cast(_MAP['store_postal_code'] AS VARCHAR(30)) AS \"store_postal_code\",\n cast(_MAP['store_country'] AS VARCHAR(30)) AS \"store_country\",\n cast(_MAP['store_manager'] AS VARCHAR(30)) AS \"store_manager\",\n cast(_MAP['store_phone'] AS VARCHAR(30)) AS \"store_phone\",\n cast(_MAP['store_fax'] AS VARCHAR(30)) AS \"store_fax\",\n cast(_MAP['first_opened_date'] AS TIMESTAMP) AS \"first_opened_date\",\n cast(_MAP['last_remodel_date'] AS TIMESTAMP) AS \"last_remodel_date\",\n cast(_MAP['store_sqft'] AS INTEGER) AS \"store_sqft\",\n cast(_MAP['grocery_sqft'] AS INTEGER) AS \"grocery_sqft\",\n cast(_MAP['frozen_sqft'] AS INTEGER) AS \"frozen_sqft\",\n cast(_MAP['meat_sqft'] AS INTEGER) AS \"meat_sqft\",\n cast(_MAP['coffee_bar'] AS BOOLEAN) AS \"coffee_bar\",\n cast(_MAP['video_store'] AS BOOLEAN) AS \"video_store\",\n cast(_MAP['salad_bar'] AS BOOLEAN) AS \"salad_bar\",\n cast(_MAP['prepared_food'] AS BOOLEAN) AS \"prepared_food\",\n cast(_MAP['florist'] AS BOOLEAN) AS \"florist\"\nfrom \"foodmart_raw\".\"store_ragged\"" }, { - name: 'time_by_day', - type: 'view', - sql: 'select cast(_MAP[\'time_id\'] AS INTEGER) AS \"time_id\",\n cast(_MAP[\'the_date\'] AS TIMESTAMP) AS \"the_date\",\n cast(_MAP[\'the_day\'] AS VARCHAR(30)) AS \"the_day\",\n cast(_MAP[\'the_month\'] AS VARCHAR(30)) AS \"the_month\",\n cast(_MAP[\'the_year\'] AS SMALLINT) AS \"the_year\",\n cast(_MAP[\'day_of_month\'] AS SMALLINT) AS \"day_of_month\",\n cast(_MAP[\'week_of_year\'] AS INTEGER) AS \"week_of_year\",\n cast(_MAP[\'month_of_year\'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP[\'quarter\'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP[\'fiscal_period\'] AS VARCHAR(30)) AS \"fiscal_period\"\nfrom \"foodmart_raw\".\"time_by_day\"' + "name": "time_by_day", + "type": "view", + "sql": "select cast(_MAP['time_id'] AS INTEGER) AS \"time_id\",\n cast(_MAP['the_date'] AS TIMESTAMP) AS \"the_date\",\n cast(_MAP['the_day'] AS VARCHAR(30)) AS \"the_day\",\n cast(_MAP['the_month'] AS VARCHAR(30)) AS \"the_month\",\n cast(_MAP['the_year'] AS SMALLINT) AS \"the_year\",\n cast(_MAP['day_of_month'] AS SMALLINT) AS \"day_of_month\",\n cast(_MAP['week_of_year'] AS INTEGER) AS \"week_of_year\",\n cast(_MAP['month_of_year'] AS SMALLINT) AS \"month_of_year\",\n cast(_MAP['quarter'] AS VARCHAR(30)) AS \"quarter\",\n cast(_MAP['fiscal_period'] AS VARCHAR(30)) AS \"fiscal_period\"\nfrom \"foodmart_raw\".\"time_by_day\"" }, { - name: 'warehouse', - type: 'view', - sql: 'select cast(_MAP[\'warehouse_id\'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP[\'warehouse_class_id\'] AS INTEGER) AS \"warehouse_class_id\",\n cast(_MAP[\'stores_id\'] AS INTEGER) AS \"stores_id\",\n cast(_MAP[\'warehouse_name\'] AS VARCHAR(60)) AS \"warehouse_name\",\n cast(_MAP[\'wa_address1\'] AS VARCHAR(30)) AS \"wa_address1\",\n cast(_MAP[\'wa_address2\'] AS VARCHAR(30)) AS \"wa_address2\",\n cast(_MAP[\'wa_address3\'] AS VARCHAR(30)) AS \"wa_address3\",\n cast(_MAP[\'wa_address4\'] AS VARCHAR(30)) AS \"wa_address4\",\n cast(_MAP[\'warehouse_city\'] AS VARCHAR(30)) AS \"warehouse_city\",\n cast(_MAP[\'warehouse_state_province\'] AS VARCHAR(30)) AS \"warehouse_state_province\",\n cast(_MAP[\'warehouse_postal_code\'] AS VARCHAR(30)) AS \"warehouse_postal_code\",\n cast(_MAP[\'warehouse_country\'] AS VARCHAR(30)) AS \"warehouse_country\",\n cast(_MAP[\'warehouse_owner_name\'] AS VARCHAR(30)) AS \"warehouse_owner_name\",\n cast(_MAP[\'warehouse_phone\'] AS VARCHAR (30)) AS \"warehouse_phone\",\n cast(_MAP[\'warehouse_fax\'] AS VARCHAR(30)) AS \"warehouse_fax\"\nfrom \"foodmart_raw\".\"warehouse\"' + "name": "warehouse", + "type": "view", + "sql": "select cast(_MAP['warehouse_id'] AS INTEGER) AS \"warehouse_id\",\n cast(_MAP['warehouse_class_id'] AS INTEGER) AS \"warehouse_class_id\",\n cast(_MAP['stores_id'] AS INTEGER) AS \"stores_id\",\n cast(_MAP['warehouse_name'] AS VARCHAR(60)) AS \"warehouse_name\",\n cast(_MAP['wa_address1'] AS VARCHAR(30)) AS \"wa_address1\",\n cast(_MAP['wa_address2'] AS VARCHAR(30)) AS \"wa_address2\",\n cast(_MAP['wa_address3'] AS VARCHAR(30)) AS \"wa_address3\",\n cast(_MAP['wa_address4'] AS VARCHAR(30)) AS \"wa_address4\",\n cast(_MAP['warehouse_city'] AS VARCHAR(30)) AS \"warehouse_city\",\n cast(_MAP['warehouse_state_province'] AS VARCHAR(30)) AS \"warehouse_state_province\",\n cast(_MAP['warehouse_postal_code'] AS VARCHAR(30)) AS \"warehouse_postal_code\",\n cast(_MAP['warehouse_country'] AS VARCHAR(30)) AS \"warehouse_country\",\n cast(_MAP['warehouse_owner_name'] AS VARCHAR(30)) AS \"warehouse_owner_name\",\n cast(_MAP['warehouse_phone'] AS VARCHAR(30)) AS \"warehouse_phone \",\n cast(_MAP['warehouse_fax'] AS VARCHAR(30)) AS \"warehouse_fax\"\nfrom \"foodmart_raw\".\"warehouse\"" }, { - name: 'warehouse_class', - type: 'view', - sql: 'select cast(_MAP[\'warehouse_class_id\'] AS INTEGER) AS \"warehouse_class_id\",\n cast(_MAP[\'description\'] AS VARCHAR(30)) AS \"description\"\nfrom \"foodmart_raw\".\"warehouse_class\"' + "name": "warehouse_class", + "type": "view", + "sql": "select cast(_MAP['warehouse_class_id'] AS INTEGER) AS \"warehouse_class_id\",\n cast(_MAP['description'] AS VARCHAR(30)) AS \"description\"\nfrom \"foodmart_raw\".\"warehouse_class\"" } ] } http://git-wip-us.apache.org/repos/asf/calcite/blob/b0362231/mongodb/src/test/resources/mongo-zips-model.json ---------------------------------------------------------------------- diff --git a/mongodb/src/test/resources/mongo-zips-model.json b/mongodb/src/test/resources/mongo-zips-model.json index 9e94e47..669e3b9 100644 --- a/mongodb/src/test/resources/mongo-zips-model.json +++ b/mongodb/src/test/resources/mongo-zips-model.json @@ -15,25 +15,25 @@ * limitations under the License. */ { - version: '1.0', - defaultSchema: 'mongo', - schemas: [ + "version": "1.0", + "defaultSchema": "mongo", + "schemas": [ { - type: 'custom', - name: 'mongo_raw', - factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory', - operand: { - host: 'localhost', - database: 'test' + "type": "custom", + "name": "mongo_raw", + "factory": "org.apache.calcite.adapter.mongodb.MongoSchemaFactory", + "operand": { + "host": "localhost", + "database": "test" } }, { - name: 'mongo', - tables: [ + "name": "mongo", + "tables": [ { - name: 'ZIPS', - type: 'view', - sql: 'select cast(_MAP[\'city\'] AS varchar(20)) AS city,\n cast(_MAP[\'loc\'][0] AS float) AS longitude, cast(_MAP[\'loc\'][1] AS float) AS latitude, cast(_MAP[\'pop\'] AS integer) AS pop, cast(_MAP[\'state\'] AS varchar(2)) AS state, cast(_MAP[\'_id\'] AS varchar(5)) AS id from \"mongo_raw\".\"zips\"' + "name": "ZIPS", + "type": "view", + "sql": "select cast(_MAP['city'] AS varchar(20)) AS city,\n cast(_MAP['loc'][0] AS float) AS longitude, cast(_MAP['loc'][1] AS float) AS latitude, cast(_MAP['pop'] AS integer) AS pop, cast(_MAP['state'] AS varchar(2)) AS state, cast(_MAP['_id'] AS varchar(5)) AS id from \"mongo_raw\".\"zips\"" } ] }
