!-- layout 4 4 4
This is first column
- foo
- bar
| import brewery.streams | |
| import brewery.nodes | |
| import time | |
| class FunctionSubstituteNode(brewery.nodes.Node): | |
| """Manipulate a field using a function. | |
| This is a simpler version of DeriveNode(); a single field is passed in | |
| rather than the entire record. | |
| """ |
| $(function(){ /* jQuery.ready */ | |
| var Stream = Backbone.Model.extend({ | |
| initialize: function() { /* do nothing */ }, | |
| }); | |
| window.streamsCollection = Backbone.Collection.extend({ | |
| model: Stream, | |
| url: "http://localhost:5000/streams", | |
| { | |
| "label": "Basic Data Audit", | |
| "description": "Provides basic data statistics, such as completeness", | |
| "nodes" : { | |
| "src": { | |
| "type": "csv_source", | |
| "resource": "https://raw.github.com/Stiivi/cubes/master/examples/hello_world/data.csv" | |
| }, | |
| "audit": { |
| """ | |
| Data Brewery - http://databrewery.org | |
| Example: How to use a generator function as a streaming data source. | |
| """ | |
| import brewery | |
| import random |
| """ | |
| Data Brewery Example | |
| Aggregate a remote CSV file. | |
| """ | |
| import brewery | |
| main = brewery.create_builder() | |
| main.csv_source("https://raw.github.com/Stiivi/cubes/master/examples/hello_world/data.csv") |
| """ | |
| Brewery Example - basic audit of "unknown" CSV file. | |
| Shows: | |
| * record count | |
| * null count and ratio | |
| * number of distinct values | |
| """ |
| Jaj bože muj, jaj bože muj, co ja narobila. | |
| Do jakoho, do jakoho ja śe zaľubila. | |
| Do takoho, dotakoho pijaka lajdaka | |
| co viplatu i zalohu prepije preflaka. | |
| Vi dzvičatka, vi dzivčatka, na mne śe kajajce, | |
| za pijakov, za lajdakov śe ňe vidavajce. | |
| Bo s pijakom, bo s lajdakom zažijece križu, | |
| prepije vam, prepije vam perinu i chižu. |
| { | |
| "name" : "vvo", | |
| "locale":"en", | |
| "cubes": { | |
| "contracts" : { | |
| "name": "contracts", | |
| "measures": { | |
| "zmluva_hodnota": {"label": "Contract amount"} | |
| }, | |
| "details": [ |
| from sqlalchemy import * | |
| from sqlalchemy import sql | |
| def create_table(url, schema=None): | |
| engine = create_engine(url) | |
| metadata = MetaData(engine, reflect=True) | |
| table = Table("test_table", metadata, schema=schema) | |
| if table.exists(): | |
| table.drop() |