From adb3ebbba3a3a7aaafca9e660573a0869d6453c0 Mon Sep 17 00:00:00 2001 From: AAfghahi <48933336+AAfghahi@users.noreply.github.com> Date: Wed, 11 Aug 2021 11:59:59 -0400 Subject: [PATCH] feat: Changing Dataset names (#16199) * added google alert * changing Dataset Names (cherry picked from commit 6c304b83a9343e99e95d8182a943f437332c9af0) --- .../docs/Creating Charts and Dashboards/index.mdx | 2 +- .../ExploreAdditionalActionsMenu.test.tsx | 2 +- .../PropertiesModal/PropertiesModal.test.tsx | 2 +- superset/examples/bart_lines.py | 2 +- .../configs/datasets/examples/FCC_2018_Survey.yaml | 2 +- .../configs/datasets/examples/channel_members.yaml | 2 +- .../examples/configs/datasets/examples/channels.yaml | 2 +- .../configs/datasets/examples/cleaned_sales_data.yaml | 2 +- .../configs/datasets/examples/covid_vaccines.yaml | 2 +- .../configs/datasets/examples/exported_stats.yaml | 2 +- .../configs/datasets/examples/members_channels_2.yaml | 4 ++-- .../examples/configs/datasets/examples/messages.yaml | 2 +- .../configs/datasets/examples/messages_channels.yaml | 4 ++-- .../configs/datasets/examples/new_members_daily.yaml | 4 ++-- .../examples/configs/datasets/examples/threads.yaml | 2 +- superset/examples/deck.py | 10 ++++++---- superset/examples/flights.py | 2 +- superset/examples/long_lat.py | 2 +- superset/examples/sf_population_polygons.py | 2 +- 19 files changed, 27 insertions(+), 25 deletions(-) diff --git a/docs/src/pages/docs/Creating Charts and Dashboards/index.mdx b/docs/src/pages/docs/Creating Charts and Dashboards/index.mdx index ae7dd1da3b556..0654196e8388b 100644 --- a/docs/src/pages/docs/Creating Charts and Dashboards/index.mdx +++ b/docs/src/pages/docs/Creating Charts and Dashboards/index.mdx @@ -66,7 +66,7 @@ Navigate to **Data ‣ Datasets** and select the **+ Dataset** button in the top A modal window should pop up in front of you. Select your **Database**, **Schema**, and **Table** using the drop downs that appear. In the following example, -we register the **cleaned_sales_data** table from the **examples** database. +we register the **Vehicle Sales** table from the **examples** database. diff --git a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.tsx b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.tsx index 47077f61c8174..a5c49229af7e1 100644 --- a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.tsx +++ b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.tsx @@ -48,7 +48,7 @@ const createProps = () => ({ cache_timeout: null, changed_on: '2021-03-19T16:30:56.750230', changed_on_humanized: '3 days ago', - datasource: 'FCC 2018 Survey', + datasource: 'FCC Survey Results', description: null, description_markeddown: '', edit_url: '/chart/edit/318', diff --git a/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx b/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx index f1d076845525e..1d5eaf377010d 100644 --- a/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx @@ -29,7 +29,7 @@ const createProps = () => ({ cache_timeout: null, changed_on: '2021-03-19T16:30:56.750230', changed_on_humanized: '7 days ago', - datasource: 'FCC 2018 Survey', + datasource: 'FCC Survey Results', description: null, description_markeddown: '', edit_url: '/chart/edit/318', diff --git a/superset/examples/bart_lines.py b/superset/examples/bart_lines.py index 8cdb8a3bdee8b..0849a5e477890 100644 --- a/superset/examples/bart_lines.py +++ b/superset/examples/bart_lines.py @@ -27,7 +27,7 @@ def load_bart_lines(only_metadata: bool = False, force: bool = False) -> None: - tbl_name = "bart_lines" + tbl_name = "San Franciso BART Lines" database = get_example_database() table_exists = database.has_table_by_name(tbl_name) diff --git a/superset/examples/configs/datasets/examples/FCC_2018_Survey.yaml b/superset/examples/configs/datasets/examples/FCC_2018_Survey.yaml index 26890b5ebbbce..b42b1d1ed6a45 100644 --- a/superset/examples/configs/datasets/examples/FCC_2018_Survey.yaml +++ b/superset/examples/configs/datasets/examples/FCC_2018_Survey.yaml @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: FCC 2018 Survey +table_name: FCC Survey Results main_dttm_col: null description: null default_endpoint: null diff --git a/superset/examples/configs/datasets/examples/channel_members.yaml b/superset/examples/configs/datasets/examples/channel_members.yaml index 7bdf0836c456d..1f992745ba3ef 100644 --- a/superset/examples/configs/datasets/examples/channel_members.yaml +++ b/superset/examples/configs/datasets/examples/channel_members.yaml @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: channel_members +table_name: Slack Channels and Members main_dttm_col: null description: null default_endpoint: null diff --git a/superset/examples/configs/datasets/examples/channels.yaml b/superset/examples/configs/datasets/examples/channels.yaml index 92ce51d210fc4..827bff4ef6050 100644 --- a/superset/examples/configs/datasets/examples/channels.yaml +++ b/superset/examples/configs/datasets/examples/channels.yaml @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: channels +table_name: Slack Channels main_dttm_col: created description: null default_endpoint: null diff --git a/superset/examples/configs/datasets/examples/cleaned_sales_data.yaml b/superset/examples/configs/datasets/examples/cleaned_sales_data.yaml index 8832cc529d0f7..03188a4966d96 100644 --- a/superset/examples/configs/datasets/examples/cleaned_sales_data.yaml +++ b/superset/examples/configs/datasets/examples/cleaned_sales_data.yaml @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: cleaned_sales_data +table_name: Vehicle Sales main_dttm_col: OrderDate description: null default_endpoint: null diff --git a/superset/examples/configs/datasets/examples/covid_vaccines.yaml b/superset/examples/configs/datasets/examples/covid_vaccines.yaml index 9d1431c2db739..383d869dc4eed 100644 --- a/superset/examples/configs/datasets/examples/covid_vaccines.yaml +++ b/superset/examples/configs/datasets/examples/covid_vaccines.yaml @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: covid_vaccines +table_name: COVID Vaccines main_dttm_col: null description: null default_endpoint: null diff --git a/superset/examples/configs/datasets/examples/exported_stats.yaml b/superset/examples/configs/datasets/examples/exported_stats.yaml index 28cd18ba73bf3..1c8e8dc9e03e2 100644 --- a/superset/examples/configs/datasets/examples/exported_stats.yaml +++ b/superset/examples/configs/datasets/examples/exported_stats.yaml @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: exported_stats +table_name: Slack Exported Metrics main_dttm_col: Date description: null default_endpoint: null diff --git a/superset/examples/configs/datasets/examples/members_channels_2.yaml b/superset/examples/configs/datasets/examples/members_channels_2.yaml index a8ce28350c8d5..66abca80bd068 100644 --- a/superset/examples/configs/datasets/examples/members_channels_2.yaml +++ b/superset/examples/configs/datasets/examples/members_channels_2.yaml @@ -14,14 +14,14 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: members_channels_2 +table_name: Slack Members and Channels main_dttm_col: null description: null default_endpoint: null offset: 0 cache_timeout: null schema: null -sql: SELECT c.name AS channel_name, u.name AS member_name FROM channel_members cm +sql: SELECT c.name AS channel_name, u.name AS member_name FROM "Slack Channels and Members" cm JOIN channels c ON cm.channel_id = c.id JOIN users u ON cm.user_id = u.id params: null template_params: null diff --git a/superset/examples/configs/datasets/examples/messages.yaml b/superset/examples/configs/datasets/examples/messages.yaml index 27ca367009b8b..76c608251a500 100644 --- a/superset/examples/configs/datasets/examples/messages.yaml +++ b/superset/examples/configs/datasets/examples/messages.yaml @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: messages +table_name: Slack Messages main_dttm_col: bot_profile__updated description: null default_endpoint: null diff --git a/superset/examples/configs/datasets/examples/messages_channels.yaml b/superset/examples/configs/datasets/examples/messages_channels.yaml index e93a3efeebaac..5793bd77bcc09 100644 --- a/superset/examples/configs/datasets/examples/messages_channels.yaml +++ b/superset/examples/configs/datasets/examples/messages_channels.yaml @@ -14,14 +14,14 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: messages_channels +table_name: Slack Messages and Channels main_dttm_col: null description: null default_endpoint: null offset: 0 cache_timeout: null schema: null -sql: SELECT m.ts, c.name, m.text FROM messages m JOIN channels c ON m.channel_id = +sql: SELECT m.ts, c.name, m.text FROM messages m JOIN "Slack Messages" c ON m.channel_id = c.id params: null template_params: null diff --git a/superset/examples/configs/datasets/examples/new_members_daily.yaml b/superset/examples/configs/datasets/examples/new_members_daily.yaml index 3a7996dd46a1c..19d06a22361ad 100644 --- a/superset/examples/configs/datasets/examples/new_members_daily.yaml +++ b/superset/examples/configs/datasets/examples/new_members_daily.yaml @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: new_members_daily +table_name: Slack Daily Member Count main_dttm_col: null description: null default_endpoint: null @@ -22,7 +22,7 @@ offset: 0 cache_timeout: null schema: null sql: SELECT date, total_membership - lag(total_membership) OVER (ORDER BY date) AS - new_members FROM exported_stats + new_members FROM "Slack Exported Metrics" params: null template_params: null filter_select_enabled: true diff --git a/superset/examples/configs/datasets/examples/threads.yaml b/superset/examples/configs/datasets/examples/threads.yaml index 0d6a2ab8a5ef0..c80112f0e7a84 100644 --- a/superset/examples/configs/datasets/examples/threads.yaml +++ b/superset/examples/configs/datasets/examples/threads.yaml @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -table_name: threads +table_name: Slack Threads main_dttm_col: ts description: null default_endpoint: null diff --git a/superset/examples/deck.py b/superset/examples/deck.py index c29413e2c5051..9f96c6cfcf05b 100644 --- a/superset/examples/deck.py +++ b/superset/examples/deck.py @@ -176,7 +176,7 @@ def load_deck_dash() -> None: print("Loading deck.gl dashboard") slices = [] table = get_table_connector_registry() - tbl = db.session.query(table).filter_by(table_name="long_lat").first() + tbl = db.session.query(table).filter_by(table_name="Sample Geodata").first() slice_data = { "spatial": {"type": "latlong", "lonCol": "LON", "latCol": "LAT"}, "color_picker": COLOR_RED, @@ -323,7 +323,9 @@ def load_deck_dash() -> None: slices.append(slc) polygon_tbl = ( - db.session.query(table).filter_by(table_name="sf_population_polygons").first() + db.session.query(table) + .filter_by(table_name="San Francisco Population Polygons") + .first() ) slice_data = { "datasource": "11__table", @@ -456,7 +458,7 @@ def load_deck_dash() -> None: viz_type="deck_arc", datasource_type="table", datasource_id=db.session.query(table) - .filter_by(table_name="flights") + .filter_by(table_name="Flights") .first() .id, params=get_slice_json(slice_data), @@ -508,7 +510,7 @@ def load_deck_dash() -> None: viz_type="deck_path", datasource_type="table", datasource_id=db.session.query(table) - .filter_by(table_name="bart_lines") + .filter_by(table_name="San Franciso BART Lines") .first() .id, params=get_slice_json(slice_data), diff --git a/superset/examples/flights.py b/superset/examples/flights.py index b5e5c0e2ffbd5..3db0bd5d3eb7b 100644 --- a/superset/examples/flights.py +++ b/superset/examples/flights.py @@ -25,7 +25,7 @@ def load_flights(only_metadata: bool = False, force: bool = False) -> None: """Loading random time series data from a zip file in the repo""" - tbl_name = "flights" + tbl_name = "Flights" database = utils.get_example_database() table_exists = database.has_table_by_name(tbl_name) diff --git a/superset/examples/long_lat.py b/superset/examples/long_lat.py index 8c7864ec210a5..7ff86f0eecff5 100644 --- a/superset/examples/long_lat.py +++ b/superset/examples/long_lat.py @@ -36,7 +36,7 @@ def load_long_lat_data(only_metadata: bool = False, force: bool = False) -> None: """Loading lat/long data from a csv file in the repo""" - tbl_name = "long_lat" + tbl_name = "Sample Geodata" database = utils.get_example_database() table_exists = database.has_table_by_name(tbl_name) diff --git a/superset/examples/sf_population_polygons.py b/superset/examples/sf_population_polygons.py index 426822c72f604..53401610ccf9c 100644 --- a/superset/examples/sf_population_polygons.py +++ b/superset/examples/sf_population_polygons.py @@ -28,7 +28,7 @@ def load_sf_population_polygons( only_metadata: bool = False, force: bool = False ) -> None: - tbl_name = "sf_population_polygons" + tbl_name = "San Francisco Population Polygons" database = utils.get_example_database() table_exists = database.has_table_by_name(tbl_name)