Code Monkey home page Code Monkey logo

blocks_redshift_admin's People

Contributors

bheltzel avatar chris-m-schmidt avatar davidtamaki avatar dillonmorrison avatar ernestoongaro avatar fabio-looker avatar fraser avatar githoov avatar ianatlooker avatar jeffrey-martinez avatar lameyer avatar lookering avatar swhitey avatar taylor67 avatar thekenz avatar thomasbanghart avatar vitorleepkaln avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blocks_redshift_admin's Issues

Add Dimensions around Looker Query Context

Something like this should work:

        dimension: looker_query_context {
          sql: REGEXP_SUBSTR(REGEXP_SUBSTR(${text},'(Query\\sContext\\s\'\\{)(.*)(\\}\')'),'(\\{)(.*)(\\})') ;;
        }
        dimension: looker_user_id {
          sql:json_extract_path_text(${looker_query_context},'user_id') ;;
        }
        dimension: looker_history_id {
          sql:json_extract_path_text(${looker_query_context},'history_id') ;;
        }
        dimension: looker_instance_slug {
          sql:json_extract_path_text(${looker_query_context},'instance_slug') ;;
        }

Add "is_pdt_build" filter

  • Add dimension redshift_queries.is_pdt_build, based on the comment in sqltext: Possible values: "No", "Yes, prod", "Yes, dev"
  • Apply is_pdt_build=No as a default filter on the performance dashboard

Use datagroups!

Use datagroups (for all PDTs, except Redshift slices since that's not in any dashboard, or ever joined)

What about multiple redshift clusters??

What would be the recommended model to use here if your looker system connects to multiple redshift clusters??

Is there some preferred way to namespace things so that this could be used on one looker instance with multiple tenants (in essence).

What's the license?

Could you please add a license to the project? In fact, most of the repos under this account don't have any license so I'm not sure if we can use it on our own* or in Looker.

*: Parsing the LookML and using it for something else.

Group fields in redshift_tables

  • Identifiers
    • Database
    • Schema
    • Table (name)
    • Table ID
  • Size
    • Rows
    • Megabytes
  • Distribution
    • Distribution style
    • Skew rows
  • Sort
    • Sortkey
    • Sortkey skew
    • Unsorted
  • Other
    ...

Adjust color scheme for distribution styles

And make it consistent between the table and in performance dashboard pie chart

DIST_NONE => vibrant green
DIST_ALL_NONE=> black/green
DIST_INNER => grey/green
BCAST_INNER => red
DIST_OUTER => orange
DIST_BOTH => orange/red

redshift_tables view in block is broken, due to Invalid character data in sortkey1 column of svv_table_info table

PDT in this view is failing:
view: redshift_tables {
derived_table: {
# Insert into PDT because redshift won't allow joining certain system tables/views onto others (presumably because they are located only on the leader node)
persist_for: "8 hours"
sql: select
"database"::varchar,
"schema"::varchar,
"Table_id"::bigint,
"table"::varchar,
"encoded"::varchar,
"diststyle"::varchar,
"sortkey1"::varchar,
"max_varchar"::bigint,
"sortkey1_enc"::varchar,
"sortkey_num"::int,
"size"::bigint,
"pct_used"::numeric,
"unsorted"::numeric,
"stats_off"::numeric,
"tbl_rows"::bigint,
"skew_sortkey1"::numeric,
"skew_rows"::numeric
from svv_table_info
;;
# http://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html
distribution_style: all
indexes: ["table_id","table"] # "indexes" translates to an interleaved sort key for Redshift
}

This is due to the "sortkey1" column, we see the error when we select just that column:
select "sortkey1"::varchar from svv_table_info
====>
The Amazon Redshift database encountered an error while running this query.
Invalid character data was found. This is most likely caused by stored data containing characters that are invalid for the character set the database was created in. The most common example of this is storing 8bit data in a SQL_ASCII database.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.