Code Monkey home page Code Monkey logo

dmemo's Introduction

Dmemo GitHub Actions Status

Database description management tool.

Prerequisite

Setup

$ ./bin/setup
$ # Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET of your OAuth client credential
$ vi .env
$ bundle exec foreman start

Docker

$ docker build . -t dmemo
$ cp .env.production.sample .env.docker
$ # Set all environment variables.
$ # You can generate secret_key_base by the following command:
$ #   `docker run --rm --env-file .env.docker -t dmemo ./bin/rake secret`
$ vi .env.docker
$ docker run --rm --env-file .env.docker -t dmemo ./bin/docker_db_apply.sh
$ docker compose up

Execute synchronization

./bin/rails r 'SynchronizeDataSources.run'

Configure

Create Admin User

  • Login dmemo by google account
  • Activate user as admin
$ ./bin/rake admin:activate [email protected]

Environment Variables

Name Description
GOOGLE_CLIENT_ID (required) Client ID of Google APIs
GOOGLE_CLIENT_SECRET (required) Client secret of Google APIs
GOOGLE_HOSTED_DOMAIN See https://developers.google.com/identity/protocols/OpenIDConnect#hd-param
SECRET_KEY_BASE (required only in production) A secret value generated by ./bin/rake secret
DATABASE_URL (required only in production) URL like postgresql://user@hostname/dbname
DATABASE_PASSWORD (for production) Password info in addition to DATABASE_URL

dmemo's People

Contributors

aamine avatar abicky avatar dependabot-preview[bot] avatar dependabot[bot] avatar eagletmt avatar hogelog avatar kitsuyui avatar littlestarling avatar nekketsuuu avatar ragi256 avatar riseshia avatar shimpeko avatar snowhork avatar tatsuo48 avatar

Stargazers

 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  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

Watchers

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

dmemo's Issues

Rejecting *_wk, *_old, etc

There are many junk tables such as work tables, log tables and backup tables... I want to reject them from the table list.

Display update interval & last updated timestamp for each table

TableMemo also displays the update interval and last modified date of the table you are looking at.

Now, meta data of table is the column structure and the number of rows, only two types.
Add a statistic information to show how much new rows are in the table.

Update to Rails 5

Hi, we use dmemo.
Thanks a lot!!

By the way, are you planning to update to Rails 5?

Transfer to organization

Currently I am not actively maintaining it, while @ragi256 is very actively maintaining it.

I think I'm going to transfer it to organization, because it's difficult to maintain in a personal repository because of its limited permissions.

@ragi256 What do you think?

Timestamp value is shown as "UTC", but does not have zone

以下の画像のように、サンプルデータのところでtimestamp without time zone型の値に対してUTCと表示されてしまいます。しかも実はこの時刻はJSTなので、すごく紛らわしいという……。

2016-08-04 11 33 49

元DBはRedshiftです。

Binary column type

Binary column type (like varbinary) value can not format.

But I have no better idea.
Unpacking?
I just want to see value type or existence when binary column type.
How about my idea ?

Keyword contain .(dot), don't move this keyword description page.

I registered Keyword contain comma(ex:Developers.IO).
but this description page is not move.(status of 404).
I use dmemo version 0.3.2.

キーワードに.(ドット)を含むようなキーワードを登録するとDBに登録はされているのですが、
詳細ページに移動しようとするとDBへのSelect文が.(ドット)の手前まででDBに問い合わせているため、レコードが見つからずページ遷移が失敗しています。

登録が行われた際のログと、その後のページ遷移を行おうとした際のログを添付します。

登録時のログ

