Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sudoswap_ethereum_events.sql #1485

Merged
merged 1 commit into from
Sep 2, 2022
Merged

Update sudoswap_ethereum_events.sql #1485

merged 1 commit into from
Sep 2, 2022

Conversation

soispoke
Copy link
Contributor

@soispoke soispoke commented Sep 2, 2022

Brief comments on the purpose of your changes:

For Dune Engine V2
I've checked that:
General checks:

  • I tested the query on dune.com after compiling the model with dbt compile (compiled queries are written to the target directory)
  • I used "refs" to reference other models in this repo and "sources" to reference raw or decoded tables
  • if adding a new model, I added a test
  • the filename is unique and ends with .sql
  • each sql file is a select statement and has only one view, table or function defined
  • column names are lowercase_snake_cased
  • if adding a new model, I edited the dbt project YAML file with new directory path for both models and seeds (if applicable)
  • if adding a new model, I edited the alter table macro to display new database object (table or view) in UI explorer
  • if adding a new materialized table, I edited the optimize table macro

Join logic:

  • if joining to base table (i.e. ethereum transactions or traces), I looked to make it an inner join if possible

Incremental logic:

  • I used is_incremental & not is_incremental jinja block filters on both base tables and decoded tables
    • where block_time >= date_trunc("day", now() - interval '1 week')
  • if joining to base table (i.e. ethereum transactions or traces), I applied join condition where block_time >= date_trunc("day", now() - interval '1 week')
  • if joining to prices view, I applied join condition where minute >= date_trunc("day", now() - interval '1 week')

@soispoke soispoke requested a review from masquot September 2, 2022 07:05
Copy link
Contributor

@masquot masquot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lfg

@soispoke soispoke merged commit 3becd93 into main Sep 2, 2022
@soispoke
Copy link
Contributor Author

soispoke commented Sep 2, 2022

🚀

@catherine-2
Copy link
Contributor

Hi @soispoke @masquot - nft.fees is currently giving an error in v2 and I found this recent PR. Not sure if this change is causing it? But wanted to flag in case not on your radar yet! Thank you!

Error: {42000} [Simba][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: org.apache.hive.service.cli.HiveSQLException: Error running query: [CANNOT_UP_CAST_DATATYPE] org.apache.spark.sql.AnalysisException: [CANNOT_UP_CAST_DATATYPE] Cannot up cast spark_catalog.sudoswap_ethereum.events.platform_fee_amount_raw from "DECIMAL(38,6.

@soispoke soispoke mentioned this pull request Sep 3, 2022
14 tasks
@soispoke soispoke deleted the fix-sudoswap-types branch September 6, 2022 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants