Skip to content

Commit

Permalink
Revert "feat: Changing Dataset names (#16199)" (#16235)
Browse files Browse the repository at this point in the history
This reverts commit adb3ebb.
  • Loading branch information
AAfghahi authored Aug 12, 2021
1 parent 1715143 commit 9d0dc56
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 **Vehicle Sales** table from the **examples** database.
we register the **cleaned_sales_data** table from the **examples** database.

<img src="/images/tutorial_09_add_new_table.png" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 Survey Results',
datasource: 'FCC 2018 Survey',
description: null,
description_markeddown: '',
edit_url: '/chart/edit/318',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 Survey Results',
datasource: 'FCC 2018 Survey',
description: null,
description_markeddown: '',
edit_url: '/chart/edit/318',
Expand Down
2 changes: 1 addition & 1 deletion superset/examples/bart_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@


def load_bart_lines(only_metadata: bool = False, force: bool = False) -> None:
tbl_name = "San Franciso BART Lines"
tbl_name = "bart_lines"
database = get_example_database()
table_exists = database.has_table_by_name(tbl_name)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 Survey Results
table_name: FCC 2018 Survey
main_dttm_col: null
description: null
default_endpoint: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: Slack Channels and Members
table_name: channel_members
main_dttm_col: null
description: null
default_endpoint: null
Expand Down
2 changes: 1 addition & 1 deletion superset/examples/configs/datasets/examples/channels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: Slack Channels
table_name: channels
main_dttm_col: created
description: null
default_endpoint: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: Vehicle Sales
table_name: cleaned_sales_data
main_dttm_col: OrderDate
description: null
default_endpoint: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: Slack Exported Metrics
table_name: exported_stats
main_dttm_col: Date
description: null
default_endpoint: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: Slack Members and Channels
table_name: members_channels_2
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 "Slack Channels and Members" cm
sql: SELECT c.name AS channel_name, u.name AS member_name FROM channel_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
Expand Down
2 changes: 1 addition & 1 deletion superset/examples/configs/datasets/examples/messages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: Slack Messages
table_name: messages
main_dttm_col: bot_profile__updated
description: null
default_endpoint: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: Slack Messages and Channels
table_name: messages_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 "Slack Messages" c ON m.channel_id =
sql: SELECT m.ts, c.name, m.text FROM messages m JOIN channels c ON m.channel_id =
c.id
params: null
template_params: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
table_name: Slack Daily Member Count
table_name: new_members_daily
main_dttm_col: null
description: null
default_endpoint: null
offset: 0
cache_timeout: null
schema: null
sql: SELECT date, total_membership - lag(total_membership) OVER (ORDER BY date) AS
new_members FROM "Slack Exported Metrics"
new_members FROM exported_stats
params: null
template_params: null
filter_select_enabled: true
Expand Down
2 changes: 1 addition & 1 deletion superset/examples/configs/datasets/examples/threads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: Slack Threads
table_name: threads
main_dttm_col: ts
description: null
default_endpoint: null
Expand Down
10 changes: 4 additions & 6 deletions superset/examples/deck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="Sample Geodata").first()
tbl = db.session.query(table).filter_by(table_name="long_lat").first()
slice_data = {
"spatial": {"type": "latlong", "lonCol": "LON", "latCol": "LAT"},
"color_picker": COLOR_RED,
Expand Down Expand Up @@ -323,9 +323,7 @@ def load_deck_dash() -> None:
slices.append(slc)

polygon_tbl = (
db.session.query(table)
.filter_by(table_name="San Francisco Population Polygons")
.first()
db.session.query(table).filter_by(table_name="sf_population_polygons").first()
)
slice_data = {
"datasource": "11__table",
Expand Down Expand Up @@ -458,7 +456,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),
Expand Down Expand Up @@ -510,7 +508,7 @@ def load_deck_dash() -> None:
viz_type="deck_path",
datasource_type="table",
datasource_id=db.session.query(table)
.filter_by(table_name="San Franciso BART Lines")
.filter_by(table_name="bart_lines")
.first()
.id,
params=get_slice_json(slice_data),
Expand Down
2 changes: 1 addition & 1 deletion superset/examples/flights.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion superset/examples/long_lat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "Sample Geodata"
tbl_name = "long_lat"
database = utils.get_example_database()
table_exists = database.has_table_by_name(tbl_name)

Expand Down
2 changes: 1 addition & 1 deletion superset/examples/sf_population_polygons.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
def load_sf_population_polygons(
only_metadata: bool = False, force: bool = False
) -> None:
tbl_name = "San Francisco Population Polygons"
tbl_name = "sf_population_polygons"
database = utils.get_example_database()
table_exists = database.has_table_by_name(tbl_name)

Expand Down

0 comments on commit 9d0dc56

Please sign in to comment.