"Cannot find matching FK Table ID for FK Field null" error

Hello, I'm having an issue with on of my tables and was hoping to get some help. I'm trying to look at the data in a table called "offer_sent." When I view it, I get a "there was a problem with your question" notice and the full error message is "Cannot find matching FK Table ID for FK Field null."

I've narrowed down the issue to the "account_id" field. If I remove this column and then load the table, it works. Unfortunately, the "account_id" data is what I need.

I'm guessing a null value somehow made it into "account_id" but I'm not sure how to correct that, or why this would stop the table from loading. I thought "account_id" might be being used for a join, but as far as I can tell, it is not. When I look "about this table," the account_id field has a field type of "no field type" and a data type as "type/text."

Any suggestions for what to look into or how to correct this would be much appreciated. Thank you in advance!

Hi @karge
Post "Diagnostic Info" from Admin > Troubleshooting.
And you would need to include the output of this URL:
/api/table/123/query_metadata?include_sensitive_fields=true
Where 123 is the table ID that you see if you go to Admin > Data Model and click the table and look in the URL.

Hi!
I have the same problem but using the saved queries as a tables to join.
I tried to receive the output of the request /api/table/123/query_metadata?include_sensitive_fields=true, but I've got 404 error in my browser.

Saved questions are made on MySQL base.

   {
  "browser-info": {
    "language": "ru-RU",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.15+10",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.15",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.15+10",
    "os.name": "Linux",
    "os.version": "4.4.0-143-generic",
    "user.language": "en",
    "user.timezone": "UTC"
  },
  "metabase-info": {
    "databases": [
      "googleanalytics",
      "mysql",
      "postgres",
      "h2"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "11.4 (Ubuntu 11.4-1.pgdg16.04+1)"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.3.2"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2022-06-13",
      "tag": "v0.43.3",
      "branch": "release-x.43.x",
      "hash": "c9c7ef0"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

@tritatuy You need to change 123 to your table ID. Like I describe, go to Admin > Data Model to find the ID. Since you are using two different tables, then you would need to get the information from both.

Post the full stacktrace from Admin > Troubleshooting > Logs.

I did it and the result was 404.
Sorry, I pasted '123' in previous message here as example)

Oh, sorry, I think, I missed one nesting level in the request. Now I see the response.

@tritatuy I don't understand. Was it a wrong configuration? If yes, then what was it and what did you do to fix it?

I used wrong request last time.
Now the requests are:

  • /api/table/457/query_metadata?include_sensitive_fields=true
{"description":"Target actions for the last 366 days from oxono.accounting table. They are joined with the data from adgoal.accounting table to receive the information about publisher, ad space, country of action and actual publisher's provision. To see all actions please use 'Historic Actions' table.","entity_type":"entity/GenericTable","schema":null,"db":{"description":null,"features":["basic-aggregations","standard-deviation-aggregations","expression-aggregations","foreign-keys","right-join","left-join","native-parameters","nested-queries","expressions","set-timezone","binning","inner-join","advanced-math-expressions"],"cache_field_values_schedule":"0 50 0 * * ? *","timezone":"UTC","auto_run_queries":true,"metadata_sync_schedule":"0 0 * * * ? *","name":"Summary","settings":null,"caveats":null,"creator_id":null,"is_full_sync":true,"updated_at":"2020-07-02T15:48:15.395735Z","cache_ttl":null,"details":null,"is_sample":false,"id":8,"is_on_demand":false,"options":null,"engine":"mysql","initial_sync_status":"complete","refingerprint":null,"created_at":"2020-07-02T15:48:15.335149Z","points_of_interest":null},"show_in_getting_started":false,"name":"actions","fields":[{"description":null,"database_type":"INT","semantic_type":"type/PK","table_id":457,"coercion_strategy":null,"name":"id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.603133Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8581,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":0,"visibility_type":"normal","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"ID","database_position":0,"fingerprint":null,"created_at":"2020-07-02T15:48:15.509132Z","base_type":"type/Integer","points_of_interest":null},{"description":"ID of an affiliate network.","database_type":"TINYINT","semantic_type":"type/FK","table_id":457,"coercion_strategy":null,"name":"network_id","fingerprint_version":4,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":8602,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.604565Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8570,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":1,"visibility_type":"normal","default_dimension_option":null,"target":{"description":null,"database_type":"TINYINT","semantic_type":"type/PK","table_id":458,"coercion_strategy":null,"name":"id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"updated_at":"2021-05-04T14:56:53.322705Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8602,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":0,"visibility_type":"normal","preview_display":true,"display_name":"ID","database_position":0,"fingerprint":null,"created_at":"2020-07-02T15:48:15.632937Z","base_type":"type/Integer","points_of_interest":null},"preview_display":true,"display_name":"Network ID","database_position":1,"fingerprint":{"global":{"distinct-count":42,"nil%":0.0},"type":{"type/Number":{"min":1.0,"q1":2.1189903652535,"q3":57.9144991448738,"max":81.0,"sd":26.926905887347445,"avg":24.2246}}},"created_at":"2020-07-02T15:48:15.498274Z","base_type":"type/Integer","points_of_interest":null},{"description":"ID of an advertiser. Received from data from an affiliate network and is used to map an action to an advertiser in Metabee reports.","database_type":"INT","semantic_type":"type/FK","table_id":457,"coercion_strategy":null,"name":"advertiser_id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":8618,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.605856Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8579,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":2,"visibility_type":"normal","default_dimension_option":null,"target":{"description":null,"database_type":"INT","semantic_type":"type/PK","table_id":456,"coercion_strategy":null,"name":"id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"updated_at":"2021-04-30T12:43:22.080002Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8618,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":0,"visibility_type":"normal","preview_display":true,"display_name":"ID","database_position":0,"fingerprint":null,"created_at":"2020-07-02T15:48:15.730946Z","base_type":"type/Integer","points_of_interest":null},"preview_display":true,"display_name":"Advertiser ID","database_position":2,"fingerprint":{"global":{"distinct-count":1377,"nil%":0.0},"type":{"type/Number":{"min":100012.0,"q1":109835.83403498007,"q3":155401.99129319072,"max":173140.0,"sd":24545.610692399478,"avg":134960.9182}}},"created_at":"2020-07-02T15:48:15.50718Z","base_type":"type/Integer","points_of_interest":null},{"description":"ID of a programm in Metabee database.","database_type":"INT","semantic_type":"type/FK","table_id":457,"coercion_strategy":null,"name":"program_id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":8639,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.607139Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8563,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":3,"visibility_type":"normal","default_dimension_option":null,"target":{"description":"Program ID in Metabee.","database_type":"INT","semantic_type":"type/PK","table_id":460,"coercion_strategy":null,"name":"id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"updated_at":"2021-05-04T15:08:25.140685Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8639,"last_analyzed":"2020-07-02T16:41:42.598423Z","position":0,"visibility_type":"normal","preview_display":true,"display_name":"ID","database_position":0,"fingerprint":null,"created_at":"2020-07-02T16:41:38.98846Z","base_type":"type/Integer","points_of_interest":null},"preview_display":true,"display_name":"Program ID","database_position":3,"fingerprint":{"global":{"distinct-count":1390,"nil%":0.0},"type":{"type/Number":{"min":21.0,"q1":65552.44493612721,"q3":109733.29133328842,"max":123292.0,"sd":38729.38998799004,"avg":80352.3849}}},"created_at":"2020-07-02T15:48:15.492119Z","base_type":"type/Integer","points_of_interest":null},{"description":"ID of a publisher in Adgoal database.","database_type":"INT","semantic_type":"type/FK","table_id":457,"coercion_strategy":null,"name":"publisher_id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":8658,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.608381Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8573,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":4,"visibility_type":"normal","default_dimension_option":null,"target":{"description":"Publisher ID","database_type":"INT","semantic_type":"type/PK","table_id":461,"coercion_strategy":null,"name":"id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"updated_at":"2021-05-04T15:09:26.542258Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8658,"last_analyzed":"2020-07-02T19:09:49.435685Z","position":0,"visibility_type":"normal","preview_display":true,"display_name":"ID","database_position":0,"fingerprint":null,"created_at":"2020-07-02T19:09:45.642959Z","base_type":"type/Integer","points_of_interest":null},"preview_display":true,"display_name":"Publisher ID","database_position":4,"fingerprint":{"global":{"distinct-count":123,"nil%":0.0043},"type":{"type/Number":{"min":100012.0,"q1":102128.89475388076,"q3":106039.65065741335,"max":106381.0,"sd":1796.2107416014205,"avg":104054.69930702019}}},"created_at":"2020-07-02T15:48:15.501345Z","base_type":"type/Integer","points_of_interest":null},{"description":"ID of a publisher's ad space where a customer came from.","database_type":"INT","semantic_type":"type/FK","table_id":457,"coercion_strategy":null,"name":"ad_space_id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":8679,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.609668Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8561,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":5,"visibility_type":"normal","default_dimension_option":null,"target":{"description":"Ad space ID","database_type":"INT","semantic_type":"type/PK","table_id":462,"coercion_strategy":null,"name":"id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"updated_at":"2021-07-23T11:37:04.434417Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8679,"last_analyzed":"2020-07-02T20:39:55.342294Z","position":0,"visibility_type":"normal","preview_display":true,"display_name":"ID","database_position":0,"fingerprint":null,"created_at":"2020-07-02T20:39:50.745072Z","base_type":"type/Integer","points_of_interest":null},"preview_display":true,"display_name":"Ad Space ID","database_position":5,"fingerprint":{"global":{"distinct-count":184,"nil%":0.0043},"type":{"type/Number":{"min":0.0,"q1":3333.323387695896,"q3":11903.791889464504,"max":13876.0,"sd":3929.6305094950926,"avg":7001.015868233404}}},"created_at":"2020-07-02T15:48:15.490465Z","base_type":"type/Integer","points_of_interest":null},{"description":"Type of a target action.","database_type":"VARCHAR","semantic_type":"type/Category","table_id":457,"coercion_strategy":null,"name":"action_type","fingerprint_version":5,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.610895Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8568,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":6,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Action Type","database_position":6,"fingerprint":{"global":{"distinct-count":2,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":4.0}}},"created_at":"2020-07-02T15:48:15.496224Z","base_type":"type/Text","points_of_interest":null},{"description":"Amount of a basket in EUR.","database_type":"FLOAT","semantic_type":"type/Cost","table_id":457,"coercion_strategy":null,"name":"order_amount","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.611866Z","custom_position":0,"effective_type":"type/Float","active":true,"nfc_path":null,"parent_id":null,"id":8585,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":7,"visibility_type":"normal","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Order Amount","database_position":7,"fingerprint":{"global":{"distinct-count":3972,"nil%":0.0},"type":{"type/Number":{"min":-263.1099853515625,"q1":-28.93019334489074,"q3":56.950559326497256,"max":20000.0,"sd":625.6008112103902,"avg":99.39504409577474}}},"created_at":"2020-07-02T15:48:15.51262Z","base_type":"type/Float","points_of_interest":null},{"description":"Expected advertiser's expenses: adgoal commission + publisher's fee. In EUR.","database_type":"FLOAT","semantic_type":"type/Income","table_id":457,"coercion_strategy":null,"name":"expected_revenue","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.612843Z","custom_position":0,"effective_type":"type/Float","active":true,"nfc_path":null,"parent_id":null,"id":8587,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":8,"visibility_type":"details-only","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Expected Revenue","database_position":8,"fingerprint":{"global":{"distinct-count":1186,"nil%":0.0},"type":{"type/Number":{"min":-10.520000457763672,"q1":-1.0906222415399007,"q3":2.2149064995488326,"max":338.6400146484375,"sd":11.474447802116952,"avg":3.1283650016253812}}},"created_at":"2020-07-02T15:48:15.515972Z","base_type":"type/Float","points_of_interest":null},{"description":"Actual advertiser's expenses: adgoal commission + publisher's fee. In EUR.","database_type":"FLOAT","semantic_type":"type/Income","table_id":457,"coercion_strategy":null,"name":"actual_revenue","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.613841Z","custom_position":0,"effective_type":"type/Float","active":true,"nfc_path":null,"parent_id":null,"id":8572,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":9,"visibility_type":"normal","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Actual Revenue","database_position":9,"fingerprint":{"global":{"distinct-count":1185,"nil%":0.0},"type":{"type/Number":{"min":-10.520000457763672,"q1":-1.091293426241993,"q3":2.2150066687325047,"max":338.6400146484375,"sd":11.474325032545394,"avg":3.1279220016067844}}},"created_at":"2020-07-02T15:48:15.500371Z","base_type":"type/Float","points_of_interest":null},{"description":"The percentage of the revenue which will be paid to a publisher. For instance, 70%.","database_type":"VARCHAR","semantic_type":"type/Share","table_id":457,"coercion_strategy":null,"name":"provision","fingerprint_version":5,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.614817Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8559,"last_analyzed":"2021-05-04T16:00:00.877132Z","position":10,"visibility_type":"normal","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Provision","database_position":10,"fingerprint":{"global":{"distinct-count":25,"nil%":0.0736},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":1.8565}}},"created_at":"2020-07-02T15:48:15.488944Z","base_type":"type/Text","points_of_interest":null},{"description":"Data of creation an action in an affiliate network.","database_type":"TIMESTAMP","semantic_type":"type/CreationTimestamp","table_id":457,"coercion_strategy":null,"name":"date_created","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14"],"updated_at":"2021-05-04T16:00:47.61578Z","custom_position":0,"effective_type":"type/DateTimeWithLocalTZ","active":true,"nfc_path":null,"parent_id":null,"id":8582,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":11,"visibility_type":"normal","default_dimension_option":"2","target":null,"preview_display":true,"display_name":"Date Created","database_position":11,"fingerprint":{"global":{"distinct-count":790,"nil%":0.0},"type":{"type/DateTime":{"earliest":"2019-01-01T00:00:07Z","latest":"2019-01-02T20:43:28Z"}}},"created_at":"2020-07-02T15:48:15.510081Z","base_type":"type/DateTimeWithLocalTZ","points_of_interest":null},{"description":"Data of last changing an action in an affiliate network.","database_type":"TIMESTAMP","semantic_type":"type/JoinTimestamp","table_id":457,"coercion_strategy":null,"name":"date_modified","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14"],"updated_at":"2021-05-04T16:00:47.616745Z","custom_position":0,"effective_type":"type/DateTimeWithLocalTZ","active":true,"nfc_path":null,"parent_id":null,"id":8575,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":12,"visibility_type":"normal","default_dimension_option":"2","target":null,"preview_display":true,"display_name":"Date Modified","database_position":12,"fingerprint":{"global":{"distinct-count":609,"nil%":0.0},"type":{"type/DateTime":{"earliest":"2019-01-01T00:00:19Z","latest":"2020-01-02T05:08:50Z"}}},"created_at":"2020-07-02T15:48:15.503232Z","base_type":"type/DateTimeWithLocalTZ","points_of_interest":null},{"description":"Actual status of an action.","database_type":"TINYINT","semantic_type":"type/Category","table_id":457,"coercion_strategy":null,"name":"status","fingerprint_version":4,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":{"id":8,"field_id":8565,"name":"Status","type":"internal","human_readable_field_id":null,"created_at":"2020-07-02T16:39:43.483749","updated_at":"2020-07-02T16:39:43.483749"},"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.617888Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8565,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":13,"visibility_type":"normal","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Status","database_position":13,"fingerprint":{"global":{"distinct-count":3,"nil%":0.0},"type":{"type/Number":{"min":0.0,"q1":0.7239955826684336,"q3":1.416873867028272,"max":2.0,"sd":0.36170961196011703,"avg":1.0882}}},"created_at":"2020-07-02T15:48:15.49383Z","base_type":"type/Integer","points_of_interest":null},{"description":"Date and time when the action was confirmed. this will be the date of entry to the OXONO database, and not the actual date of action confirmation, since these fields show statistics for publishers.","database_type":"TIMESTAMP","semantic_type":"type/JoinTimestamp","table_id":457,"coercion_strategy":null,"name":"timestamp_approved","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14"],"updated_at":"2021-05-04T16:00:47.618864Z","custom_position":0,"effective_type":"type/DateTimeWithLocalTZ","active":true,"nfc_path":null,"parent_id":null,"id":8564,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":14,"visibility_type":"sensitive","default_dimension_option":"2","target":null,"preview_display":true,"display_name":"Timestamp Approved","database_position":14,"fingerprint":{"global":{"distinct-count":427,"nil%":0.6654},"type":{"type/DateTime":{"earliest":"2019-01-02T04:00:27Z","latest":"2019-11-02T06:29:47Z"}}},"created_at":"2020-07-02T15:48:15.492938Z","base_type":"type/DateTimeWithLocalTZ","points_of_interest":null},{"description":"Date and time when the action was declined. This will be the date of entry to the OXONO database, and not the actual date of action cancellation, since these fields show statistics for publishers.","database_type":"TIMESTAMP","semantic_type":"type/CancelationTimestamp","table_id":457,"coercion_strategy":null,"name":"timestamp_declined","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14"],"updated_at":"2021-05-04T16:00:47.619836Z","custom_position":0,"effective_type":"type/DateTimeWithLocalTZ","active":true,"nfc_path":null,"parent_id":null,"id":8574,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":15,"visibility_type":"sensitive","default_dimension_option":"2","target":null,"preview_display":true,"display_name":"Timestamp Declined","database_position":15,"fingerprint":{"global":{"distinct-count":169,"nil%":0.9336},"type":{"type/DateTime":{"earliest":"2019-01-02T03:00:37Z","latest":"2020-01-02T05:08:50Z"}}},"created_at":"2020-07-02T15:48:15.502292Z","base_type":"type/DateTimeWithLocalTZ","points_of_interest":null},{"description":"Date and time when the affiliate link was clicked.","database_type":"TIMESTAMP","semantic_type":"type/CreationTimestamp","table_id":457,"coercion_strategy":null,"name":"timestamp_click","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14"],"updated_at":"2021-05-04T16:00:47.620795Z","custom_position":0,"effective_type":"type/DateTimeWithLocalTZ","active":true,"nfc_path":null,"parent_id":null,"id":8557,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":16,"visibility_type":"details-only","default_dimension_option":"2","target":null,"preview_display":true,"display_name":"Timestamp Click","database_position":16,"fingerprint":{"global":{"distinct-count":5342,"nil%":0.1762},"type":{"type/DateTime":{"earliest":"1970-01-01T01:00:00Z","latest":"2019-01-02T23:26:13Z"}}},"created_at":"2020-07-02T15:48:15.487599Z","base_type":"type/DateTimeWithLocalTZ","points_of_interest":null},{"description":"URL of a source of a click.","database_type":"MEDIUMTEXT","semantic_type":"type/URL","table_id":457,"coercion_strategy":null,"name":"click_referer","fingerprint_version":5,"has_field_values":"search","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.621788Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8549,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":17,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Click Referer","database_position":17,"fingerprint":{"global":{"distinct-count":167,"nil%":0.0854},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0254,"percent-email":0.0,"percent-state":0.0,"average-length":1.4622}}},"created_at":"2020-07-02T15:48:15.479674Z","base_type":"type/Text","points_of_interest":null},{"description":"Country of a customer. It is the geo of IP of click made by a customer. Use it to create world map visualisation.","database_type":"VARCHAR","semantic_type":"type/Country","table_id":457,"coercion_strategy":null,"name":"click_country_iso","fingerprint_version":5,"has_field_values":"search","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.622748Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8577,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":18,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Country ISO","database_position":18,"fingerprint":{"global":{"distinct-count":111,"nil%":0.0917},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.5159,"average-length":1.7658}}},"created_at":"2020-07-02T15:48:15.505189Z","base_type":"type/Text","points_of_interest":null},{"description":"Country of a customer. It is the geo of IP of click made by a customer.","database_type":"VARCHAR","semantic_type":"type/Country","table_id":457,"coercion_strategy":null,"name":"click_country","fingerprint_version":5,"has_field_values":"search","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.623705Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8553,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":19,"visibility_type":"normal","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Country","database_position":19,"fingerprint":{"global":{"distinct-count":107,"nil%":0.1182},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":5.0E-4,"average-length":6.8699}}},"created_at":"2020-07-02T15:48:15.48391Z","base_type":"type/Text","points_of_interest":null},{"description":null,"database_type":"FLOAT","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"actual_revenue_in_original_currency","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.624668Z","custom_position":0,"effective_type":"type/Float","active":true,"nfc_path":null,"parent_id":null,"id":8552,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":20,"visibility_type":"sensitive","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Actual Revenue In Original Currency","database_position":20,"fingerprint":{"global":{"distinct-count":747,"nil%":0.0},"type":{"type/Number":{"min":-12.40999984741211,"q1":-3.1876207467512785,"q3":1.248259697131901,"max":11200.0,"sd":125.76052157813781,"avg":4.4184709986208}}},"created_at":"2020-07-02T15:48:15.482921Z","base_type":"type/Float","points_of_interest":null},{"description":null,"database_type":"VARCHAR","semantic_type":"type/Category","table_id":457,"coercion_strategy":null,"name":"original_currency","fingerprint_version":5,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.625648Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8584,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":21,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Original Currency","database_position":21,"fingerprint":{"global":{"distinct-count":15,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":2.9997}}},"created_at":"2020-07-02T15:48:15.511761Z","base_type":"type/Text","points_of_interest":null},{"description":null,"database_type":"INT","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"currency_rate_id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.626622Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8589,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":22,"visibility_type":"sensitive","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Currency Rate ID","database_position":22,"fingerprint":{"global":{"distinct-count":101,"nil%":0.7368},"type":{"type/Number":{"min":7316413.0,"q1":7321749.81239179,"q3":7327080.6151902,"max":1.0632318E7,"sd":425539.65894520667,"avg":7449229.415653495}}},"created_at":"2020-07-02T15:48:15.518866Z","base_type":"type/Integer","points_of_interest":null},{"description":"Uniq ID of a program from an affiliate network.","database_type":"VARCHAR","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"network_program_id","fingerprint_version":5,"has_field_values":"search","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.627602Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8555,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":23,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Network Program ID","database_position":23,"fingerprint":{"global":{"distinct-count":1228,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":4.6378}}},"created_at":"2020-07-02T15:48:15.485754Z","base_type":"type/Text","points_of_interest":null},{"description":"Uniq order ID from an affiliate network.","database_type":"VARCHAR","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"network_order_id","fingerprint_version":5,"has_field_values":"search","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.628569Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8546,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":24,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Network Order ID","database_position":24,"fingerprint":{"global":{"distinct-count":9997,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":11.6289}}},"created_at":"2020-07-02T15:48:15.475178Z","base_type":"type/Text","points_of_interest":null},{"description":null,"database_type":"MEDIUMTEXT","semantic_type":"type/Comment","table_id":457,"coercion_strategy":null,"name":"advertiser_comment","fingerprint_version":5,"has_field_values":"search","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.62956Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8566,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":25,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Advertiser Comment","database_position":25,"fingerprint":{"global":{"distinct-count":45,"nil%":0.0837},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":0.1958}}},"created_at":"2020-07-02T15:48:15.494577Z","base_type":"type/Text","points_of_interest":null},{"description":null,"database_type":"MEDIUMTEXT","semantic_type":"type/Comment","table_id":457,"coercion_strategy":null,"name":"network_comment","fingerprint_version":5,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.630551Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8571,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":26,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Network Comment","database_position":26,"fingerprint":{"global":{"distinct-count":306,"nil%":0.0044},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.015,"percent-state":0.0,"average-length":0.7317}}},"created_at":"2020-07-02T15:48:15.499417Z","base_type":"type/Text","points_of_interest":null},{"description":null,"database_type":"MEDIUMTEXT","semantic_type":"type/Comment","table_id":457,"coercion_strategy":null,"name":"internal_comment","fingerprint_version":5,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.631517Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8621,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":27,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Internal Comment","database_position":27,"fingerprint":{"global":{"distinct-count":1,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":0.0}}},"created_at":"2020-07-02T16:00:00.090591Z","base_type":"type/Text","points_of_interest":null},{"description":"A reason of the cancellation an action. Received from an affiliate network.","database_type":"MEDIUMTEXT","semantic_type":"type/Comment","table_id":457,"coercion_strategy":null,"name":"network_cancel_reason","fingerprint_version":5,"has_field_values":"search","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.632487Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8551,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":28,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Network Cancel Reason","database_position":28,"fingerprint":{"global":{"distinct-count":150,"nil%":0.0854},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":1.693}}},"created_at":"2020-07-02T15:48:15.481853Z","base_type":"type/Text","points_of_interest":null},{"description":"Name of a project, for instance Adgoal, Tippfehler...","database_type":"VARCHAR","semantic_type":"type/Category","table_id":457,"coercion_strategy":null,"name":"project","fingerprint_version":5,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.633501Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8548,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":29,"visibility_type":"normal","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Project","database_position":29,"fingerprint":{"global":{"distinct-count":4,"nil%":9.0E-4},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":9.1642}}},"created_at":"2020-07-02T15:48:15.478596Z","base_type":"type/Text","points_of_interest":null},{"description":"Adgoal instrument which was used by publisher. For instance UniversalSearch, Smartlink...","database_type":"VARCHAR","semantic_type":"type/Category","table_id":457,"coercion_strategy":null,"name":"instrument","fingerprint_version":5,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.634502Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8586,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":30,"visibility_type":"normal","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Instrument","database_position":30,"fingerprint":{"global":{"distinct-count":8,"nil%":0.0917},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":10.7512}}},"created_at":"2020-07-02T15:48:15.513558Z","base_type":"type/Text","points_of_interest":null},{"description":"SubID added by a publisher.","database_type":"VARCHAR","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"publisher_subid","fingerprint_version":5,"has_field_values":"search","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.635581Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8556,"last_analyzed":"2021-04-20T09:00:10.635833Z","position":31,"visibility_type":"details-only","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Publisher SubID","database_position":31,"fingerprint":{"global":{"distinct-count":2655,"nil%":0.0917},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":6.7145}}},"created_at":"2020-07-02T15:48:15.486661Z","base_type":"type/Text","points_of_interest":null},{"description":"ID of a publisher's payoff which the action was included in.","database_type":"INT","semantic_type":"type/FK","table_id":457,"coercion_strategy":null,"name":"publisher_payoff_id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":9105,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.63657Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8578,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":32,"visibility_type":"normal","default_dimension_option":null,"target":{"description":null,"database_type":"INT","semantic_type":"type/PK","table_id":499,"coercion_strategy":null,"name":"id","fingerprint_version":0,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"updated_at":"2021-04-28T13:00:00.40789Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":9105,"last_analyzed":null,"position":0,"visibility_type":"normal","preview_display":true,"display_name":"ID","database_position":0,"fingerprint":null,"created_at":"2021-04-28T13:00:00.40789Z","base_type":"type/Integer","points_of_interest":null},"preview_display":true,"display_name":"Publisher Payoff ID","database_position":32,"fingerprint":{"global":{"distinct-count":311,"nil%":0.144},"type":{"type/Number":{"min":6724.0,"q1":6923.885366855522,"q3":7149.381841747231,"max":8503.0,"sd":166.18729017780706,"avg":7055.503387850467}}},"created_at":"2020-07-02T15:48:15.506203Z","base_type":"type/Integer","points_of_interest":null},{"description":null,"database_type":"CHAR","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"guid","fingerprint_version":4,"has_field_values":"search","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.637569Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8558,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":33,"visibility_type":"sensitive","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"GUID","database_position":33,"fingerprint":{"global":{"distinct-count":10001,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"average-length":40.0}}},"created_at":"2020-07-02T15:48:15.488275Z","base_type":"type/Text","points_of_interest":null},{"description":"System parameter. CRC32(CONCAT_WS(...))","database_type":"BIGINT","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"verify","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.638567Z","custom_position":0,"effective_type":"type/BigInteger","active":true,"nfc_path":null,"parent_id":null,"id":8567,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":34,"visibility_type":"sensitive","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Verify","database_position":34,"fingerprint":{"global":{"distinct-count":10001,"nil%":0.0},"type":{"type/Number":{"min":373236.0,"q1":1.0564172772873352E9,"q3":3.2176189950726156E9,"max":4.294933551E9,"sd":1.2424487844156218E9,"avg":2.1415780715632E9}}},"created_at":"2020-07-02T15:48:15.495462Z","base_type":"type/BigInteger","points_of_interest":null},{"description":"System parameter.","database_type":"TINYINT","semantic_type":"type/Category","table_id":457,"coercion_strategy":null,"name":"active","fingerprint_version":4,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.639558Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8619,"last_analyzed":"2020-07-02T16:00:00.650968Z","position":35,"visibility_type":"sensitive","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Active","database_position":35,"fingerprint":{"global":{"distinct-count":1,"nil%":0.0},"type":{"type/Number":{"min":1.0,"q1":1.0,"q3":1.0,"max":1.0,"sd":0.0,"avg":1.0}}},"created_at":"2020-07-02T16:00:00.086826Z","base_type":"type/Integer","points_of_interest":null},{"description":"Adgoal SubID, where: a — merchants_id, m — marketing_id, p — panel_id, t — partner_profile_id, c - country, s — publisher_subid","database_type":"VARCHAR","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"external_subid","fingerprint_version":4,"has_field_values":"search","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:00:47.640543Z","custom_position":0,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":8562,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":36,"visibility_type":"sensitive","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"External SubID","database_position":36,"fingerprint":{"global":{"distinct-count":5358,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"average-length":33.0339}}},"created_at":"2020-07-02T15:48:15.491299Z","base_type":"type/Text","points_of_interest":null},{"description":"ID of an advertiser received from adgoal tracker. This field is used to map an action to an advertiser in Adgoal reports. It may differ from the 'Advertiser ID' field because of errors in the tracker's logic, so it is better to use 'Advertiser ID' field.","database_type":"INT","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"shopuid","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.641529Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8554,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":37,"visibility_type":"sensitive","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Shop UID","database_position":37,"fingerprint":{"global":{"distinct-count":1365,"nil%":0.0043},"type":{"type/Number":{"min":0.0,"q1":109755.77902257194,"q3":155339.43820043732,"max":173140.0,"sd":24730.969997847744,"avg":134858.90358541728}}},"created_at":"2020-07-02T15:48:15.484742Z","base_type":"type/Integer","points_of_interest":null},{"description":"ID of the smartlink parameter (if the action was done via the SmartLink tool).","database_type":"INT","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"profile_id","fingerprint_version":4,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.642528Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8620,"last_analyzed":"2020-07-02T16:00:00.650968Z","position":38,"visibility_type":"details-only","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Profile ID","database_position":38,"fingerprint":{"global":{"distinct-count":3,"nil%":0.9997},"type":{"type/Number":{"min":0.0,"q1":0.0,"q3":421.7387899629756,"max":544.0,"sd":314.0785464391564,"avg":181.33333333333334}}},"created_at":"2020-07-02T16:00:00.088882Z","base_type":"type/Integer","points_of_interest":null},{"description":"ID for the abbreviated link (if used). The ID value is located in the \"adgoal.smartsocial_shortlinks\" table.","database_type":"INT","semantic_type":null,"table_id":457,"coercion_strategy":null,"name":"profile_subid","fingerprint_version":4,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.643514Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8622,"last_analyzed":"2020-07-02T16:00:00.650968Z","position":39,"visibility_type":"details-only","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Profile SubID","database_position":39,"fingerprint":{"global":{"distinct-count":2,"nil%":0.9997},"type":{"type/Number":{"min":0.0,"q1":0.0,"q3":0.0,"max":0.0,"sd":0.0,"avg":0.0}}},"created_at":"2020-07-02T16:00:00.091849Z","base_type":"type/Integer","points_of_interest":null},{"description":"Date of creating a record in oxono.accounting database.","database_type":"TIMESTAMP","semantic_type":"type/JoinTimestamp","table_id":457,"coercion_strategy":null,"name":"oxono_created","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14"],"updated_at":"2021-05-04T16:00:47.644487Z","custom_position":0,"effective_type":"type/DateTimeWithLocalTZ","active":true,"nfc_path":null,"parent_id":null,"id":8731,"last_analyzed":"2020-07-07T14:00:06.776909Z","position":40,"visibility_type":"details-only","default_dimension_option":"2","target":null,"preview_display":true,"display_name":"Oxono Created","database_position":40,"fingerprint":{"global":{"distinct-count":908,"nil%":0.0},"type":{"type/DateTime":{"earliest":"2007-08-15T08:26:59Z","latest":"2019-06-24T07:30:08Z"}}},"created_at":"2020-07-07T14:00:04.017604Z","base_type":"type/DateTimeWithLocalTZ","points_of_interest":null},{"description":"Date of modifying a record in oxono.accounting database.","database_type":"TIMESTAMP","semantic_type":"type/JoinTimestamp","table_id":457,"coercion_strategy":null,"name":"oxono_modified","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14"],"updated_at":"2021-05-04T16:00:47.645497Z","custom_position":0,"effective_type":"type/DateTimeWithLocalTZ","active":true,"nfc_path":null,"parent_id":null,"id":8730,"last_analyzed":"2020-07-07T14:00:06.776909Z","position":41,"visibility_type":"details-only","default_dimension_option":"2","target":null,"preview_display":true,"display_name":"Oxono Modified","database_position":41,"fingerprint":{"global":{"distinct-count":870,"nil%":0.0},"type":{"type/DateTime":{"earliest":"2017-11-16T14:50:08Z","latest":"2020-07-06T08:50:03Z"}}},"created_at":"2020-07-07T14:00:04.016446Z","base_type":"type/DateTimeWithLocalTZ","points_of_interest":null},{"description":"Date of creating a record in adgoal.accounting database.","database_type":"TIMESTAMP","semantic_type":"type/CreationTimestamp","table_id":457,"coercion_strategy":null,"name":"adgoal_date_created","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14"],"updated_at":"2021-05-04T16:00:47.646487Z","custom_position":0,"effective_type":"type/DateTimeWithLocalTZ","active":true,"nfc_path":null,"parent_id":null,"id":8550,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":42,"visibility_type":"details-only","default_dimension_option":"2","target":null,"preview_display":true,"display_name":"Adgoal Date Created","database_position":42,"fingerprint":{"global":{"distinct-count":87,"nil%":0.0043},"type":{"type/DateTime":{"earliest":"2019-01-01T00:30:14Z","latest":"2019-01-03T07:07:18Z"}}},"created_at":"2020-07-02T15:48:15.48077Z","base_type":"type/DateTimeWithLocalTZ","points_of_interest":null},{"description":null,"database_type":"TINYINT","semantic_type":"type/CancelationDate","table_id":457,"coercion_strategy":null,"name":"adgoal_internal_declined","fingerprint_version":4,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:00:47.647462Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8569,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":43,"visibility_type":"details-only","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Adgoal Internal Declined","database_position":43,"fingerprint":{"global":{"distinct-count":3,"nil%":0.0043},"type":{"type/Number":{"min":0.0,"q1":0.0,"q3":0.2964243597023664,"max":1.0,"sd":0.05918708292333062,"avg":0.003515114994476248}}},"created_at":"2020-07-02T15:48:15.496967Z","base_type":"type/Integer","points_of_interest":null}],"caveats":null,"segments":[{"description":"Actions attributed to the Adgoal project.","archived":false,"table_id":457,"definition":{"source-table":457,"filter":["=",["field",8548,null],"adgoal.de"]},"show_in_getting_started":false,"name":"Adgoal","caveats":null,"creator_id":8,"updated_at":"2020-07-02T19:41:43.180361Z","id":2,"created_at":"2020-07-02T19:41:43.180361Z","points_of_interest":null},{"description":"Actions attributed to the Tippfehler project.\nhttps://sites.google.com/a/admitad.com/wiki/otdelam/analitikam/adgoal/obsee-opisanie","archived":false,"table_id":457,"definition":{"source-table":457,"filter":["=",["field",8548,null],"Tippfehler"]},"show_in_getting_started":false,"name":"Tippfehler","caveats":null,"creator_id":8,"updated_at":"2020-07-02T19:40:18.554132Z","id":1,"created_at":"2020-07-02T19:40:18.554132Z","points_of_interest":null}],"dimension_options":{"9":{"name":"Day of Week","mbql":["field",null,{"temporal-unit":"day-of-week"}],"type":"type/DateTime"},"3":{"name":"Week","mbql":["field",null,{"temporal-unit":"week"}],"type":"type/DateTime"},"22":{"name":"Don't bin","mbql":null,"type":"type/Number"},"26":{"name":"Bin every 10 degrees","mbql":["field",null,{"binning":{"strategy":"bin-width","bin-width":10.0}}],"type":"type/Coordinate"},"4":{"name":"Month","mbql":["field",null,{"temporal-unit":"month"}],"type":"type/DateTime"},"8":{"name":"Hour of Day","mbql":["field",null,{"temporal-unit":"hour-of-day"}],"type":"type/DateTime"},"28":{"name":"Don't bin","mbql":null,"type":"type/Coordinate"},"14":{"name":"Quarter of Year","mbql":["field",null,{"temporal-unit":"quarter-of-year"}],"type":"type/DateTime"},"21":{"name":"100 bins","mbql":["field",null,{"binning":{"strategy":"num-bins","num-bins":100}}],"type":"type/Number"},"20":{"name":"50 bins","mbql":["field",null,{"binning":{"strategy":"num-bins","num-bins":50}}],"type":"type/Number"},"19":{"name":"10 bins","mbql":["field",null,{"binning":{"strategy":"num-bins","num-bins":10}}],"type":"type/Number"},"17":{"name":"Minute of Hour","mbql":["field",null,{"temporal-unit":"minute-of-hour"}],"type":"type/Time"},"25":{"name":"Bin every 1 degree","mbql":["field",null,{"binning":{"strategy":"bin-width","bin-width":1.0}}],"type":"type/Coordinate"},"15":{"name":"Minute","mbql":["field",null,{"temporal-unit":"minute"}],"type":"type/Time"},"7":{"name":"Minute of Hour","mbql":["field",null,{"temporal-unit":"minute-of-hour"}],"type":"type/DateTime"},"5":{"name":"Quarter","mbql":["field",null,{"temporal-unit":"quarter"}],"type":"type/DateTime"},"18":{"name":"Auto bin","mbql":["field",null,{"binning":{"strategy":"default"}}],"type":"type/Number"},"12":{"name":"Week of Year","mbql":["field",null,{"temporal-unit":"week-of-year"}],"type":"type/DateTime"},"13":{"name":"Month of Year","mbql":["field",null,{"temporal-unit":"month-of-year"}],"type":"type/DateTime"},"27":{"name":"Bin every 20 degrees","mbql":["field",null,{"binning":{"strategy":"bin-width","bin-width":20.0}}],"type":"type/Coordinate"},"24":{"name":"Bin every 0.1 degrees","mbql":["field",null,{"binning":{"strategy":"bin-width","bin-width":0.1}}],"type":"type/Coordinate"},"6":{"name":"Year","mbql":["field",null,{"temporal-unit":"year"}],"type":"type/DateTime"},"1":{"name":"Hour","mbql":["field",null,{"temporal-unit":"hour"}],"type":"type/DateTime"},"0":{"name":"Minute","mbql":["field",null,{"temporal-unit":"minute"}],"type":"type/DateTime"},"11":{"name":"Day of Year","mbql":["field",null,{"temporal-unit":"day-of-year"}],"type":"type/DateTime"},"2":{"name":"Day","mbql":["field",null,{"temporal-unit":"day"}],"type":"type/DateTime"},"16":{"name":"Hour","mbql":["field",null,{"temporal-unit":"hour"}],"type":"type/Time"},"10":{"name":"Day of Month","mbql":["field",null,{"temporal-unit":"day-of-month"}],"type":"type/DateTime"},"23":{"name":"Auto bin","mbql":["field",null,{"binning":{"strategy":"default"}}],"type":"type/Coordinate"}},"updated_at":"2021-05-04T16:00:57.798937Z","active":true,"id":457,"db_id":8,"visibility_type":null,"field_order":"database","initial_sync_status":"complete","display_name":"Actions (last 366 days)","metrics":[{"description":"System commission + publisher's fee. Any status.","archived":false,"table_id":457,"definition":{"source-table":457,"aggregation":[["sum",["field",8572,null]]]},"show_in_getting_started":false,"name":"Gross Revenue","caveats":null,"creator_id":8,"updated_at":"2021-05-04T16:05:38.037765Z","id":18,"how_is_this_calculated":null,"created_at":"2021-05-04T16:05:38.037765Z","points_of_interest":null},{"description":"Number of target actions of any status.","archived":false,"table_id":457,"definition":{"source-table":457,"aggregation":[["count"]]},"show_in_getting_started":false,"name":"Number of Actions","caveats":null,"creator_id":8,"updated_at":"2021-05-04T16:08:00.242907Z","id":19,"how_is_this_calculated":null,"created_at":"2021-05-04T16:08:00.242907Z","points_of_interest":null},{"description":"Sum of a publisher's fee for target actions. \n[Actual Revenue] * [Provision / 100]","archived":false,"table_id":457,"definition":{"source-table":457,"aggregation":[["aggregation-options",["sum",["/",["*",["field",8572,null],["field",8559,null]],100]],{"display-name":"Publisher's Fee"}]]},"show_in_getting_started":false,"name":"Publisher's Fee","caveats":null,"creator_id":8,"updated_at":"2021-05-04T16:13:44.160016Z","id":21,"how_is_this_calculated":null,"created_at":"2021-05-04T16:13:44.160016Z","points_of_interest":null},{"description":"Sum of AdGoal's commission from target actions of any status. In other words, it is money received as a net revenue after deduction of the publisher's fee.\n\nSum([Actual Revenue] * (1 - [Provision] / 100))","archived":false,"table_id":457,"definition":{"source-table":457,"aggregation":[["aggregation-options",["sum",["*",["field",8572,null],["-",1,["/",["field",8559,null],100]]]],{"display-name":"System Commission"}]]},"show_in_getting_started":false,"name":"System Сommission","caveats":null,"creator_id":8,"updated_at":"2021-05-04T16:18:09.576135Z","id":22,"how_is_this_calculated":null,"created_at":"2021-05-04T16:17:01.673185Z","points_of_interest":null}],"created_at":"2020-07-02T15:48:15.408387Z","points_of_interest":null}
  • api/table/498/query_metadata?include_sensitive_fields=true
{"description":null,"entity_type":"entity/GenericTable","schema":null,"db":{"description":null,"features":["basic-aggregations","standard-deviation-aggregations","expression-aggregations","foreign-keys","right-join","left-join","native-parameters","nested-queries","expressions","set-timezone","binning","inner-join","advanced-math-expressions"],"cache_field_values_schedule":"0 50 0 * * ? *","timezone":"UTC","auto_run_queries":true,"metadata_sync_schedule":"0 0 * * * ? *","name":"Summary","settings":null,"caveats":null,"creator_id":null,"is_full_sync":true,"updated_at":"2020-07-02T15:48:15.395735Z","cache_ttl":null,"details":null,"is_sample":false,"id":8,"is_on_demand":false,"options":null,"engine":"mysql","initial_sync_status":"complete","refingerprint":null,"created_at":"2020-07-02T15:48:15.335149Z","points_of_interest":null},"show_in_getting_started":false,"name":"clicks","fields":[{"description":null,"database_type":"DATE","semantic_type":"type/CreationTimestamp","table_id":498,"coercion_strategy":null,"name":"date","fingerprint_version":5,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14"],"updated_at":"2021-05-04T16:01:56.733969Z","custom_position":0,"effective_type":"type/Date","active":true,"nfc_path":null,"parent_id":null,"id":9093,"last_analyzed":"2021-04-28T12:00:01.432754Z","position":0,"visibility_type":"normal","default_dimension_option":"2","target":null,"preview_display":true,"display_name":"Date","database_position":0,"fingerprint":{"global":{"distinct-count":1,"nil%":0.0},"type":{"type/DateTime":{"earliest":"2019-04-20","latest":"2019-04-20"}}},"created_at":"2021-04-28T12:00:00.495469Z","base_type":"type/Date","points_of_interest":null},{"description":null,"database_type":"INT","semantic_type":"type/FK","table_id":498,"coercion_strategy":null,"name":"publisher_id","fingerprint_version":5,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":8658,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:01:56.73562Z","custom_position":1,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":9097,"last_analyzed":"2021-04-28T12:00:01.432754Z","position":1,"visibility_type":"normal","default_dimension_option":null,"target":{"description":"Publisher ID","database_type":"INT","semantic_type":"type/PK","table_id":461,"coercion_strategy":null,"name":"id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"updated_at":"2021-05-04T15:09:26.542258Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8658,"last_analyzed":"2020-07-02T19:09:49.435685Z","position":0,"visibility_type":"normal","preview_display":true,"display_name":"ID","database_position":0,"fingerprint":null,"created_at":"2020-07-02T19:09:45.642959Z","base_type":"type/Integer","points_of_interest":null},"preview_display":true,"display_name":"Publisher ID","database_position":2,"fingerprint":{"global":{"distinct-count":175,"nil%":0.0},"type":{"type/Number":{"min":100003.0,"q1":101675.52118449402,"q3":104848.62540285969,"max":106585.0,"sd":1724.6849683099972,"avg":103369.69719999998}}},"created_at":"2021-04-28T12:00:00.501069Z","base_type":"type/Integer","points_of_interest":null},{"description":null,"database_type":"INT","semantic_type":"type/FK","table_id":498,"coercion_strategy":null,"name":"ad_space_id","fingerprint_version":5,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":8679,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:01:56.73693Z","custom_position":2,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":9090,"last_analyzed":"2021-04-28T12:00:01.432754Z","position":2,"visibility_type":"normal","default_dimension_option":null,"target":{"description":"Ad space ID","database_type":"INT","semantic_type":"type/PK","table_id":462,"coercion_strategy":null,"name":"id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"updated_at":"2021-07-23T11:37:04.434417Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8679,"last_analyzed":"2020-07-02T20:39:55.342294Z","position":0,"visibility_type":"normal","preview_display":true,"display_name":"ID","database_position":0,"fingerprint":null,"created_at":"2020-07-02T20:39:50.745072Z","base_type":"type/Integer","points_of_interest":null},"preview_display":true,"display_name":"Ad Space ID","database_position":3,"fingerprint":{"global":{"distinct-count":582,"nil%":0.0},"type":{"type/Number":{"min":4.0,"q1":3220.056471323656,"q3":5830.0713154862415,"max":15015.0,"sd":3371.451564803075,"avg":5377.0734}}},"created_at":"2021-04-28T12:00:00.488771Z","base_type":"type/Integer","points_of_interest":null},{"description":null,"database_type":"INT","semantic_type":"type/FK","table_id":498,"coercion_strategy":null,"name":"advertiser_id","fingerprint_version":5,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":8618,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:01:56.738288Z","custom_position":3,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":9092,"last_analyzed":"2021-04-28T12:00:01.432754Z","position":3,"visibility_type":"normal","default_dimension_option":null,"target":{"description":null,"database_type":"INT","semantic_type":"type/PK","table_id":456,"coercion_strategy":null,"name":"id","fingerprint_version":4,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"updated_at":"2021-04-30T12:43:22.080002Z","custom_position":0,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":8618,"last_analyzed":"2020-07-02T15:48:55.778821Z","position":0,"visibility_type":"normal","preview_display":true,"display_name":"ID","database_position":0,"fingerprint":null,"created_at":"2020-07-02T15:48:15.730946Z","base_type":"type/Integer","points_of_interest":null},"preview_display":true,"display_name":"Advertiser ID","database_position":4,"fingerprint":{"global":{"distinct-count":4364,"nil%":0.0},"type":{"type/Number":{"min":0.0,"q1":104564.05407550166,"q3":152562.02591170635,"max":176284.0,"sd":38089.467081579554,"avg":123346.3643}}},"created_at":"2021-04-28T12:00:00.49387Z","base_type":"type/Integer","points_of_interest":null},{"description":"Smartlink parameter ID (if actions were done via SmartLink )","database_type":"INT","semantic_type":null,"table_id":498,"coercion_strategy":null,"name":"profil_id","fingerprint_version":5,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:01:56.739593Z","custom_position":4,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":9091,"last_analyzed":"2021-04-28T12:00:01.432754Z","position":4,"visibility_type":"details-only","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Profile ID","database_position":5,"fingerprint":{"global":{"distinct-count":574,"nil%":0.0},"type":{"type/Number":{"min":0.0,"q1":3.2707253821176,"q3":1046.3794922987324,"max":9480.0,"sd":2615.2294270561665,"avg":1332.1673}}},"created_at":"2021-04-28T12:00:00.491825Z","base_type":"type/Integer","points_of_interest":null},{"description":"ID to the short link (if it has been used).","database_type":"INT","semantic_type":null,"table_id":498,"coercion_strategy":null,"name":"profil_subid","fingerprint_version":5,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:01:56.740867Z","custom_position":5,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":9096,"last_analyzed":"2021-04-28T12:00:01.432754Z","position":5,"visibility_type":"details-only","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Profile SubID","database_position":6,"fingerprint":{"global":{"distinct-count":1,"nil%":0.0},"type":{"type/Number":{"min":0.0,"q1":0.0,"q3":0.0,"max":0.0,"sd":0.0,"avg":0.0}}},"created_at":"2021-04-28T12:00:00.499764Z","base_type":"type/Integer","points_of_interest":null},{"description":null,"database_type":"VARCHAR","semantic_type":"type/Category","table_id":498,"coercion_strategy":null,"name":"instrument","fingerprint_version":5,"has_field_values":"list","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":[],"updated_at":"2021-05-04T16:01:56.742157Z","custom_position":6,"effective_type":"type/Text","active":true,"nfc_path":null,"parent_id":null,"id":9095,"last_analyzed":"2021-04-28T12:00:01.432754Z","position":6,"visibility_type":"normal","default_dimension_option":null,"target":null,"preview_display":true,"display_name":"Instrument","database_position":1,"fingerprint":{"global":{"distinct-count":2,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":9.6751}}},"created_at":"2021-04-28T12:00:00.49836Z","base_type":"type/Text","points_of_interest":null},{"description":null,"database_type":"INT","semantic_type":"type/Quantity","table_id":498,"coercion_strategy":null,"name":"clicks_total","fingerprint_version":5,"has_field_values":"none","settings":null,"caveats":null,"fk_target_field_id":null,"dimensions":[],"dimension_options":["18","19","20","21","22"],"updated_at":"2021-05-04T16:01:56.743254Z","custom_position":7,"effective_type":"type/Integer","active":true,"nfc_path":null,"parent_id":null,"id":9094,"last_analyzed":"2021-04-28T12:00:01.432754Z","position":7,"visibility_type":"normal","default_dimension_option":"18","target":null,"preview_display":true,"display_name":"Clicks Total","database_position":7,"fingerprint":{"global":{"distinct-count":315,"nil%":0.0},"type":{"type/Number":{"min":1.0,"q1":3.395378637568321,"q3":18.043498691012807,"max":61920.0,"sd":836.6492209780796,"avg":38.2817}}},"created_at":"2021-04-28T12:00:00.496908Z","base_type":"type/Integer","points_of_interest":null}],"caveats":null,"segments":[],"dimension_options":{"9":{"name":"Day of Week","mbql":["field",null,{"temporal-unit":"day-of-week"}],"type":"type/DateTime"},"3":{"name":"Week","mbql":["field",null,{"temporal-unit":"week"}],"type":"type/DateTime"},"22":{"name":"Don't bin","mbql":null,"type":"type/Number"},"26":{"name":"Bin every 10 degrees","mbql":["field",null,{"binning":{"strategy":"bin-width","bin-width":10.0}}],"type":"type/Coordinate"},"4":{"name":"Month","mbql":["field",null,{"temporal-unit":"month"}],"type":"type/DateTime"},"8":{"name":"Hour of Day","mbql":["field",null,{"temporal-unit":"hour-of-day"}],"type":"type/DateTime"},"28":{"name":"Don't bin","mbql":null,"type":"type/Coordinate"},"14":{"name":"Quarter of Year","mbql":["field",null,{"temporal-unit":"quarter-of-year"}],"type":"type/DateTime"},"21":{"name":"100 bins","mbql":["field",null,{"binning":{"strategy":"num-bins","num-bins":100}}],"type":"type/Number"},"20":{"name":"50 bins","mbql":["field",null,{"binning":{"strategy":"num-bins","num-bins":50}}],"type":"type/Number"},"19":{"name":"10 bins","mbql":["field",null,{"binning":{"strategy":"num-bins","num-bins":10}}],"type":"type/Number"},"17":{"name":"Minute of Hour","mbql":["field",null,{"temporal-unit":"minute-of-hour"}],"type":"type/Time"},"25":{"name":"Bin every 1 degree","mbql":["field",null,{"binning":{"strategy":"bin-width","bin-width":1.0}}],"type":"type/Coordinate"},"15":{"name":"Minute","mbql":["field",null,{"temporal-unit":"minute"}],"type":"type/Time"},"7":{"name":"Minute of Hour","mbql":["field",null,{"temporal-unit":"minute-of-hour"}],"type":"type/DateTime"},"5":{"name":"Quarter","mbql":["field",null,{"temporal-unit":"quarter"}],"type":"type/DateTime"},"18":{"name":"Auto bin","mbql":["field",null,{"binning":{"strategy":"default"}}],"type":"type/Number"},"12":{"name":"Week of Year","mbql":["field",null,{"temporal-unit":"week-of-year"}],"type":"type/DateTime"},"13":{"name":"Month of Year","mbql":["field",null,{"temporal-unit":"month-of-year"}],"type":"type/DateTime"},"27":{"name":"Bin every 20 degrees","mbql":["field",null,{"binning":{"strategy":"bin-width","bin-width":20.0}}],"type":"type/Coordinate"},"24":{"name":"Bin every 0.1 degrees","mbql":["field",null,{"binning":{"strategy":"bin-width","bin-width":0.1}}],"type":"type/Coordinate"},"6":{"name":"Year","mbql":["field",null,{"temporal-unit":"year"}],"type":"type/DateTime"},"1":{"name":"Hour","mbql":["field",null,{"temporal-unit":"hour"}],"type":"type/DateTime"},"0":{"name":"Minute","mbql":["field",null,{"temporal-unit":"minute"}],"type":"type/DateTime"},"11":{"name":"Day of Year","mbql":["field",null,{"temporal-unit":"day-of-year"}],"type":"type/DateTime"},"2":{"name":"Day","mbql":["field",null,{"temporal-unit":"day"}],"type":"type/DateTime"},"16":{"name":"Hour","mbql":["field",null,{"temporal-unit":"hour"}],"type":"type/Time"},"10":{"name":"Day of Month","mbql":["field",null,{"temporal-unit":"day-of-month"}],"type":"type/DateTime"},"23":{"name":"Auto bin","mbql":["field",null,{"binning":{"strategy":"default"}}],"type":"type/Coordinate"}},"updated_at":"2021-05-04T16:02:14.228377Z","active":true,"id":498,"db_id":8,"visibility_type":null,"field_order":"custom","initial_sync_status":"complete","display_name":"Clicks (last 366 days)","metrics":[{"description":"Number of clicks for the selected period","archived":false,"table_id":498,"definition":{"source-table":498,"aggregation":[["sum",["field",9094,null]]]},"show_in_getting_started":false,"name":"Number of Clicks","caveats":null,"creator_id":8,"updated_at":"2021-05-04T16:09:43.841338Z","id":20,"how_is_this_calculated":null,"created_at":"2021-05-04T16:09:43.841338Z","points_of_interest":null}],"created_at":"2021-04-28T12:00:00.052581Z","points_of_interest":null}

