diff options
Diffstat (limited to 'docs/sqlglot/optimizer/normalize_identifiers.html')
-rw-r--r-- | docs/sqlglot/optimizer/normalize_identifiers.html | 119 |
1 files changed, 72 insertions, 47 deletions
diff --git a/docs/sqlglot/optimizer/normalize_identifiers.html b/docs/sqlglot/optimizer/normalize_identifiers.html index 7fad2f4..c4b32c2 100644 --- a/docs/sqlglot/optimizer/normalize_identifiers.html +++ b/docs/sqlglot/optimizer/normalize_identifiers.html @@ -56,33 +56,52 @@ <label class="view-source-button" for="mod-normalize_identifiers-view-source"><span>View Source</span></label> - <div class="pdoc-code codehilite"><pre><span></span><span id="L-1"><a href="#L-1"><span class="linenos"> 1</span></a><span class="kn">from</span> <span class="nn">sqlglot._typing</span> <span class="kn">import</span> <span class="n">E</span> -</span><span id="L-2"><a href="#L-2"><span class="linenos"> 2</span></a><span class="kn">from</span> <span class="nn">sqlglot.dialects.dialect</span> <span class="kn">import</span> <span class="n">Dialect</span><span class="p">,</span> <span class="n">DialectType</span> -</span><span id="L-3"><a href="#L-3"><span class="linenos"> 3</span></a> + <div class="pdoc-code codehilite"><pre><span></span><span id="L-1"><a href="#L-1"><span class="linenos"> 1</span></a><span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">annotations</span> +</span><span id="L-2"><a href="#L-2"><span class="linenos"> 2</span></a> +</span><span id="L-3"><a href="#L-3"><span class="linenos"> 3</span></a><span class="kn">import</span> <span class="nn">typing</span> <span class="k">as</span> <span class="nn">t</span> </span><span id="L-4"><a href="#L-4"><span class="linenos"> 4</span></a> -</span><span id="L-5"><a href="#L-5"><span class="linenos"> 5</span></a><span class="k">def</span> <span class="nf">normalize_identifiers</span><span class="p">(</span><span class="n">expression</span><span class="p">:</span> <span class="n">E</span><span class="p">,</span> <span class="n">dialect</span><span class="p">:</span> <span class="n">DialectType</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="n">E</span><span class="p">:</span> -</span><span id="L-6"><a href="#L-6"><span class="linenos"> 6</span></a><span class="w"> </span><span class="sd">"""</span> -</span><span id="L-7"><a href="#L-7"><span class="linenos"> 7</span></a><span class="sd"> Normalize all unquoted identifiers to either lower or upper case, depending</span> -</span><span id="L-8"><a href="#L-8"><span class="linenos"> 8</span></a><span class="sd"> on the dialect. This essentially makes those identifiers case-insensitive.</span> +</span><span id="L-5"><a href="#L-5"><span class="linenos"> 5</span></a><span class="kn">from</span> <span class="nn">sqlglot</span> <span class="kn">import</span> <span class="n">exp</span> +</span><span id="L-6"><a href="#L-6"><span class="linenos"> 6</span></a><span class="kn">from</span> <span class="nn">sqlglot._typing</span> <span class="kn">import</span> <span class="n">E</span> +</span><span id="L-7"><a href="#L-7"><span class="linenos"> 7</span></a><span class="kn">from</span> <span class="nn">sqlglot.dialects.dialect</span> <span class="kn">import</span> <span class="n">Dialect</span><span class="p">,</span> <span class="n">DialectType</span> +</span><span id="L-8"><a href="#L-8"><span class="linenos"> 8</span></a> </span><span id="L-9"><a href="#L-9"><span class="linenos"> 9</span></a> -</span><span id="L-10"><a href="#L-10"><span class="linenos">10</span></a><span class="sd"> Note:</span> -</span><span id="L-11"><a href="#L-11"><span class="linenos">11</span></a><span class="sd"> Some dialects (e.g. BigQuery) treat identifiers as case-insensitive even</span> -</span><span id="L-12"><a href="#L-12"><span class="linenos">12</span></a><span class="sd"> when they're quoted, so in these cases all identifiers are normalized.</span> +</span><span id="L-10"><a href="#L-10"><span class="linenos">10</span></a><span class="nd">@t</span><span class="o">.</span><span class="n">overload</span> +</span><span id="L-11"><a href="#L-11"><span class="linenos">11</span></a><span class="k">def</span> <span class="nf">normalize_identifiers</span><span class="p">(</span><span class="n">expression</span><span class="p">:</span> <span class="n">E</span><span class="p">,</span> <span class="n">dialect</span><span class="p">:</span> <span class="n">DialectType</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="n">E</span><span class="p">:</span> +</span><span id="L-12"><a href="#L-12"><span class="linenos">12</span></a> <span class="o">...</span> </span><span id="L-13"><a href="#L-13"><span class="linenos">13</span></a> -</span><span id="L-14"><a href="#L-14"><span class="linenos">14</span></a><span class="sd"> Example:</span> -</span><span id="L-15"><a href="#L-15"><span class="linenos">15</span></a><span class="sd"> >>> import sqlglot</span> -</span><span id="L-16"><a href="#L-16"><span class="linenos">16</span></a><span class="sd"> >>> expression = sqlglot.parse_one('SELECT Bar.A AS A FROM "Foo".Bar')</span> -</span><span id="L-17"><a href="#L-17"><span class="linenos">17</span></a><span class="sd"> >>> normalize_identifiers(expression).sql()</span> -</span><span id="L-18"><a href="#L-18"><span class="linenos">18</span></a><span class="sd"> 'SELECT bar.a AS a FROM "Foo".bar'</span> +</span><span id="L-14"><a href="#L-14"><span class="linenos">14</span></a> +</span><span id="L-15"><a href="#L-15"><span class="linenos">15</span></a><span class="nd">@t</span><span class="o">.</span><span class="n">overload</span> +</span><span id="L-16"><a href="#L-16"><span class="linenos">16</span></a><span class="k">def</span> <span class="nf">normalize_identifiers</span><span class="p">(</span><span class="n">expression</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">dialect</span><span class="p">:</span> <span class="n">DialectType</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="n">exp</span><span class="o">.</span><span class="n">Expression</span><span class="p">:</span> +</span><span id="L-17"><a href="#L-17"><span class="linenos">17</span></a> <span class="o">...</span> +</span><span id="L-18"><a href="#L-18"><span class="linenos">18</span></a> </span><span id="L-19"><a href="#L-19"><span class="linenos">19</span></a> -</span><span id="L-20"><a href="#L-20"><span class="linenos">20</span></a><span class="sd"> Args:</span> -</span><span id="L-21"><a href="#L-21"><span class="linenos">21</span></a><span class="sd"> expression: The expression to transform.</span> -</span><span id="L-22"><a href="#L-22"><span class="linenos">22</span></a><span class="sd"> dialect: The dialect to use in order to decide how to normalize identifiers.</span> -</span><span id="L-23"><a href="#L-23"><span class="linenos">23</span></a> -</span><span id="L-24"><a href="#L-24"><span class="linenos">24</span></a><span class="sd"> Returns:</span> -</span><span id="L-25"><a href="#L-25"><span class="linenos">25</span></a><span class="sd"> The transformed expression.</span> -</span><span id="L-26"><a href="#L-26"><span class="linenos">26</span></a><span class="sd"> """</span> -</span><span id="L-27"><a href="#L-27"><span class="linenos">27</span></a> <span class="k">return</span> <span class="n">expression</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">Dialect</span><span class="o">.</span><span class="n">get_or_raise</span><span class="p">(</span><span class="n">dialect</span><span class="p">)</span><span class="o">.</span><span class="n">normalize_identifier</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> +</span><span id="L-20"><a href="#L-20"><span class="linenos">20</span></a><span class="k">def</span> <span class="nf">normalize_identifiers</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">dialect</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span> +</span><span id="L-21"><a href="#L-21"><span class="linenos">21</span></a><span class="w"> </span><span class="sd">"""</span> +</span><span id="L-22"><a href="#L-22"><span class="linenos">22</span></a><span class="sd"> Normalize all unquoted identifiers to either lower or upper case, depending</span> +</span><span id="L-23"><a href="#L-23"><span class="linenos">23</span></a><span class="sd"> on the dialect. This essentially makes those identifiers case-insensitive.</span> +</span><span id="L-24"><a href="#L-24"><span class="linenos">24</span></a> +</span><span id="L-25"><a href="#L-25"><span class="linenos">25</span></a><span class="sd"> Note:</span> +</span><span id="L-26"><a href="#L-26"><span class="linenos">26</span></a><span class="sd"> Some dialects (e.g. BigQuery) treat identifiers as case-insensitive even</span> +</span><span id="L-27"><a href="#L-27"><span class="linenos">27</span></a><span class="sd"> when they're quoted, so in these cases all identifiers are normalized.</span> +</span><span id="L-28"><a href="#L-28"><span class="linenos">28</span></a> +</span><span id="L-29"><a href="#L-29"><span class="linenos">29</span></a><span class="sd"> Example:</span> +</span><span id="L-30"><a href="#L-30"><span class="linenos">30</span></a><span class="sd"> >>> import sqlglot</span> +</span><span id="L-31"><a href="#L-31"><span class="linenos">31</span></a><span class="sd"> >>> expression = sqlglot.parse_one('SELECT Bar.A AS A FROM "Foo".Bar')</span> +</span><span id="L-32"><a href="#L-32"><span class="linenos">32</span></a><span class="sd"> >>> normalize_identifiers(expression).sql()</span> +</span><span id="L-33"><a href="#L-33"><span class="linenos">33</span></a><span class="sd"> 'SELECT bar.a AS a FROM "Foo".bar'</span> +</span><span id="L-34"><a href="#L-34"><span class="linenos">34</span></a><span class="sd"> >>> normalize_identifiers("foo", dialect="snowflake").sql(dialect="snowflake")</span> +</span><span id="L-35"><a href="#L-35"><span class="linenos">35</span></a><span class="sd"> 'FOO'</span> +</span><span id="L-36"><a href="#L-36"><span class="linenos">36</span></a> +</span><span id="L-37"><a href="#L-37"><span class="linenos">37</span></a><span class="sd"> Args:</span> +</span><span id="L-38"><a href="#L-38"><span class="linenos">38</span></a><span class="sd"> expression: The expression to transform.</span> +</span><span id="L-39"><a href="#L-39"><span class="linenos">39</span></a><span class="sd"> dialect: The dialect to use in order to decide how to normalize identifiers.</span> +</span><span id="L-40"><a href="#L-40"><span class="linenos">40</span></a> +</span><span id="L-41"><a href="#L-41"><span class="linenos">41</span></a><span class="sd"> Returns:</span> +</span><span id="L-42"><a href="#L-42"><span class="linenos">42</span></a><span class="sd"> The transformed expression.</span> +</span><span id="L-43"><a href="#L-43"><span class="linenos">43</span></a><span class="sd"> """</span> +</span><span id="L-44"><a href="#L-44"><span class="linenos">44</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span> +</span><span id="L-45"><a href="#L-45"><span class="linenos">45</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">to_identifier</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="L-46"><a href="#L-46"><span class="linenos">46</span></a> <span class="k">return</span> <span class="n">expression</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">Dialect</span><span class="o">.</span><span class="n">get_or_raise</span><span class="p">(</span><span class="n">dialect</span><span class="p">)</span><span class="o">.</span><span class="n">normalize_identifier</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> </span></pre></div> @@ -92,35 +111,39 @@ <div class="attr function"> <span class="def">def</span> - <span class="name">normalize_identifiers</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="n">expression</span><span class="p">:</span> <span class="o">~</span><span class="n">E</span>,</span><span class="param"> <span class="n">dialect</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n"><a href="../dialects/dialect.html#Dialect">sqlglot.dialects.dialect.Dialect</a></span><span class="p">,</span> <span class="n">Type</span><span class="p">[</span><span class="n"><a href="../dialects/dialect.html#Dialect">sqlglot.dialects.dialect.Dialect</a></span><span class="p">],</span> <span class="n">NoneType</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span></span><span class="return-annotation">) -> <span class="o">~</span><span class="n">E</span>:</span></span> + <span class="name">normalize_identifiers</span><span class="signature pdoc-code condensed">(<span class="param"><span class="n">expression</span>, </span><span class="param"><span class="n">dialect</span><span class="o">=</span><span class="kc">None</span></span><span class="return-annotation">):</span></span> <label class="view-source-button" for="normalize_identifiers-view-source"><span>View Source</span></label> </div> <a class="headerlink" href="#normalize_identifiers"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="normalize_identifiers-6"><a href="#normalize_identifiers-6"><span class="linenos"> 6</span></a><span class="k">def</span> <span class="nf">normalize_identifiers</span><span class="p">(</span><span class="n">expression</span><span class="p">:</span> <span class="n">E</span><span class="p">,</span> <span class="n">dialect</span><span class="p">:</span> <span class="n">DialectType</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="n">E</span><span class="p">:</span> -</span><span id="normalize_identifiers-7"><a href="#normalize_identifiers-7"><span class="linenos"> 7</span></a><span class="w"> </span><span class="sd">"""</span> -</span><span id="normalize_identifiers-8"><a href="#normalize_identifiers-8"><span class="linenos"> 8</span></a><span class="sd"> Normalize all unquoted identifiers to either lower or upper case, depending</span> -</span><span id="normalize_identifiers-9"><a href="#normalize_identifiers-9"><span class="linenos"> 9</span></a><span class="sd"> on the dialect. This essentially makes those identifiers case-insensitive.</span> -</span><span id="normalize_identifiers-10"><a href="#normalize_identifiers-10"><span class="linenos">10</span></a> -</span><span id="normalize_identifiers-11"><a href="#normalize_identifiers-11"><span class="linenos">11</span></a><span class="sd"> Note:</span> -</span><span id="normalize_identifiers-12"><a href="#normalize_identifiers-12"><span class="linenos">12</span></a><span class="sd"> Some dialects (e.g. BigQuery) treat identifiers as case-insensitive even</span> -</span><span id="normalize_identifiers-13"><a href="#normalize_identifiers-13"><span class="linenos">13</span></a><span class="sd"> when they're quoted, so in these cases all identifiers are normalized.</span> -</span><span id="normalize_identifiers-14"><a href="#normalize_identifiers-14"><span class="linenos">14</span></a> -</span><span id="normalize_identifiers-15"><a href="#normalize_identifiers-15"><span class="linenos">15</span></a><span class="sd"> Example:</span> -</span><span id="normalize_identifiers-16"><a href="#normalize_identifiers-16"><span class="linenos">16</span></a><span class="sd"> >>> import sqlglot</span> -</span><span id="normalize_identifiers-17"><a href="#normalize_identifiers-17"><span class="linenos">17</span></a><span class="sd"> >>> expression = sqlglot.parse_one('SELECT Bar.A AS A FROM "Foo".Bar')</span> -</span><span id="normalize_identifiers-18"><a href="#normalize_identifiers-18"><span class="linenos">18</span></a><span class="sd"> >>> normalize_identifiers(expression).sql()</span> -</span><span id="normalize_identifiers-19"><a href="#normalize_identifiers-19"><span class="linenos">19</span></a><span class="sd"> 'SELECT bar.a AS a FROM "Foo".bar'</span> -</span><span id="normalize_identifiers-20"><a href="#normalize_identifiers-20"><span class="linenos">20</span></a> -</span><span id="normalize_identifiers-21"><a href="#normalize_identifiers-21"><span class="linenos">21</span></a><span class="sd"> Args:</span> -</span><span id="normalize_identifiers-22"><a href="#normalize_identifiers-22"><span class="linenos">22</span></a><span class="sd"> expression: The expression to transform.</span> -</span><span id="normalize_identifiers-23"><a href="#normalize_identifiers-23"><span class="linenos">23</span></a><span class="sd"> dialect: The dialect to use in order to decide how to normalize identifiers.</span> -</span><span id="normalize_identifiers-24"><a href="#normalize_identifiers-24"><span class="linenos">24</span></a> -</span><span id="normalize_identifiers-25"><a href="#normalize_identifiers-25"><span class="linenos">25</span></a><span class="sd"> Returns:</span> -</span><span id="normalize_identifiers-26"><a href="#normalize_identifiers-26"><span class="linenos">26</span></a><span class="sd"> The transformed expression.</span> -</span><span id="normalize_identifiers-27"><a href="#normalize_identifiers-27"><span class="linenos">27</span></a><span class="sd"> """</span> -</span><span id="normalize_identifiers-28"><a href="#normalize_identifiers-28"><span class="linenos">28</span></a> <span class="k">return</span> <span class="n">expression</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">Dialect</span><span class="o">.</span><span class="n">get_or_raise</span><span class="p">(</span><span class="n">dialect</span><span class="p">)</span><span class="o">.</span><span class="n">normalize_identifier</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="normalize_identifiers-21"><a href="#normalize_identifiers-21"><span class="linenos">21</span></a><span class="k">def</span> <span class="nf">normalize_identifiers</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">dialect</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span> +</span><span id="normalize_identifiers-22"><a href="#normalize_identifiers-22"><span class="linenos">22</span></a><span class="w"> </span><span class="sd">"""</span> +</span><span id="normalize_identifiers-23"><a href="#normalize_identifiers-23"><span class="linenos">23</span></a><span class="sd"> Normalize all unquoted identifiers to either lower or upper case, depending</span> +</span><span id="normalize_identifiers-24"><a href="#normalize_identifiers-24"><span class="linenos">24</span></a><span class="sd"> on the dialect. This essentially makes those identifiers case-insensitive.</span> +</span><span id="normalize_identifiers-25"><a href="#normalize_identifiers-25"><span class="linenos">25</span></a> +</span><span id="normalize_identifiers-26"><a href="#normalize_identifiers-26"><span class="linenos">26</span></a><span class="sd"> Note:</span> +</span><span id="normalize_identifiers-27"><a href="#normalize_identifiers-27"><span class="linenos">27</span></a><span class="sd"> Some dialects (e.g. BigQuery) treat identifiers as case-insensitive even</span> +</span><span id="normalize_identifiers-28"><a href="#normalize_identifiers-28"><span class="linenos">28</span></a><span class="sd"> when they're quoted, so in these cases all identifiers are normalized.</span> +</span><span id="normalize_identifiers-29"><a href="#normalize_identifiers-29"><span class="linenos">29</span></a> +</span><span id="normalize_identifiers-30"><a href="#normalize_identifiers-30"><span class="linenos">30</span></a><span class="sd"> Example:</span> +</span><span id="normalize_identifiers-31"><a href="#normalize_identifiers-31"><span class="linenos">31</span></a><span class="sd"> >>> import sqlglot</span> +</span><span id="normalize_identifiers-32"><a href="#normalize_identifiers-32"><span class="linenos">32</span></a><span class="sd"> >>> expression = sqlglot.parse_one('SELECT Bar.A AS A FROM "Foo".Bar')</span> +</span><span id="normalize_identifiers-33"><a href="#normalize_identifiers-33"><span class="linenos">33</span></a><span class="sd"> >>> normalize_identifiers(expression).sql()</span> +</span><span id="normalize_identifiers-34"><a href="#normalize_identifiers-34"><span class="linenos">34</span></a><span class="sd"> 'SELECT bar.a AS a FROM "Foo".bar'</span> +</span><span id="normalize_identifiers-35"><a href="#normalize_identifiers-35"><span class="linenos">35</span></a><span class="sd"> >>> normalize_identifiers("foo", dialect="snowflake").sql(dialect="snowflake")</span> +</span><span id="normalize_identifiers-36"><a href="#normalize_identifiers-36"><span class="linenos">36</span></a><span class="sd"> 'FOO'</span> +</span><span id="normalize_identifiers-37"><a href="#normalize_identifiers-37"><span class="linenos">37</span></a> +</span><span id="normalize_identifiers-38"><a href="#normalize_identifiers-38"><span class="linenos">38</span></a><span class="sd"> Args:</span> +</span><span id="normalize_identifiers-39"><a href="#normalize_identifiers-39"><span class="linenos">39</span></a><span class="sd"> expression: The expression to transform.</span> +</span><span id="normalize_identifiers-40"><a href="#normalize_identifiers-40"><span class="linenos">40</span></a><span class="sd"> dialect: The dialect to use in order to decide how to normalize identifiers.</span> +</span><span id="normalize_identifiers-41"><a href="#normalize_identifiers-41"><span class="linenos">41</span></a> +</span><span id="normalize_identifiers-42"><a href="#normalize_identifiers-42"><span class="linenos">42</span></a><span class="sd"> Returns:</span> +</span><span id="normalize_identifiers-43"><a href="#normalize_identifiers-43"><span class="linenos">43</span></a><span class="sd"> The transformed expression.</span> +</span><span id="normalize_identifiers-44"><a href="#normalize_identifiers-44"><span class="linenos">44</span></a><span class="sd"> """</span> +</span><span id="normalize_identifiers-45"><a href="#normalize_identifiers-45"><span class="linenos">45</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span> +</span><span id="normalize_identifiers-46"><a href="#normalize_identifiers-46"><span class="linenos">46</span></a> <span class="n">expression</span> <span class="o">=</span> <span class="n">exp</span><span class="o">.</span><span class="n">to_identifier</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span> +</span><span id="normalize_identifiers-47"><a href="#normalize_identifiers-47"><span class="linenos">47</span></a> <span class="k">return</span> <span class="n">expression</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">Dialect</span><span class="o">.</span><span class="n">get_or_raise</span><span class="p">(</span><span class="n">dialect</span><span class="p">)</span><span class="o">.</span><span class="n">normalize_identifier</span><span class="p">,</span> <span class="n">copy</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> </span></pre></div> @@ -142,6 +165,8 @@ on the dialect. This essentially makes those identifiers case-insensitive.</p> <span class="gp">>>> </span><span class="n">expression</span> <span class="o">=</span> <span class="n"><a href="../../sqlglot.html#parse_one">sqlglot.parse_one</a></span><span class="p">(</span><span class="s1">'SELECT Bar.A AS A FROM "Foo".Bar'</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">normalize_identifiers</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span><span class="o">.</span><span class="n">sql</span><span class="p">()</span> <span class="go">'SELECT bar.a AS a FROM "Foo".bar'</span> +<span class="gp">>>> </span><span class="n">normalize_identifiers</span><span class="p">(</span><span class="s2">"foo"</span><span class="p">,</span> <span class="n">dialect</span><span class="o">=</span><span class="s2">"snowflake"</span><span class="p">)</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">dialect</span><span class="o">=</span><span class="s2">"snowflake"</span><span class="p">)</span> +<span class="go">'FOO'</span> </code></pre> </div> </blockquote> |