web_1  |   SQL (0.6ms)  INSERT INTO "keywords" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"  [["name", "Developers.IO"], ["description", "省略"], ["created_at", "2016-09-15 03:00:27.302907"], ["updated_at", "2016-09-15 03:00:27.302907"]]
web_1  |   SQL (0.6ms)  INSERT INTO "keyword_logs" ("revision", "user_id", "description", "description_diff", "keyword_id", "created_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"  [["revision", 1], ["user_id", 2], ["description", "省略"], ["keyword_id", 1], ["created_at", "2016-09-15 03:00:27.306320"]]
web_1  |    (4.8ms)  COMMIT

遷移時のログ

web_1  | Started GET "/keywords/Developers.IO" for 172.19.0.1 at 2016-09-15 03:00:27 +0000
web_1  | Processing by KeywordsController#show as
web_1  |   Parameters: {"id"=>"Developers"}
web_1  |   User Load (0.2ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 2]]
web_1  |   Keyword Load (0.5ms)  SELECT  "keywords".* FROM "keywords" WHERE "keywords"."name" = $1 LIMIT 1  [["name", "Developers"]]
web_1  | Completed 404 Not Found in 7ms (ActiveRecord: 0.7ms)
web_1  |
web_1  | ActiveRecord::RecordNotFound (Couldn't find Keyword):
web_1  |   app/controllers/keywords_controller.rb:11:in `show'

Add schema_memos

database_memos -> schema_memos -> table_memos -> column_memos

Database column is always active.

I moved Keyword contents ,but Database column is active in sidemenu.
I use dmemo version 0.3.2.

左側のサイドメニューの項目が、
他のページ(Keyword等)に遷移しても必ずDatabaseがアクティブになっています。
Databaseが登録されたない状態のみかとも思ったのですが、
Databaseを登録しても同様の現象です。

Add registration for metadata of table

Related to #292

There are many other systems around Redshift as a DWH DB.
For example, data pipeline jobs, streaming load, ETL batch.
It would be useful to be able to register various metadata of a table to Dmemo from other systems.

(And if possible, I want to add API to provide metadata.)

If this feature is added, Dmemo can also be a convenient metadata repository, and there will be more ways to use it.

Add API for table memo and schema memo

Add API functionality to Dmemo to make it easier to combine DWH environments.
If Dmemo can be treated not only as a document site but also as an API server, it will be more useful.

For example

  • auto complete of table columns for SQL Editor (such as bdash)
  • auto link to Dmemo in SQL share web app ( such as bdash server)
  • cache layer for meta data of DWH DB

Table name autolink

Table names in markdown document should become hyperlink to the document page.

Support SSL option for Presto connector

Hello,

First of all, Thank you for supporting Presto adopter. I'm happy it because I gave up it when dmemo was released.
I have a question, so I file this issue. If you have a chance, please give me your advice.

Description

I tried our Presto environment (TreasureData), which requires SSL parameter with 443 port, to connect from dmemo.
But, I noticed that connection_config doesn't have SSL option. Then, ssl: false is always used as default in presto client library. I would like to add a new parameter to allow users to specify ssl parameter.
For example,

    def connection_config
      {
        catalog: @data_source.dbname,
        server: "#{@data_source.host}:#{@data_source.port}",
        user: @data_source.user,
        password: @data_source.password.presence,
        ssl: {verify: false},
      }.compact
    end

Question

I'm working on making a PR to support ssl option.
But, I noticed that an existing Presto user needs to migrate tables in order to add ssl option if I follow bigquery adaptor implementation. (Ex. I saw data_sources.schema and bigquery_configs.schema)

I want to minimize the code change without any table migration.

Thus, I would like to know whether the following change is acceptable for your team?

  • Host parameter allows URL like https://xxxxx/?ssl_verify=false instead of only xxxxx.
  • Then, presto_adaptor.rb parses it and build a new connection_config.

If this is acceptable, I'll try to make a PR for this.
If this is not acceptable, I'll follow a way as same as bigquery adaptor.

I'm not familiar with Rails. So, if you have any advise, that would be helpful.

Thank you,

Some table names are not auto-linked

I experienced that some table names are not auto-linked in the table description. e.g. some_log and some_log_latest is auto-linked, but some_log_XXX_latest is not auto-linked. This may be a bug?

Sort tables / columns

Currently tables / columns are ordered in random. It should be sorted in alphabetical order (for tables), or in the same order as DB table (for columns).

Prefix search for table name is not working as expected for some table

For example, searching with the word "push" won't list "push_notification_token" table on the result, although other tables like "push_notification_settings" is listed.

I'm not sure about the patterns of table name which will be listed with prefix search or not.

Note: Searching with full table name (not prefix) is working expectedly.

My version is 0.4.0-rc.

Keyword documentation and autolink

Documentation feature for domain-specific keywords is useful.
It is really nice if keywords in table document becomes hyperlink automatically.

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.