I would like to remind you, that the problem occurs while joining the results of the saved questions to these tables.
And here are logs received after my attempt to join them:

[cd5d097c-8d52-4c55-868c-ada085efc051] 2022-06-24T11:08:03+03:00 INFO metabase.api.dataset Исходный запрос для текущего - карточка 390
[cd5d097c-8d52-4c55-868c-ada085efc051] 2022-06-24T11:08:03+03:00 ERROR metabase.query-processor.middleware.catch-exceptions Ошибка обработки запроса: null
{:database_id 8,
 :started_at #t "2022-06-24T08:08:03.455537Z[UTC]",
 :json_query
 {:type "query",
  :query
  {:source-table "card__390",
   :joins
   [{:fields "all",
     :source-table "card__391",
     :condition ["=" ["field" 8561 nil] ["field" 9090 {:join-alias "Question 391"}]],
     :alias "Question 391"}],
   :limit 10},
  :database 8,
  :parameters [],
  :middleware {:js-int-to-string? true, :add-default-userland-constraints? true}},
 :native nil,
 :status :failed,
 :class clojure.lang.ExceptionInfo,
 :stacktrace
 ["--> query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection$iter__20130__20134$fn__20135.invoke(impl.cljc:44)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:43)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:47)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection$iter__20130__20134$fn__20135.invoke(impl.cljc:44)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:43)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:47)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection$iter__20130__20134$fn__20135.invoke(impl.cljc:44)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:43)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field.invokeStatic(add_implicit_joins.clj:90)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field.invoke(add_implicit_joins.clj:78)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins_this_level.invokeStatic(add_implicit_joins.clj:204)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins_this_level.invoke(add_implicit_joins.clj:196)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins$fn__51795.invoke(add_implicit_joins.clj:219)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins.invokeStatic(add_implicit_joins.clj:214)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins.invoke(add_implicit_joins.clj:213)"
  "query_processor.middleware.add_implicit_joins$add_implicit_joins.invokeStatic(add_implicit_joins.clj:241)"
  "query_processor.middleware.add_implicit_joins$add_implicit_joins.invoke(add_implicit_joins.clj:228)"
  "query_processor$preprocess_STAR_$fn__52911.invoke(query_processor.clj:124)"
  "query_processor$preprocess_STAR_.invokeStatic(query_processor.clj:122)"
  "query_processor$preprocess_STAR_.invoke(query_processor.clj:117)"
  "query_processor$fn__52919$combined_pre_process__52920$combined_pre_process_STAR___52921.invoke(query_processor.clj:204)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__51367$fn__51372.invoke(resolve_database_and_driver.clj:35)"
  "driver$do_with_driver.invokeStatic(driver.clj:75)"
  "driver$do_with_driver.invoke(driver.clj:71)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__51367.invoke(resolve_database_and_driver.clj:34)"
  "query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__47472.invoke(fetch_source_query.clj:277)"
  "query_processor.middleware.store$initialize_store$fn__47660$fn__47661.invoke(store.clj:11)"
  "query_processor.store$do_with_store.invokeStatic(store.clj:44)"
  "query_processor.store$do_with_store.invoke(store.clj:38)"
  "query_processor.middleware.store$initialize_store$fn__47660.invoke(store.clj:10)"
  "query_processor.middleware.normalize_query$normalize$fn__51639.invoke(normalize_query.clj:22)"
  "query_processor.middleware.constraints$add_default_userland_constraints$fn__48729.invoke(constraints.clj:53)"
  "query_processor.middleware.process_userland_query$process_userland_query$fn__51578.invoke(process_userland_query.clj:145)"
  "query_processor.middleware.catch_exceptions$catch_exceptions$fn__51950.invoke(catch_exceptions.clj:162)"
  "query_processor.reducible$async_qp$qp_STAR___44199$thunk__44201.invoke(reducible.clj:100)"
  "query_processor.reducible$async_qp$qp_STAR___44199.invoke(reducible.clj:106)"
  "query_processor.reducible$async_qp$qp_STAR___44199.invoke(reducible.clj:91)"
  "query_processor.reducible$sync_qp$qp_STAR___44210.doInvoke(reducible.clj:126)"
  "query_processor$process_userland_query.invokeStatic(query_processor.clj:326)"
  "query_processor$process_userland_query.doInvoke(query_processor.clj:322)"
  "query_processor$fn__52966$process_query_and_save_execution_BANG___52975$fn__52978.invoke(query_processor.clj:337)"
  "query_processor$fn__52966$process_query_and_save_execution_BANG___52975.invoke(query_processor.clj:330)"
  "query_processor$fn__53010$process_query_and_save_with_max_results_constraints_BANG___53019$fn__53022.invoke(query_processor.clj:349)"
  "query_processor$fn__53010$process_query_and_save_with_max_results_constraints_BANG___53019.invoke(query_processor.clj:342)"
  "api.dataset$run_query_async$fn__66700.invoke(dataset.clj:68)"
  "query_processor.streaming$streaming_response_STAR_$fn__39322$fn__39323.invoke(streaming.clj:162)"
  "query_processor.streaming$streaming_response_STAR_$fn__39322.invoke(streaming.clj:161)"
  "async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:65)"
  "async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:63)"
  "async.streaming_response$do_f_async$task__18948.invoke(streaming_response.clj:84)"],
 :card_id 390,
 :context :ad-hoc,
 :error "Cannot find matching FK Table ID for FK Field null",
 :row_count 0,
 :running_time 0,
 :preprocessed nil,
 :ex-data
 {:resolving [:field 8668 {:source-field 9090}],
  :candidates {8579 "advertisers__via__advertiser_id", 8561 "ad_spaces__via__ad_space_id"}},
 :data {:rows [], :cols []}}

