@@ -228,13 +228,13 @@ cube(`Contacts`, {
228228
229229## Parameters
230230
231- ### <--{"id" : " Parameters" }--> data_source
231+ ### <--{"id" : " Parameters" }--> dataSource
232232
233- Each cube in schema can have its own ` data_source ` name to support scenarios
233+ Each cube in schema can have its own ` dataSource ` name to support scenarios
234234where data should be fetched from multiple databases. The value of the
235- ` data_source ` parameter will be passed to the
235+ ` dataSource ` parameter will be passed to the
236236[ ` driverFactory() ` ] [ ref-config-driverfactory ] function as part of the ` context `
237- parameter. By default, each cube has a ` default ` value for its ` data_source ` ; to
237+ parameter. By default, each cube has a ` default ` value for its ` dataSource ` ; to
238238override it you can use:
239239
240240<CodeTabs >
@@ -243,7 +243,7 @@ override it you can use:
243243cube (` OrderFacts` , {
244244 sql: ` SELECT * FROM orders` ,
245245
246- data_source : ` prod_db` ,
246+ dataSource : ` prod_db` ,
247247});
248248```
249249
@@ -364,21 +364,21 @@ cube(`ExtendedOrderFacts`, {
364364});
365365```
366366
367- ### <--{"id" : " Parameters" }--> refresh_key
367+ ### <--{"id" : " Parameters" }--> refreshKey
368368
369- Cube's caching layer uses ` refresh_key ` queries to get the current version of
369+ Cube's caching layer uses ` refreshKey ` queries to get the current version of
370370content for a specific cube. If a query result changes, Cube will invalidate all
371371queries that rely on that cube.
372372
373- The default values for ` refresh_key ` are
373+ The default values for ` refreshKey ` are
374374
375375- ` every: '2 minute' ` for BigQuery, Athena, Snowflake, and Presto.
376376- ` every: '10 second' ` for all other databases.
377377
378378Refresh key of a query is a concatenation of all cubes refresh keys involved in
379379query. For rollup queries pre-aggregation table name is used as a refresh key.
380380
381- You can set up a custom refresh check SQL by changing ` refresh_key ` property.
381+ You can set up a custom refresh check SQL by changing ` refreshKey ` property.
382382Often, a ` MAX(updated_at_timestamp) ` for OLTP data is a viable option, or
383383examining a metadata table for whatever system is managing the data to see when
384384it last ran. timestamp in that case.
@@ -389,10 +389,10 @@ it last ran. timestamp in that case.
389389cube (` OrderFacts` , {
390390 sql: ` SELECT * FROM orders` ,
391391
392- // With this refresh_key Cube will only refresh the data if
392+ // With this refreshKey Cube will only refresh the data if
393393 // the value of previous MAX(updated_at_timestamp) changed
394- // By default Cube will check this refresh_key every 10 seconds
395- refresh_key : {
394+ // By default Cube will check this refreshKey every 10 seconds
395+ refreshKey : {
396396 sql: ` SELECT MAX(updated_at_timestamp) FROM orders` ,
397397 },
398398});
@@ -408,15 +408,15 @@ cubes:
408408
409409</CodeTabs>
410410
411- You can use interval based ` refresh_key `. For example:
411+ You can use interval based ` refreshKey `. For example:
412412
413413<CodeTabs>
414414
415415` ` ` javascript
416416cube(` OrderFacts`, {
417417 sql : ` SELECT * FROM orders` ,
418418
419- refresh_key : {
419+ refreshKey : {
420420 every : ` 1 hour` ,
421421 },
422422});
@@ -443,7 +443,7 @@ For example:
443443` ` ` javascript
444444cube(` OrderFacts`, {
445445 sql : ` SELECT * FROM orders` ,
446- refresh_key : {
446+ refreshKey : {
447447 every : ' 30 5 * * 5' ,
448448 timezone : ' America/Los_Angeles' ,
449449 },
@@ -471,21 +471,21 @@ with support for seconds.
471471
472472</WarningBox>
473473
474- Such `refresh_key ` is just a syntactic sugar over `refresh_key ` SQL. It's
475- guaranteed that `refresh_key ` change its value at least once during `every`
474+ Such `refreshKey ` is just a syntactic sugar over `refreshKey ` SQL. It's
475+ guaranteed that `refreshKey ` change it's value at least once during `every`
476476interval. It will be converted to appropriate SQL select which value will change
477- over time based on interval value. Values of interval based `refresh_key ` are
477+ over time based on interval value. Values of interval based `refreshKey ` are
478478tried to be checked ten times within defined interval but not more than once per
479479` 1 second` and not less than once per `5 minute`. For example if interval is
480- ` 10 minute` it's `refresh_key_renewal_threshold ` will be 60 seconds and
481- generated `refresh_key ` SQL (Postgres) would be :
480+ ` 10 minute` it's `refreshKeyRenewalThreshold ` will be 60 seconds and generated
481+ `refreshKey ` SQL (Postgres) would be :
482482
483483` ` ` sql
484484SELECT FLOOR(EXTRACT(EPOCH FROM NOW()) / 600)
485485` ` `
486486
487- For `5 second` interval `refresh_key_renewal_threshold ` will be just 1 second
488- and SQL will be :
487+ For `5 second` interval `refreshKeyRenewalThreshold ` will be just 1 second and
488+ SQL will be :
489489
490490` ` ` sql
491491SELECT FLOOR(EXTRACT(EPOCH FROM NOW()) / 5)
@@ -520,7 +520,7 @@ SELECT FLOOR(EXTRACT(EPOCH FROM NOW()) / 5)
520520└───────────────────────── second (0 - 59, optional)
521521` ` `
522522
523- # ## <--{"id" : "Parameters"}--> rewrite_queries
523+ # ## <--{"id" : "Parameters"}--> rewriteQueries
524524
525525Set this flag to true if you want Cube to rewrite your queries after final SQL
526526has been generated. This may be helpful to apply filter pushdown optimizations
@@ -530,7 +530,7 @@ or reduce unnecessary query nesting. For example:
530530
531531` ` ` javascript
532532cube(` Tickets`, {
533- rewrite_queries : true,
533+ rewriteQueries : true,
534534});
535535```
536536
@@ -602,9 +602,9 @@ cube(`Companies`, {
602602});
603603```
604604
605- ### <--{"id" : " Parameters" }--> sql_alias
605+ ### <--{"id" : " Parameters" }--> sqlAlias
606606
607- Use ` sql_alias ` when auto-generated cube alias prefix is too long and truncated
607+ Use ` sqlAlias ` when auto-generated cube alias prefix is too long and truncated
608608by DB such as Postgres:
609609
610610<CodeTabs >
@@ -613,7 +613,7 @@ by DB such as Postgres:
613613cube (` OrderFacts` , {
614614 sql: ` SELECT * FROM orders` ,
615615
616- sql_alias : ` ofacts` ,
616+ sqlAlias : ` ofacts` ,
617617
618618 // ...
619619});
@@ -628,7 +628,7 @@ cubes:
628628
629629</CodeTabs>
630630
631- It'll generate aliases for members such as ` ofacts__count`. `sql_alias ` affects
631+ It'll generate aliases for members such as ` ofacts__count`. `sqlAlias ` affects
632632all member names including pre-aggregation table names.
633633
634634# ## <--{"id" : "Parameters"}--> title
@@ -705,7 +705,8 @@ cube(`OrderFacts`, {
705705cubes :
706706 - name : OrderFacts
707707 sql : >
708- SELECT * FROM orders WHERE {FILTER_PARAMS.OrderFacts.date.filter('date')}
708+ SELECT * FROM orders
709+ WHERE {FILTER_PARAMS.OrderFacts.date.filter('date')}
709710 measures :
710711 - name : count
711712 type : count
0 commit comments