|
36 | 36 | from sql import _current |
37 | 37 | from sql.connection import error_handling |
38 | 38 |
|
39 | | -BASE_DOC_URL = "https://jupysql.ploomber.io/en/latest" |
| 39 | +BASE_DOC_URL = "https://jupysql.readthedocs.io/en/latest" |
40 | 40 |
|
41 | 41 |
|
42 | 42 | PLOOMBER_DOCS_LINK_STR = f"{BASE_DOC_URL}/connecting.html" |
@@ -835,14 +835,14 @@ def raw_execute(self, query, parameters=None, with_=None): |
835 | 835 | "disable it with: " |
836 | 836 | '%config SqlMagic.named_parameters="disabled"\n' |
837 | 837 | "For more info, see the docs: " |
838 | | - "https://jupysql.ploomber.io/en/latest/api/configuration.html#named-parameters" # noqa |
| 838 | + "https://jupysql.readthedocs.io/en/latest/api/configuration.html#named-parameters" # noqa |
839 | 839 | ) |
840 | 840 | elif parameters == {}: |
841 | 841 | e.add_detail( |
842 | 842 | 'The named parameters feature is "disabled". ' |
843 | 843 | 'Enable it with: %config SqlMagic.named_parameters="enabled".\n' |
844 | 844 | "For more info, see the docs: " |
845 | | - "https://jupysql.ploomber.io/en/latest/api/configuration.html#named-parameters" # noqa |
| 845 | + "https://jupysql.readthedocs.io/en/latest/api/configuration.html#named-parameters" # noqa |
846 | 846 | ) |
847 | 847 | raise |
848 | 848 |
|
@@ -1138,7 +1138,9 @@ def to_table(self, table_name, data_frame, if_exists, index, schema=None): |
1138 | 1138 | mode = ( |
1139 | 1139 | "overwrite" |
1140 | 1140 | if if_exists == "replace" |
1141 | | - else "append" if if_exists == "append" else "error" |
| 1141 | + else "append" |
| 1142 | + if if_exists == "append" |
| 1143 | + else "error" |
1142 | 1144 | ) |
1143 | 1145 | self._connection.createDataFrame(data_frame).write.mode(mode).saveAsTable( |
1144 | 1146 | f"{schema}.{table_name}" if schema else table_name |
@@ -1206,8 +1208,7 @@ def _suggest_fix(env_var, connect_str=None): |
1206 | 1208 | if keys: |
1207 | 1209 | keys_ = ",".join(repr(k) for k in keys) |
1208 | 1210 | options.append( |
1209 | | - f"Pass a connection key (one of: {keys_})" |
1210 | | - f"\n Example: %sql {keys[0]!r}" |
| 1211 | + f"Pass a connection key (one of: {keys_})\n Example: %sql {keys[0]!r}" |
1211 | 1212 | ) |
1212 | 1213 |
|
1213 | 1214 | if env_var: |
|
0 commit comments