P.S. I changed language of my account, but log records are still partially on Russian

@tritatuy Okay, so we need to look at question 390 and 391, since the problem only occurs with those questions and not directly with the tables, if I understand what you are writing.

You can get the question metadata by going to the URL /api/card/390 and /api/card/391

From what I can tell, you have a Foreign Key reference on ad_space_id in table 457 and 498, which are referencing table 457, so it looks like it is an invalid reference. Please make sure that the Foreign Key reference is actually correct, otherwise temporarily try setting the Field Type = "No semantic value".

@flamber the questions metadata are:

  • /api/card/390
{"description":null,"archived":false,"collection_position":null,"table_id":457,"result_metadata":[{"description":"Link to an ad space.","semantic_type":"type/URL","coercion_strategy":null,"name":"url","settings":null,"field_ref":["field",8668,{"source-field":8561}],"effective_type":"type/Text","id":8668,"display_name":"Ad Space → URL","fingerprint":{"global":{"distinct-count":9339,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.9884,"percent-email":0.0,"percent-state":0.0,"average-length":27.2016}}},"base_type":"type/Text"},{"description":"ID of a publisher in Adgoal database.","semantic_type":"type/FK","coercion_strategy":null,"name":"publisher_id","settings":null,"field_ref":["field",8573,null],"effective_type":"type/Integer","id":8573,"display_name":"Publisher ID","fingerprint":{"global":{"distinct-count":123,"nil%":0.0043},"type":{"type/Number":{"min":100012.0,"q1":102128.89475388076,"q3":106039.65065741335,"max":106381.0,"sd":1796.2107416014205,"avg":104054.69930702019}}},"base_type":"type/Integer"},{"description":"ID of a publisher's ad space where a customer came from.","semantic_type":"type/FK","coercion_strategy":null,"name":"ad_space_id","settings":null,"field_ref":["field",8561,null],"effective_type":"type/Integer","id":8561,"display_name":"Ad Space ID","fingerprint":{"global":{"distinct-count":184,"nil%":0.0043},"type":{"type/Number":{"min":0.0,"q1":3333.323387695896,"q3":11903.791889464504,"max":13876.0,"sd":3929.6305094950926,"avg":7001.015868233404}}},"base_type":"type/Integer"},{"description":"Name of an advertiser.","semantic_type":"type/Name","coercion_strategy":null,"name":"name","settings":null,"field_ref":["field",8609,{"source-field":8579}],"effective_type":"type/Text","id":8609,"display_name":"Advertiser → Name","fingerprint":{"global":{"distinct-count":9998,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":13.981}}},"base_type":"type/Text"},{"display_name":"Gross Revenue","semantic_type":"type/Income","settings":null,"field_ref":["aggregation",0],"name":"sum","base_type":"type/Float","effective_type":"type/Float","fingerprint":{"global":{"distinct-count":14,"nil%":0.0},"type":{"type/Number":{"min":10.87,"q1":20.86302091698486,"q3":322.1175,"max":10840.7,"sd":2775.0964872359887,"avg":923.0713333333333}}}},{"display_name":"Number of Actions","semantic_type":"type/Quantity","field_ref":["aggregation",1],"name":"count","base_type":"type/BigInteger","effective_type":"type/BigInteger","fingerprint":{"global":{"distinct-count":9,"nil%":0.0},"type":{"type/Number":{"min":1.0,"q1":1.5,"q3":19.067971810589327,"max":672.0,"sd":172.02261756054332,"avg":57.266666666666666}}}}],"creator":{"email":"y.sadova@admitad.com","first_name":"Yuliia","last_login":"2022-06-21T08:12:14.625085Z","is_qbnewb":false,"is_superuser":false,"id":27,"last_name":"Sadova","date_joined":"2020-07-13T09:04:22.430223Z","common_name":"Yuliia Sadova"},"can_write":true,"database_id":8,"enable_embedding":false,"collection_id":150,"query_type":"query","name":"Voxi gross","last_query_start":"2022-06-27T12:59:25.533565Z","dashboard_count":0,"average_query_time":113.6153846153846154,"creator_id":27,"moderation_reviews":[],"updated_at":"2022-06-27T12:59:25.623485Z","made_public_by_id":null,"embedding_params":null,"cache_ttl":null,"dataset_query":{"database":8,"query":{"source-table":457,"filter":["and",["=",["field",8579,null],161886],["between",["field",8582,null],"2022-05-19","2022-05-31"],["!=",["field",8561,null],0]],"aggregation":[["metric",18],["metric",19]],"breakout":[["field",8668,{"source-field":8561}],["field",8573,null],["field",8561,null],["field",8609,{"source-field":8579}]]},"type":"query"},"id":390,"display":"table","last-edit-info":{"id":27,"email":"y.sadova@admitad.com","first_name":"Yuliia","last_name":"Sadova","timestamp":"2022-06-22T08:11:01.00785Z"},"visualization_settings":{"table.columns":[{"name":"url","fieldRef":["field",8668,{"source-field":8561}],"enabled":true},{"name":"publisher_id","fieldRef":["field",8573,null],"enabled":true},{"name":"ad_space_id","fieldRef":["field",8561,null],"enabled":true},{"name":"sum","fieldRef":["aggregation",0],"enabled":true},{"name":"name","fieldRef":["field",8609,{"source-field":8579}],"enabled":true},{"name":"count","field_ref":["aggregation",1,null],"enabled":true}],"table.pivot_column":"status","table.cell_column":"actual_revenue"},"collection":{"authority_level":null,"description":null,"archived":false,"slug":"gross_clicks","color":"#509EE3","name":"gross&clicks","personal_owner_id":null,"id":150,"location":"/27/","namespace":null},"dataset":false,"created_at":"2022-06-22T06:40:18.752142Z","public_uuid":null}
  • /api/card/391
{"description":null,"archived":false,"collection_position":null,"table_id":498,"result_metadata":[{"description":"Link to an ad space.","semantic_type":"type/URL","coercion_strategy":null,"name":"url","settings":null,"field_ref":["field",8668,{"source-field":9090}],"effective_type":"type/Text","id":8668,"display_name":"Ad Space → URL","fingerprint":{"global":{"distinct-count":9339,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.9884,"percent-email":0.0,"percent-state":0.0,"average-length":27.2016}}},"base_type":"type/Text"},{"description":null,"semantic_type":"type/FK","coercion_strategy":null,"name":"publisher_id","settings":null,"field_ref":["field",9097,null],"effective_type":"type/Integer","id":9097,"display_name":"Publisher ID","fingerprint":{"global":{"distinct-count":175,"nil%":0.0},"type":{"type/Number":{"min":100003.0,"q1":101675.52118449402,"q3":104848.62540285969,"max":106585.0,"sd":1724.6849683099972,"avg":103369.69719999998}}},"base_type":"type/Integer"},{"description":null,"semantic_type":"type/FK","coercion_strategy":null,"name":"ad_space_id","settings":null,"field_ref":["field",9090,null],"effective_type":"type/Integer","id":9090,"display_name":"Ad Space ID","fingerprint":{"global":{"distinct-count":582,"nil%":0.0},"type":{"type/Number":{"min":4.0,"q1":3220.056471323656,"q3":5830.0713154862415,"max":15015.0,"sd":3371.451564803075,"avg":5377.0734}}},"base_type":"type/Integer"},{"description":"Name of an advertiser.","semantic_type":"type/Name","coercion_strategy":null,"name":"name","settings":null,"field_ref":["field",8609,{"source-field":9092}],"effective_type":"type/Text","id":8609,"display_name":"Advertiser → Name","fingerprint":{"global":{"distinct-count":9998,"nil%":0.0},"type":{"type/Text":{"percent-json":0.0,"percent-url":0.0,"percent-email":0.0,"percent-state":0.0,"average-length":13.981}}},"base_type":"type/Text"},{"display_name":"Number of Clicks","semantic_type":"type/Quantity","settings":null,"field_ref":["aggregation",0],"name":"sum","base_type":"type/Decimal","effective_type":"type/Decimal","fingerprint":{"global":{"distinct-count":16,"nil%":0.0},"type":{"type/Number":{"min":1.0,"q1":1.3406038420194415,"q3":137.5,"max":63226.0,"sd":12357.80472919031,"avg":3681.21875}}}}],"creator":{"email":"y.sadova@admitad.com","first_name":"Yuliia","last_login":"2022-06-21T08:12:14.625085Z","is_qbnewb":false,"is_superuser":false,"id":27,"last_name":"Sadova","date_joined":"2020-07-13T09:04:22.430223Z","common_name":"Yuliia Sadova"},"can_write":true,"database_id":8,"enable_embedding":false,"collection_id":150,"query_type":"query","name":"Voxi clicks","last_query_start":"2022-06-27T13:19:04.019451Z","dashboard_count":0,"average_query_time":83.5714285714285714,"creator_id":27,"moderation_reviews":[],"updated_at":"2022-06-27T13:19:04.109583Z","made_public_by_id":null,"embedding_params":null,"cache_ttl":null,"dataset_query":{"type":"query","query":{"source-table":498,"filter":["and",["=",["field",9092,null],161886],["between",["field",9093,null],"2022-05-19","2022-05-31"],["!=",["field",9090,null],0]],"aggregation":[["metric",20]],"breakout":[["field",8668,{"source-field":9090}],["field",9097,null],["field",9090,null],["field",8609,{"source-field":9092}]]},"database":8},"id":391,"display":"table","last-edit-info":{"id":27,"email":"y.sadova@admitad.com","first_name":"Yuliia","last_name":"Sadova","timestamp":"2022-06-22T08:33:23.589954Z"},"visualization_settings":{"table.columns":[{"name":"url","fieldRef":["field",8668,{"source-field":9090}],"enabled":true},{"name":"publisher_id","fieldRef":["field",9097,null],"enabled":true},{"name":"ad_space_id","fieldRef":["field",9090,null],"enabled":true},{"name":"sum","fieldRef":["aggregation",0],"enabled":true},{"name":"name","fieldRef":["field",8609,{"source-field":9092}],"enabled":true},{"name":"publisher_id_2","field_ref":["field",8573,{"join-alias":"Question 273"}],"enabled":true},{"name":"sum_2","field_ref":["field","sum",{"base-type":"type/Float","join-alias":"Question 273"}],"enabled":true}],"table.pivot_column":"name","table.cell_column":"sum"},"collection":{"authority_level":null,"description":null,"archived":false,"slug":"gross_clicks","color":"#509EE3","name":"gross&clicks","personal_owner_id":null,"id":150,"location":"/27/","namespace":null},"dataset":false,"created_at":"2022-06-22T06:41:36.015609Z","public_uuid":null}

you have a Foreign Key reference on ad_space_id in table 457 and 498, which are referencing table 457, so it looks like it is an invalid reference.

I'm not sure that I understand. At the responses I sent you both foreign keys of these tables have reference on table 462 (it is called Ad Spaces and it's the table we need), not on 457.
By the way when I'm joining parent tables of these questions (tables 457 and 498) using the same FK ad_space_id, it works good.

@tritatuy Yeah, I meant table 462. Try removing all your FK references from 457 and 498, since the problem must be somewhere there.

Thanks, I'm trying, but it also doesn't work. Here are the logs:

[cd5d097c-8d52-4c55-868c-ada085efc051] 2022-06-27T18:49:33+03:00 ERROR metabase.query-processor.middleware.catch-exceptions Ошибка обработки запроса: null
{:database_id 8,
 :started_at #t "2022-06-27T15:49:33.766821Z[UTC]",
 :json_query
 {:type "query",
  :query
  {:source-table "card__391",
   :joins
   [{:fields "all",
     :source-table "card__390",
     :condition ["=" ["field" 9090 nil] ["field" 8561 {:join-alias "Question 390"}]],
     :alias "Question 390"}],
   :limit 10},
  :database 8,
  :parameters [],
  :middleware {:js-int-to-string? true, :add-default-userland-constraints? true}},
 :native nil,
 :status :failed,
 :class clojure.lang.ExceptionInfo,
 :stacktrace
 ["--> query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:47)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection$iter__20130__20134$fn__20135.invoke(impl.cljc:44)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:43)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field.invokeStatic(add_implicit_joins.clj:90)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field.invoke(add_implicit_joins.clj:78)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins_this_level.invokeStatic(add_implicit_joins.clj:204)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins_this_level.invoke(add_implicit_joins.clj:196)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins$fn__51795.invoke(add_implicit_joins.clj:219)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins.invokeStatic(add_implicit_joins.clj:214)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins.invoke(add_implicit_joins.clj:213)"
  "query_processor.middleware.add_implicit_joins$add_implicit_joins.invokeStatic(add_implicit_joins.clj:241)"
  "query_processor.middleware.add_implicit_joins$add_implicit_joins.invoke(add_implicit_joins.clj:228)"
  "query_processor$preprocess_STAR_$fn__52911.invoke(query_processor.clj:124)"
  "query_processor$preprocess_STAR_.invokeStatic(query_processor.clj:122)"
  "query_processor$preprocess_STAR_.invoke(query_processor.clj:117)"
  "query_processor$fn__52919$combined_pre_process__52920$combined_pre_process_STAR___52921.invoke(query_processor.clj:204)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__51367$fn__51372.invoke(resolve_database_and_driver.clj:35)"
  "driver$do_with_driver.invokeStatic(driver.clj:75)"
  "driver$do_with_driver.invoke(driver.clj:71)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__51367.invoke(resolve_database_and_driver.clj:34)"
  "query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__47472.invoke(fetch_source_query.clj:277)"
  "query_processor.middleware.store$initialize_store$fn__47660$fn__47661.invoke(store.clj:11)"
  "query_processor.store$do_with_store.invokeStatic(store.clj:44)"
  "query_processor.store$do_with_store.invoke(store.clj:38)"
  "query_processor.middleware.store$initialize_store$fn__47660.invoke(store.clj:10)"
  "query_processor.middleware.normalize_query$normalize$fn__51639.invoke(normalize_query.clj:22)"
  "query_processor.middleware.constraints$add_default_userland_constraints$fn__48729.invoke(constraints.clj:53)"
  "query_processor.middleware.process_userland_query$process_userland_query$fn__51578.invoke(process_userland_query.clj:145)"
  "query_processor.middleware.catch_exceptions$catch_exceptions$fn__51950.invoke(catch_exceptions.clj:162)"
  "query_processor.reducible$async_qp$qp_STAR___44199$thunk__44201.invoke(reducible.clj:100)"
  "query_processor.reducible$async_qp$qp_STAR___44199.invoke(reducible.clj:106)"
  "query_processor.reducible$async_qp$qp_STAR___44199.invoke(reducible.clj:91)"
  "query_processor.reducible$sync_qp$qp_STAR___44210.doInvoke(reducible.clj:126)"
  "query_processor$process_userland_query.invokeStatic(query_processor.clj:326)"
  "query_processor$process_userland_query.doInvoke(query_processor.clj:322)"
  "query_processor$fn__52966$process_query_and_save_execution_BANG___52975$fn__52978.invoke(query_processor.clj:337)"
  "query_processor$fn__52966$process_query_and_save_execution_BANG___52975.invoke(query_processor.clj:330)"
  "query_processor$fn__53010$process_query_and_save_with_max_results_constraints_BANG___53019$fn__53022.invoke(query_processor.clj:349)"
  "query_processor$fn__53010$process_query_and_save_with_max_results_constraints_BANG___53019.invoke(query_processor.clj:342)"
  "api.dataset$run_query_async$fn__66700.invoke(dataset.clj:68)"
  "query_processor.streaming$streaming_response_STAR_$fn__39322$fn__39323.invoke(streaming.clj:162)"
  "query_processor.streaming$streaming_response_STAR_$fn__39322.invoke(streaming.clj:161)"
  "async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:65)"
  "async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:63)"
  "async.streaming_response$do_f_async$task__18948.invoke(streaming_response.clj:84)"],
 :card_id 391,
 :context :ad-hoc,
 :error "Cannot find matching FK Table ID for FK Field null",
 :row_count 0,
 :running_time 0,
 :preprocessed nil,
 :ex-data {:resolving [:field 8668 {:source-field 8561}], :candidates {8579 "advertisers__via__advertiser_id"}},
 :data {:rows [], :cols []}}

@tritatuy You'll likely need to create new questions, since they already had the references, which caused the invalid queries.

Hi!
I have removed references from 457 and 498 tables which led to table 462. Then I've created new saved questions (442 and 443) based on tables 457 and 498. And after that I've created a new question based on questions 442 and 443.
As a result it also returns the error
Cannot find matching FK Table ID for FK Field null

log:

[cd5d097c-8d52-4c55-868c-ada085efc051] 2022-06-30T12:38:27+03:00 ERROR metabase.query-processor.middleware.catch-exceptions Ошибка обработки запроса: null
{:database_id 8,
 :started_at #t "2022-06-30T09:38:27.690069Z[UTC]",
 :json_query
 {:type "query",
  :query
  {:source-table "card__442",
   :joins
   [{:fields "all",
     :source-table "card__443",
     :condition ["=" ["field" 9090 nil] ["field" 8561 {:join-alias "Question 443"}]],
     :alias "Question 443"}],
   :limit 10},
  :database 8,
  :parameters [],
  :middleware {:js-int-to-string? true, :add-default-userland-constraints? true}},
 :native nil,
 :status :failed,
 :class clojure.lang.ExceptionInfo,
 :stacktrace
 ["--> query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection$iter__20130__20134$fn__20135.invoke(impl.cljc:44)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:43)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:47)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection$iter__20130__20134$fn__20135.invoke(impl.cljc:44)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:43)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:47)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "mbql.util.match.impl$replace_in_collection$iter__20130__20134$fn__20135.invoke(impl.cljc:44)"
  "mbql.util.match.impl$replace_in_collection.invokeStatic(impl.cljc:43)"
  "mbql.util.match.impl$replace_in_collection.invoke(impl.cljc:38)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field$replace_51714__51715.invoke(add_implicit_joins.clj:90)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field.invokeStatic(add_implicit_joins.clj:90)"
  "query_processor.middleware.add_implicit_joins$add_join_alias_to_fields_with_source_field.invoke(add_implicit_joins.clj:78)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins_this_level.invokeStatic(add_implicit_joins.clj:204)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins_this_level.invoke(add_implicit_joins.clj:196)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins$fn__51795.invoke(add_implicit_joins.clj:219)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins.invokeStatic(add_implicit_joins.clj:214)"
  "query_processor.middleware.add_implicit_joins$resolve_implicit_joins.invoke(add_implicit_joins.clj:213)"
  "query_processor.middleware.add_implicit_joins$add_implicit_joins.invokeStatic(add_implicit_joins.clj:241)"
  "query_processor.middleware.add_implicit_joins$add_implicit_joins.invoke(add_implicit_joins.clj:228)"
  "query_processor$preprocess_STAR_$fn__52911.invoke(query_processor.clj:124)"
  "query_processor$preprocess_STAR_.invokeStatic(query_processor.clj:122)"
  "query_processor$preprocess_STAR_.invoke(query_processor.clj:117)"
  "query_processor$fn__52919$combined_pre_process__52920$combined_pre_process_STAR___52921.invoke(query_processor.clj:204)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__51367$fn__51372.invoke(resolve_database_and_driver.clj:35)"
  "driver$do_with_driver.invokeStatic(driver.clj:75)"
  "driver$do_with_driver.invoke(driver.clj:71)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__51367.invoke(resolve_database_and_driver.clj:34)"
  "query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__47472.invoke(fetch_source_query.clj:277)"
  "query_processor.middleware.store$initialize_store$fn__47660$fn__47661.invoke(store.clj:11)"
  "query_processor.store$do_with_store.invokeStatic(store.clj:44)"
  "query_processor.store$do_with_store.invoke(store.clj:38)"
  "query_processor.middleware.store$initialize_store$fn__47660.invoke(store.clj:10)"
  "query_processor.middleware.normalize_query$normalize$fn__51639.invoke(normalize_query.clj:22)"
  "query_processor.middleware.constraints$add_default_userland_constraints$fn__48729.invoke(constraints.clj:53)"
  "query_processor.middleware.process_userland_query$process_userland_query$fn__51578.invoke(process_userland_query.clj:145)"
  "query_processor.middleware.catch_exceptions$catch_exceptions$fn__51950.invoke(catch_exceptions.clj:162)"
  "query_processor.reducible$async_qp$qp_STAR___44199$thunk__44201.invoke(reducible.clj:100)"
  "query_processor.reducible$async_qp$qp_STAR___44199.invoke(reducible.clj:106)"
  "query_processor.reducible$async_qp$qp_STAR___44199.invoke(reducible.clj:91)"
  "query_processor.reducible$sync_qp$qp_STAR___44210.doInvoke(reducible.clj:126)"
  "query_processor$process_userland_query.invokeStatic(query_processor.clj:326)"
  "query_processor$process_userland_query.doInvoke(query_processor.clj:322)"
  "query_processor$fn__52966$process_query_and_save_execution_BANG___52975$fn__52978.invoke(query_processor.clj:337)"
  "query_processor$fn__52966$process_query_and_save_execution_BANG___52975.invoke(query_processor.clj:330)"
  "query_processor$fn__53010$process_query_and_save_with_max_results_constraints_BANG___53019$fn__53022.invoke(query_processor.clj:349)"
  "query_processor$fn__53010$process_query_and_save_with_max_results_constraints_BANG___53019.invoke(query_processor.clj:342)"
  "api.dataset$run_query_async$fn__66700.invoke(dataset.clj:68)"
  "query_processor.streaming$streaming_response_STAR_$fn__39322$fn__39323.invoke(streaming.clj:162)"
  "query_processor.streaming$streaming_response_STAR_$fn__39322.invoke(streaming.clj:161)"
  "async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:65)"
  "async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:63)"
  "async.streaming_response$do_f_async$task__18948.invoke(streaming_response.clj:84)"],
 :card_id 442,
 :context :ad-hoc,
 :error "Cannot find matching FK Table ID for FK Field null",
 :row_count 0,
 :running_time 0,
 :preprocessed nil,
 :ex-data {:resolving [:field 8609 {:source-field 8579}], :candidates {9092 "advertisers__via__advertiser_id"}},
 :data {:rows [], :cols []}}

@tritatuy Okay, I don't know what is wrong, and I cannot reproduce. Use SQL instead, or create Views on your database instead of using Saved Questions as source.

I've mentioned here a case with the sample data everyone can replicate No-code joins with error when the same field used - #2 by flamber

Issue created here Joining Saved Questions with the same implicit/explicit grouped field causes errors · Issue #26631 · metabase/metabase · GitHub - upvote by clicking :+1: