Go to file
desmond-hui eeed833eef
An 1871/switch cmc ohlc job to tasks (#20)
* udf endpoint condition on database name

* schedule cmc ohlc job with sf task

* also refresh asset table in case of new/deprecated coins
2022-08-24 14:31:40 -07:00
analysis An 1698/prices pipeline (#1) 2022-07-12 12:14:13 -04:00
data An 1698/prices pipeline (#1) 2022-07-12 12:14:13 -04:00
macros An 1871/switch cmc ohlc job to tasks (#20) 2022-08-24 14:31:40 -07:00
models integrate with coingecko prices endpoints: (#19) 2022-08-24 13:27:31 -07:00
snapshots An 1698/prices pipeline (#1) 2022-07-12 12:14:13 -04:00
tests An 1698/prices pipeline (#1) 2022-07-12 12:14:13 -04:00
.gitignore An 1698/prices pipeline (#1) 2022-07-12 12:14:13 -04:00
dbt_project.yml integrate with coingecko prices endpoints: (#19) 2022-08-24 13:27:31 -07:00
LICENSE Initial commit 2022-07-07 14:42:45 -07:00
packages.yml An 1698/prices pipeline (#1) 2022-07-12 12:14:13 -04:00
README.md Update readme (#18) 2022-08-24 08:44:02 -06:00

How to Add Tags to Flipside's Data

There are 3 ways to add tags to our data!

1. Add a SQL statement to our GitHub

You can use a Flipside query to create a tag set that will run on a reoccurring basis. This is a very powerful and scalable way to create a dynamic tag set that can update regularly.

To submit a Flipside query for tagging:

  • Submit a Github issue on this repo.
  • Title the issue: "Tags: " and the name of the tag(s) you wish to include in our data model.
  • In the comment section, paste the query SQL that can be run to isolate the addresses you want to tag (also include a link to the query in the Flipside app).
  • Assign the issue to gronders for review.
  • Submit!

We will review your query and get back to you if there are any questions or changes.

Your tags query must return these 7 columns:

Column Name Data type Description
blockchain string The blockchain that the address belongs to.
creator string Who created the tag. Use your Flipside username, shown in your Flipside profile URL, for tags you create.
address string The address of the contract or wallet the tag describes.
tag_name string Tag name (sub-category).
tag_type string Tag type (high-level category).
start_date timestamp Date the tag first applies. For tags that are permanent, this might be the date the address had its first behavior that warrants its tag, or the addresses' first transaction (e.g. if the tag identifies a celebrity NFT address).
end_date timestamp Date the tag no longer applies (for tags that are permanent or currently active, end_date can be NULL).

We recommend you review our docs on Tags before contributing your first tags query.

2. Add a DBT seed file to our GitHub

If you have a static list of addresses that need a tag, a DBT seed file is the best route. This is the most efficient method to tag a list of addresses that will not change and don't rely on a SQL query.

In order to submit a DBT seed file, we will be using a Pull Request (PR). Please see the docs on how to create a pull request! Once you are familiar with PR's, to add your tags:

  • Create your DBT seed file. (A DBT seed file is a csv file with the same column names as our table that can be uploaded via DBT.)
  • DBT seed file needs to have the naming convention: silver__<name of seed file>.csv. Please try to make the name unique, we don't want mulitple files with the same naming convention.
  • Place the seed file within the data/ folder of the repo.
  • Create your PR to add your seed file to our data model.
  • Assign the PR to gronders for review.

We will review your seed file and get back to you if there are any questions or changes.

Your seed file must contain these 7 columns:

Column Name Data type Description
blockchain string The blockchain that the address belongs to.
creator string Who created the tag. Use your Flipside username, shown in your Flipside profile URL, for tags you create.
address string The address of the contract or wallet the tag describes.
tag_name string Tag name (sub-category).
tag_type string Tag type (high-level category).
start_date timestamp Date the tag first applies. For tags that are permanent, this might be the date the address had its first behavior that warrants its tag, or the addresses' first transaction (e.g. if the tag identifies a celebrity NFT address).
end_date timestamp Date the tag no longer applies (for tags that are permanent or currently active, end_date can be NULL).

We recommend you review our docs on Tags before contributing your first tags seed file.

3. I know what I want but I don't know how to tag

Flipside has a very active community and extraordinarily helpful employees. Reach out to the community, or to @gto, in Discord and someone will help you set up your tags.

How to Set Up a DBT Profile for this Repo

This info is for contributors who plan to use DBT to contribute to Flipside's data models. A DBT profile is not required to add tags via a seed file (to add tags, follow the instructions above).

Use the following within profiles.yml


crosschain:
  target: dev
  outputs:
    dev:
      type: snowflake
      account: <ACCOUNT>
      role: <ROLE>
      user: <USERNAME>
      password: <PASSWORD>
      region: <REGION>
      database: CROSSCHAIN_DEV
      warehouse: <WAREHOUSE>
      schema: silver
      threads: 4
      client_session_keep_alive: False
      query_tag: <TAG>

DBT Learning Resources:

  • Learn more about dbt in the docs
  • Check out Discourse for commonly asked questions and answers
  • Join the chat on Slack for live discussions and support
  • Find dbt events near you
  • Check out the blog for the latest news on dbt's development and best practices